Classification models attempt to predict a target in a discrete space, that is assign an instance of dependent variables one or more categories. Classification score visualizers display the differences between classes as well as a number of classifier-specific visual evaluations. We currently have implemented four classifier evaluations:
classification_report
: Presents the classification report of the classifier as a heatmapconfusion_matrix
: Presents the confusion matrix of the classifier as a heatmaprocauc
: Presents the graph of receiver operating characteristics along with area under the curveclass_balance
: Displays the difference between the class balances and supportthreshold
: Shows the bounds of precision, recall and queue rate after a number of trials.
Estimator score visualizers wrap Scikit-Learn estimators and expose the Estimator API such that they have fit(), predict(), and score() methods that call the appropriate estimator methods under the hood. Score visualizers can wrap an estimator and be passed in as the final step in a Pipeline or VisualPipeline.
# Classifier Evaluation Imports
from sklearn.naive_bayes import GaussianNB
from sklearn.linear_model import LogisticRegression
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
from yellowbrick.classifier import ClassificationReport, ROCAUC, ClassBalance, ThresholdViz
classification_report confusion_matrix rocauc class_balance threshold