# imbalanced target dataset(multi class)

I have a multi-class prediction problem
but the 300classes is imbalanced
should I make it balance all 300 class will predict the better result?
is there an easier method to do this job?
if I'm using the random-forest imbalance dataset is matter?

## 1 Answer

Nothing better if you could get more data and make classes (at least close to) balanced!

Choice of algorithm (I believe you using only RFC) entirely depends upon problem statement and as we all know, there is no free lunch in statistics, so you might've to try other algorithms (or just create a pipeline trying few more) as well.

Try over/under sampling and penalize your model by applying some custom matrix for miss classification, if required. Another point to keep note of is performance metric (avoid Accuracy paradox). Apart from deeper dive with F1, Recall & Precision; also try to look into [Kappa]1 or [ROC curves]2.

Based on the limited information (better idea would be to add a graph showing class imbalance) you've provided, this is the best I recommend. Hope it helps!