I'm working on a multi-class classification problem where the classes are imbalanced (70:25:5).

Train-Test Split

x_train, x_test, y_train, y_test = train_test_split(X, Y, test_size=0.2, random_state=42, stratify=Y)

Random Forest Classifier

cls = {0:.9, 1:.09, 3:.01}
RandomForestClassifier(n_estimators=100, n_jobs=-1, random_state=42, oob_score=True, class_weight=cls)

I do not see a change in the results after assigning class weights. Is there anything that I need to look into in particular here? Thanks in advance!



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.