text_plain_output_1.png
from sklearn.ensemble import RandomForestClassifier

from yellowbrick.classifier import ConfusionMatrix

clf_rf = RandomForestClassifier(max_depth=50, min_samples_split=5, random_state=0)

cm = ConfusionMatrix(clf_rf, classes=[0, 1])
cm.fit(X_train, y_train)
cm.score(X_train, y_train)