In what order should I do the following given a dataset:

  • (E)ncoding of Categorical Variables
  • (N)ormalization
  • (B)alancing of data
  • (I)mputation of Missing Values
  • (R)emoval of Duplicates/Infinity/Outliers/Corrupt/Bad values
  • (F)eature ranking/selection/engineering

I am aware that it will vary from dataset to dataset, but I'm looking for a heuristic here and some reasoning to better understand why the order of operations would change given some dataset.

I currently do: R -> I -> B -> E -> N -> F

If I've missed something, please let me know. I am a student and I am still learning.


1 Answer 1


It depends on the context. Your order of steps is fairly standard.

One option is to treat the order of processing steps as a hyperparameter. Then see if different orders can improve model performance, while making sure the ordering is valid and there is no data leakage.

  • $\begingroup$ That's a super interesting thought, Brian. I never thought about treating the order of operations as a hyperparameter. That's something I'll definitely incorporate into my standard approach. $\endgroup$
    – Tariq
    Mar 20 at 15:14

Your Answer

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

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