Question
📝 **Question:** Why does naive target encoding cause leakage?
📋 Pick the right answer.
💡 **Hint:** Re-read the theory above if unsure.
A Because the encoded value is stored as a float64 column and the extra precision relative to the binary target lets the gradient-boosted tree split on noise, which is why naive encoders overfit the training set B Because the row's own target value contributes to the mean used to encode that row's feature, so the model effectively sees the answer through the feature — fixed by out-of-fold encoding or train-only fitting C Because rare categories with only one or two observations produce extreme means that anchor the encoder, and the model learns to memorise those rare-level rows instead of generalising across the dataset D Because pandas evaluates groupby().mean() with a non-deterministic row order, so the same category can map to slightly different encodings on each fit and the model picks up that artefact as signal