2
$\begingroup$

I'm working on training a binary classification model. In my data I have 29 numerical features, continuous and discrete, apart from the target which is categorical. I have 29 features, 8 of them have many zeros (between 40% and 70% of the feature values) which separate quite well positives from negatives since most of these zeros are in positive class. How Should I treat these variables with so many zeros? How are variables with a large number of zeros usually treated in a classification problem?

$\endgroup$
2
  • $\begingroup$ If these features can separate your positives/negatives (which is your target I suppose) well, then what's the problem with them? $\endgroup$ – gunes Apr 3 '20 at 10:16
  • $\begingroup$ I am concerned that such a high ratio of zeros in those variables could affect some assumption of the model in the training process. Could be necessary to apply some feature engineering technique? $\endgroup$ – ekth0r Apr 3 '20 at 12:27
1
$\begingroup$

Having a lot of zeros for a feature is not a problem on its own, especially when it carries some kind of predictive power as you suggested, i.e.

...since most of these zeros are in positive class...

For another example, take one-hot encoded features which will typically have significant number of zeros in them.

As a rule of thumb, don't forget to standardise/normalise all of your features, otherwise you might have more serious problem than having lots of zeros in your features.

$\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.