Artificial Intelligence, Machine Learning, Math, Computer Science, Software Engineering.
RandomForestClassifier(random_state=42) rf.fit(X_train, y_train) y_pred = rf.predict(X_test) If we look at the confusion matrix, we can clearly see that the model has a similar number of false negatives despite the fact that there are 3 times more positive samples. confusion_matrix(y_test, y_pred)