Why must target encoding be computed within cross-validation folds?
- A Otherwise the target value leaks into the feature, inflating validation performance
- B It is computationally expensive
- C It requires balanced classes
- D Categories must be sorted first
Answer
Otherwise the target value leaks into the feature, inflating validation performance
Encoding a category using the target values of rows in the validation fold is a direct form of leakage.





