Class to contain information and display confusion matrix.
Implementation of the SummaryStatistics in the case of classification problem. Actual computation of confusion matrix is delayed until all data is acquired (to figure out complete set of labels). If testing data doesn’t have a complete set of labels, but you like to include all labels, provide them as a parameter to the constructor.
Confusion matrix provides a set of performance statistics (use as_string(description=True) for the description of abbreviations), as well ROC curve (http://en.wikipedia.org/wiki/ROC_curve) plotting and analysis (AUC) in the limited set of problems: binary, multiclass 1-vs-all.
Initialize ConfusionMatrix with optional list of labels
Parameters : | labels : list
labels_map : None or dict
targets :
predictions :
|
---|
‘Pretty print’ the matrix
Parameters : | short : bool
header : bool
summary : bool
description : bool
|
---|
Return a list of separate confusion matrix per each stored set
Provide presentation of confusion matrix in image
Parameters : | labels : list of int or str
numbers : bool
numbers_alpha : None or float
origin : str
xlabels_vertical : bool
numbers_kwargs : dict
**kwargs :
|
---|---|
Returns : | (fig, im, cb) – figure, imshow, colorbar : |