A dataset is partitioned into training and validation sets, both containing missing numeric values. The engineer must impute them while keeping validation independent; which approach should the engineer use?
Show the answer
Correct answerD. Fit imputation on training data; apply it to both sets
AWhy not this: Combined fitting lets validation values influence the replacements used during training.
BWhy not this: Validation-only fitting directly uses evaluation information to determine training replacements.
CWhy not this: Independent validation fitting uses evaluation data to learn replacements instead of evaluating the training-fitted pipeline.
DWhy this is right: Training-only fitting prevents validation information from influencing learned replacements and applies consistent preprocessing.
Learn imputation statistics from training data and reuse them unchanged for validation. Fitting separately on validation data lets the evaluation distribution influence preprocessing and does not reproduce the training-fitted transformation.