Among the different stages of creating a prediction model, when should I balance the data?

Should it be at the beginning before I perform any manipulation on the data and creating new features, or after, when I already selected the most important features based on the real data?


Balancing is using which of the samples to consider in the data set (adding/reducing rows). Features selection and feature engineering is removing and adding information about each sample (adding/removing columns).

Therefore, you have the liberty about how to combine them. Many times, the order doesn't matter.

However, if you are normalising features, they will be normalised with respect to the data set and you might get different results before and after balancing. Feature might change it's importance after balancing, influencing the feature selection.

In general, if you are modeling on a data set, it is better to adapt the feature engineering to it so balance first and do feature engineering later later unless you have a reason to do otherwise.


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.