1
$\begingroup$

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?

$\endgroup$
1
  • $\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

0
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.