I have a linear model used for prediction, with around 30 predictors, which are car usage rate as in percentage, across different zip codes.

All these predictors have the same unit, as they are all car usage percentage.

The problem comes from the fact that some zip codes have very 'inactive' car usage: the values is often 0, or much smaller compared with others.

When I use general linear models, such as LASSO or ridge, I usually standardize my data first. Through standardization, these 'inactive' predictors actually got amplified.

I am wondering if there is a systematic way to restrict the beta's of these inactive predictors.

Does anyone have any insight?

  • $\begingroup$ A simple hack would be to remove those particular rows to a different df(based on your query) and then remerge that column later... Or write a custom Preprocessing function which takes skp_fld as it's parameter.. $\endgroup$
    – Aditya
    Apr 15, 2018 at 3:22

1 Answer 1


Zip code is a categorical feature. You might be one-hot encoding it. You should not standardized one-hot encoded feature.

It sounds like you have sparse data. Linear models do not handle sparse data very well. You might want to switch to another type, such as tree-based.


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.