I'm trying to solve a classification problem with 4 parameters,

  1. next_action - binary variable(0/1)
  2. total_visits- numerical value
  3. days_Since_last_visit - numerical
  4. lead_source- categorical variable (5 categories)

Target variable: status (0- lost customer,1- active customer)

DONE steps: converted lead_source into dummy variables.

A dataset of 7 features- next_action,total_visits,days_since_last_visit,851,852,853,854(removed 850 as drop_first in dummy variable)


  1. Should I apply standardization on all the variables together i.e without removing the binary variables oR should I scale categoical features as well?
  2. I have to apply data balancing because in training data 3400 active customers are there and 300 lost so I need to normalize data as well. So should I apply sampling before PCA?
  3. what is the flow of all 3 - standardization, sampling and PCA?

Let me know If I need to provide any more information!

EDIT: I tried with different sequences and calculated results using knnclassifier! This was a stupid attempt of trying with every possible combination but there is no way to know which case is better! :/ enter image description here

FYI: ar_value and 50% value are from CAP curve graph. accuracy is calculated from confusion matrix.


1 Answer 1


Standardization of your dummies is not a problem technically, though, if you want to interpret your model, it's always better to stay with 0 and 1 but it's quiet impossible to say if standardization will improve or not the model.

It's always better to standardize before doing the PCA (because you directly have correlation coefficient for the matrix) and doing it on the whole population to have std and mean closer to the "real population".

Basically std > pca > sampling is the best option for me just by theory, not necessarily based on your accuracy results.

  • $\begingroup$ so I used confusion matrix and CAP curve to find the accuracy, Is there any other score/parameter I should take in consideration for judging the model? I'm calculating the confusion metrics,F1 score, precision-recall tradeoff? Is there a way to check if model is not too much biased/variance other than these? I'm not getting a good ROC, does that play a significant role? $\endgroup$ Oct 13, 2019 at 23:14

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.