Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from sklearn.metrics import f1_score
y_prediction = clf.predict(X_test)
f1 = f1_score(y_prediction, y_test, average='weighted')
print(f1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment