This question already has an answer here:

As in classification we have imbalanced classes, we use up-sampling or down-sampling and other techniques, what do we do when we have imbalanced data in prediction problems, for example, I have distribution of outputs like 90% value1, 5% value2, 3%value3, 2% value4?


marked as duplicate by oW_, Sean Owen Feb 13 at 3:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


In addition to post linked by @Wes:

  • You should to check other metrics than accuracy like precision, recall (especially), F1 score or similar.

  • After a certain threshold (lower than the one provided in your example definitely), it might be worthwile to use anomaly detection and use your lesser present classes as such.

I would advise against downsampling as it's leaving informations about data, and IMO you would usually want to avoid that.


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