I have an unbalanced dataset X. I split it between data and labels, then I standardize the data. Then I use train_test_split to split between train and test data and I output the result.

Now I want to compare to see what I would get if I used smote to upsample the minority class, but I want to keep the comparison meaningful. To do that, I keep the same test data as before, and I add the new synthetic samples only to the train data. How should I handle the standardization?

Should I

  1. Simply assume that since I used points from the already standardised data that the new synthetic samples will also be standardised? Therefore just add the synthetic samples to the train data and be done with it? (Without touching the test data)
  2. Create the synthetic samples from the pre-standardised data, standardise the synthetic samples and add them to the train data? (Without touching the test data)
  3. Create the synthetic samples from the pre-standardised data, add them to the train data, and standardise the whole set? (Without touching the test data)
  4. Or ... ?

I am getting very different results doing these three techniques, what is the best way to get a meaningful result and comparison?


1 Answer 1


Solution 1 and 3 look really similar but I would go for 1 when thinking about the programming paradigm.

Seeing the classification as a big pipeline using standardization, balancing, and classification, one would not like to re-standardize something in the balancing. Furthermore, the assumption made in 1 is correct.

In a practical way, you could use the pipeline offer by the imbalanced API to use SMOTE with a scikit-learn normalizer


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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