# Categorical feature with one dominant value [closed]

in my dataset for machine learning I have many categorical features with one dominant category as you can see on the picture.

How can I deal with this kind of categorical data in preprocessing?

## closed as unclear what you're asking by mkt, Peter Flom♦Apr 9 at 14:46

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Deal with what? – Tim Apr 9 at 11:17
• In general. I'm not sure if this kind of data should be somehow weighted / transformed or if I can just apply dummy encoding and the fact that one category is dominant will not negatively affect model performance. – soldous Apr 9 at 11:30
• Transformed what for? Why exactly do you need to transform it? What is the problem? – Tim Apr 9 at 11:33
• My problem in general is: Binary classification machine learning scenario (predict 0 or 1). I'm kind of a newbie to the machine learning and I walked through the basic workflow of data preprocessing (dealing with nulls, outliers, encode categorical features as dummy variables and scale features) but even in with my best algorithm the precision is only 0,67 and I need a more precise model. So I was thinking if unbalanced categorical features could negatively affect the precision. – soldous Apr 9 at 11:43

You are asking what could be done in terms of preprocessing the data when one of the categories in categorical feature is very frequent. In such case nothing should, or even can, be done. In such case for many samples you observe the same value. If you transformed the values in some way, nothing would change about the fact that still many samples have the same category (while it would be encoded using different value). Saying it differently, if you changed the encoding of classes, the only thing that would change is the labels on the $$x$$-axis of your plot.