text_plain_output_1.png
from sklearn.ensemble import ExtraTreesClassifier, RandomForestClassifier, GradientBoostingClassifier

from sklearn.metrics import classification_report

from sklearn.neighbors import KNeighborsClassifier

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import time

import pandas as pd
df = pd.read_csv('../input/SkillCraft.csv')

y = df.LeagueIndex.astype(int)
X = df.drop(['LeagueIndex', 'GameID'], axis=1)

classifiers = [GradientBoostingClassifier(n_estimators=150, max_depth=4), RandomForestClassifier(n_estimators=200, max_depth=9), KNeighborsClassifier(15)]

target_names = list(set(y))
for classifier in classifiers:
    print(classifier.__class__.__name__)
    start = time.time()
    classifier.fit(X_train, y_train)
    print('  -> Training time:', time.time() - start)
    preds = classifier.predict(X_test)
    print()
    print(classification_report(y_test, preds, target_names=target_names))