Let's say I have a data set that mixes categorical and continuous features and I would like to study the relative importance of each feature in the prediction of a certain class.

For that I am using the logistic regression with an l1 penalty because I want a sparse solution that maximizes the ROCAUC.

Before training the logistic regression, I first created dummy variables for my categorical features and I centered and scaled all my features, including the dummy variables I have created.

Can I center and scale the dummy variables? Because I want to compare the coefficients of the logistic regression trained on the data set in order to rank the features.

Thanks for the help!


1 Answer 1


AUROC ($c$-index; concordance probability, Somers' $D_{xy}$ rank correlation) is not a valid objective for optimization. It is fooled by a terribly miscalibrated model and is inefficient. Maximum likelihood estimation exists for a reason: optimizing the log likelihood function results in optimality properties of the estimators.

And don't scale indicator variables. This adds confusion to the interpretation of coefficients.

Don't rank features unless you accompany this with bootstrap confidence intervals for the ranks. You'll find that variable importance measures are volatile. The data do not have sufficient information to tell you which features of the data are most important. This is even more true when predictors are correlated.

  • 2
    $\begingroup$ Could you possibly talk a bit more about this part: "The data do not have sufficient information to tell you which features of the data are most important.". I always thought when 2 variables are z-transformed one can say a change in x for 1 standard-dev leads to a change of b(x) standard-dev in y. Therefor i would interpret the variable with the larger Beta as more influential on y than others. It would be really helpful for me if you could add a few words and/or sources. Thanks in advance. $\endgroup$ Dec 12, 2018 at 16:02
  • $\begingroup$ Thank you Frank for your help. Noted, I will not scale indicator variables and will calculate the bootstrap confidence intervals. Why is therefore AUROC commonly used if it is inefficient? Thanks again! $\endgroup$
    – shzt
    Dec 13, 2018 at 9:35
  • $\begingroup$ A good question. Lots of bad ideas put into use in the world. I think people find the concordance probability to be the most interpretable measure of predictive discrimination, and think it should be favored over proper scoring rules for that reason. $\endgroup$ Dec 13, 2018 at 12:40

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.