text_plain_output_1.png
from sklearn.ensemble import RandomForestClassifier

from sklearn.linear_model import LogisticRegression

from sklearn.metrics import plot_confusion_matrix

import matplotlib.pyplot as plt

logmodel = LogisticRegression(fit_intercept=True)
logmodel.max_iter = 1000
logit_result = logmodel.fit(X_train, Y_train)
ylm_predicted = logit_result.predict(X_test)

rf_clf = RandomForestClassifier(bootstrap=False)
result_clf = rf_clf.fit(X_train, Y_train)
yrf_predicted = rf_clf.predict(X_test)

plot_confusion_matrix(rf_clf, X_test, Y_test)
plt.show()