I have a quick question about whether or not to standardize features after a log transformation.

I have one feature that is heavily skewed and requires the log transformation, for the other features I'm applying the standard scaler.

My question is, should I be including that log transformed feature in the standard scaling step after it's been transformed? I'm unsure.

It's being plugged into a linear function, so the weight is separate from the rest of the features (ie. the final function looks like y = x0 + x1f1 + x2f2 ... )

But I thought it might be useful to scale after transformation, just to ensure that features with different scales are comparable and do not dominate the analysis solely based on their scale. But I'm not sure if it's necessary.

Please could someone point me towards some reading on this, and some logic as to whether or not the scaling step is necessary.


1 Answer 1


should I be including that log transformed feature in the standard scaling step


The log transform changes the shape of the feature distribution, squishing the tail.

Finding zero-mean unit-variance Z scores is an affine transformation that puts all features on an even footing.

For your transformed feature $f_1 = ln(\text{raw})$, imagine we also fed the model $f_2 = 3 + f_1$, and $f_3 = 6 + f_1$, corresponding to scaling by a thousand and by a million, perhaps due to "mg" vs "kg" product labeling. There's no new information, yet we've managed to offer the model linearly independent inputs, so that can't be good. It's necessary to scale after transformation, removing those constant offsets. That would quickly reveal the redundancy of $f_1$ and $f_2$.


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.