Confusion chart
- class datarobot.models.confusion_chart.ConfusionChart
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 ] ]
- Variables:
source (
str
) – Confusion Chart data source. Can be ‘validation’, ‘crossValidation’ or ‘holdout’.raw_data (
dict
) – All of the raw data for the Confusion Chartconfusion_matrix (
list
oflist
) – The N x N confusion matrixclasses (
list
) – The names of each of the classesclass_metrics (
list
ofdicts
) – List of dicts with schema described asClassMetrics
above.source_model_id (
str
) – ID of the model this Confusion chart represents; in some cases, insights from the parent of a frozen model may be used