?
Why can target encoding leak information?
PostedJun 21, 2026
Question: Why can target encoding cause leakage?
A) It only works with numeric features
B) It removes categorical variables entirely
C) It can encode category statistics using labels from validation or test examples if not computed within proper folds
D) It prevents model fitting
Correct: C
Explanation: Target encoding replaces categories with statistics derived from the target. If those statistics are computed using validation or test labels, the model indirectly sees information it should not know.
Topic: advanced ML / categorical encoding / leakage