Confusion Chart API

class datarobot.models.confusion_chart.ConfusionChart(source, data)

Confusion Chart data for model.

Attributes

source (str) Confusion Chart data source. Can be ‘validation’, ‘crossValidation’ or ‘holdout’.
raw_data (dict) All of the raw data for the Confusion Chart
confusion_matrix (list of list) The NxN confusion matrix
classes (list) The names of each of the classes
class_metrics (list of dict) Containing all of the metrics for each of the classes. Dictionary keys: className : string name of the class actualCount : int number of times this class is seen in the validation data predictedCount : int number of times this class has been predicted for the validation data f1 : float F1 score recall : float recall score precision : float precision score wasActualPercentages : list of dict one vs all actual percentages in a format specified below, Dictionary keys: otherClassName : string the name of the other class percentage : float the percentage of the times this class was predicted when is was actually class (from 0 to 1) wasPredictedPercentages : list of dict one vs all predicted percentages in a format specified below, Dictionary keys: otherClassName : string the name of the other class percentage : float the percentage of the times this class was actual predicted (from 0 to 1) confusionMatrixOneVsAll : list of list 2d list representing 2x2 one vs all matrix. This represents the True/False Negative/Positive rates as integer for each class. The data structure looks like: [ [ True Negative, False Positive ], [ False Negative, True Positive ] ]