text_html_output_1.png
from sklearn.ensemble import RandomForestClassifier

import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

train_set = pd.read_csv('../input/train.csv')
test_set = pd.read_csv('../input/test.csv')

image_array = np.asfarray(train_set.iloc[3, 1:]).reshape((28, 28))

X_train = train_set.iloc[:, 1:].values
y_train = train_set.label.values

from sklearn.ensemble import RandomForestClassifier
classifier = RandomForestClassifier(criterion='entropy', n_estimators=10, max_depth=3, random_state=0)
classifier.fit(X_train, y_train)

classifier.score(X_train, y_train)