text_plain_output_2.png text_plain_output_1.png image_output_1.png
from sklearn import tree

from sklearn.ensemble import RandomForestClassifier

from sklearn.ensemble import RandomForestClassifier

from sklearn.metrics import classification_report

from sklearn.metrics import confusion_matrix

from sklearn.neural_network import MLPClassifier

import seaborn as sns

clf = tree.DecisionTreeClassifier(max_depth=400, random_state=42)
clf.fit(X_train, y_train)

y_pred = clf.predict(X_test)

sns.set(rc={'figure.figsize': (5, 3)})

clf = MLPClassifier(hidden_layer_sizes=(50, 100, 200, 400, 800, 1600, 3200, 1600, 800, 400, 200, 100, 50), max_iter=3000, random_state=42)
clf.fit(X_train, y_train)

y_pred = clf.predict(X_test)

sns.set(rc={'figure.figsize': (5, 3)})

clf = RandomForestClassifier(max_depth=2000)
clf.fit(X_train, y_train)

y_pred = clf.predict(X_test)

print('Confusion Matrix :')
sns.set(rc={'figure.figsize': (5, 3)})
sns.heatmap(confusion_matrix(y_test, y_pred), annot=True)