scikit-learn 1 · Evaluation and tuning
See where the model is wrong
Rows are true classes and columns are predicted classes.
from sklearn.metrics import confusion_matrix
print(confusion_matrix(y_test, predictions))
Official scikit-learn 1 documentation
More evaluation and tuning commands
- Measure accuracy
- Get precision, recall and F1
- Evaluate a regression model
- Cross-validate
- Tune hyperparameters
- See which features matter
All evaluation and tuning commands · scikit-learn 1 cheatsheet