Confusion Chart
- class datarobot.models.confusion_chart.ConfusionChart(source, data, source_model_id)
Confusion Chart data for model.
Notes
ClassMetrics
is a dict containing the following:class_name
(string) name of the classactual_count
(int) number of times this class is seen in the validation datapredicted_count
(int) number of times this class has been predicted for the validation dataf1
(float) F1 scorerecall
(float) recall scoreprecision
(float) precision scorewas_actual_percentages
(list of dict) one vs all actual percentages in format specified below.other_class_name
(string) the name of the other classpercentage
(float) the percentage of the times this class was predicted when is was actually class (from 0 to 1)
was_predicted_percentages
(list of dict) one vs all predicted percentages in format specified below.other_class_name
(string) the name of the other classpercentage
(float) the percentage of the times this class was actual predicted (from 0 to 1)
confusion_matrix_one_vs_all
(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 ] ]
- Attributes:
- sourcestr
Confusion Chart data source. Can be ‘validation’, ‘crossValidation’ or ‘holdout’.
- raw_datadict
All of the raw data for the Confusion Chart
- confusion_matrixlist of list
The N x N confusion matrix
- classeslist
The names of each of the classes
- class_metricslist of dicts
List of dicts with schema described as
ClassMetrics
above.- source_model_idstr
ID of the model this Confusion chart represents; in some cases, insights from the parent of a frozen model may be used