ROC Curve

class datarobot.models.roc_curve.RocCurve(source, roc_points, negative_class_predictions, positive_class_predictions, source_model_id, data_slice_id=None)

ROC curve data for model.

Attributes:
sourcestr

ROC curve data source. Can be ‘validation’, ‘crossValidation’ or ‘holdout’.

roc_pointslist of dict

List of precalculated metrics associated with thresholds for ROC curve.

negative_class_predictionslist of float

List of predictions from example for negative class

positive_class_predictionslist of float

List of predictions from example for positive class

source_model_idstr

ID of the model this ROC curve represents; in some cases, insights from the parent of a frozen model may be used

data_slice_id: str

ID of the data slice this ROC curve represents.

classmethod from_server_data(data, keep_attrs=None, use_insights_format=False, **kwargs)

Overwrite APIObject.from_server_data to handle roc curve data retrieved from either legacy URL or /insights/ new URL.

Parameters:
datadict

The directly translated dict of JSON from the server. No casing fixes have taken place.

keep_attrsiterable

List, set or tuple of the dotted namespace notations for attributes to keep within the object structure even if their values are None

use_insights_formatbool, optional

Whether to repack the data from the format used in the GET /insights/RocCur/ URL to the format used in the legacy URL.

Return type:

RocCurve

class datarobot.models.roc_curve.LabelwiseRocCurve(source, roc_points, negative_class_predictions, positive_class_predictions, source_model_id, label, kolmogorov_smirnov_metric, auc)

Labelwise ROC curve data for one label and one source.

Attributes:
sourcestr

ROC curve data source. Can be ‘validation’, ‘crossValidation’ or ‘holdout’.

roc_pointslist of dict

List of precalculated metrics associated with thresholds for ROC curve.

negative_class_predictionslist of float

List of predictions from example for negative class

positive_class_predictionslist of float

List of predictions from example for positive class

source_model_idstr

ID of the model this ROC curve represents; in some cases, insights from the parent of a frozen model may be used

labelstr

Label name for

kolmogorov_smirnov_metricfloat

Kolmogorov-Smirnov metric value for label

aucfloat

AUC metric value for label