I have a multi-class classification problem for which I am trying to use a Random Forest classifier. The target is heavily unbalanced and has the following distribution-
1 34108
4 6748
5 2458
3 132
2 37
7 11
6 6
Now, I am using the "class_weight" parameter for RandomForest classifier, and from what I understand, the weights associated with the classes are in the form of {class_label: weight}
So, is the following the correct way:
rfc = RandomForestClassifier(n_estimators = 1000, class_weight = {1:0.784, 2: 0.00085, 3: 0.003, 4: 0.155, 5: 0.0566, 6: 0.00013, 7: 0.000252})
Thanks for your help!