Does it makes sense to scale features by only one label before using logistic regression?

45 views Asked by At

I have a simple binary classification problem, my current classifier is Logistic Regression and I'm using RobustScaler from sklearn to scale my features before fitting the lr.

Assuming my features are looking like 2 Gaussians:

1

While the orange histogram is for the positive label and the blue histogram is for the negative.

My question is, does it makes sense to pass only the negative label features into the scaler?

My intuition is from the sense that in our case, the blue ones are the "normal" cases, and the orange ones are "abnormal". So shouldn't it be better to scale by the "normals" and push the "abnormals" further away from the mean (which is 0 after scaling).

1

There are 1 answers

0
Dimosthenis On

Consider how you would use your model for inference. On new data, you will not know the class, so you can only apply the scaler to all of the cases. That will reduce the model's performance.