Separate numeric, text, and image classifiers each have only 2% positive examples. The team will oversample positives by duplicating them. Which order of steps avoids leakage and keeps the evaluation data realistic?
Show the answer
Correct answerB. Split the data first, then oversample positives in the training set only
AWhy not this: Duplicates made before the split can land in both sets, leaking training examples into evaluation.
BWhy this is right: Training gets more positive examples while the evaluation set stays unseen and keeps its real class distribution.
CWhy not this: Oversampling the evaluation set changes its class distribution and repeats examples within it, so scores no longer reflect real data.
DWhy not this: Undersampling the evaluation set changes its class distribution and does nothing for the scarce positives in training.
Splitting first keeps every copy of a positive example on the training side, so the evaluation set holds no duplicates of training rows and keeps the real 2% positive rate. Oversampling before the split can put copies of one example in both sets, which inflates evaluation scores.