I have a dataset that contains 284315 samples of class 0 and 492 of class 1. I know, that's huge. I heard about oversampling methods, so I did the following using the RandomOverSampler library:
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33, random_state=42) ros = RandomOverSampler(random_state=0) X_resampled, y_resampled = ros.fit_sample(X, y)
I trained a Random Forest classifier over this resampled data, and the confusion matrix looks like this:
array([[92005, 1833], [ 8, 141]], dtype=int64)
So yeah, It got a 10-folds cv score of 0.9945, but the model is obviously classifying everything that it could to class 0. I know that this is a difficult problem because of the ratio, but is there anything I could do to get a more accurate performance?