Skip to content

Instantly share code, notes, and snippets.

@aSipiere
Created January 24, 2019 12:56
Show Gist options
  • Save aSipiere/6a518423fdb75632154ea8124a102a12 to your computer and use it in GitHub Desktop.
Save aSipiere/6a518423fdb75632154ea8124a102a12 to your computer and use it in GitHub Desktop.
reports = {}
for name, clf in zip(classifier_names, classifiers):
clf.fit(X_train, Y_train)
Y_predictions = clf.predict(X_test)
Y_true = Y_test
reports[name] = classification_report(Y_true, Y_predictions, output_dict=True)
reporting_df = pd.DataFrame.from_dict({(i,j): reports[i][j]
for i in reports.keys()
for j in reports[i].keys()},
orient='index')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment