1
$\begingroup$

I've read a few answers to similar questions that advise the completion of SMOTE after splitting the data set into Train and Test sets however, the documentation and other examples I've seen run SMOTE after simply separating the predictors and target, ie, before splitting into X_train, X_test, y_train, y_test. Is the documentation not entirely accurate or am I not understanding something?

$\endgroup$
1
$\begingroup$

You are not missing something, your understanding is correct.

SMOTE directly changes the underlying distribution of the data at hand. This change is done so we can facilitate the learning algorithm chosen to avoid issues associated with not having enough information regarding the minority class, i.e. during learning we accept an idealised version of data reality when we do not have severe class imbalance. That said though, when evaluating the generalisation performance of our learning algorithm, i.e. during testing, we want to approximate reality as close as possible. If we do not approximate reality our insights are not transferable to the real world. Therefore, examples that alter both the training and the test samples are misleading. As you politely put it: "the documentation (is) not entirely accurate" indeed.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.