# Scale dummy variables in logistic regression

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!

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.