ROC Curve

Display the Receiver Operating Characteristic (ROC) curve with a threshold slider.

ROC Curve

Processing

This brick generates an interactive Receiver Operating Characteristic (ROC) curve to help you evaluate the performance of a classification model.

The ROC curve plots the True Positive Rate (sensitivity) against the False Positive Rate (1 - specificity) at various threshold settings. The brick includes a built-in slider that allows you to adjust the "Threshold" value interactively. As you move the slider, a highlighted point on the curve moves to show the exact True Positive and False Positive rates associated with that specific threshold.

This visualization is crucial for finding the optimal balance between catching positive cases and minimizing false alarms.

Inputs

tpr
The list or series of True Positive Rate values calculated from your model predictions.
fpr
The list or series of False Positive Rate values calculated from your model predictions.
thresholds
The list or series of decision Thresholds corresponding to the rates provided above. These values determine the cutoff point for classifying a result as positive or negative.

Inputs Types

Input Types
tpr List, NDArray, DataSeries, DataFrame, DataRecords
fpr List, NDArray, DataSeries, DataFrame, DataRecords
thresholds List, NDArray, DataSeries, DataFrame, DataRecords

You can check the list of supported types here: Available Type Hints.

Outputs

tpr
The True Positive Rate data, passed through unchanged to the next brick.
fpr
The False Positive Rate data, passed through unchanged to the next brick.
thresholds
The Threshold data, passed through unchanged to the next brick.

Outputs Types

Output Types
tpr List, NDArray, DataSeries, DataFrame, DataRecords
fpr List, NDArray, DataSeries, DataFrame, DataRecords
thresholds List, NDArray, DataSeries, DataFrame, DataRecords

You can check the list of supported types here: Available Type Hints.

Options

The ROC Curve brick contains some changeable options:

True Positive Rate
Specifies the name of the field or column containing the True Positive Rate data within your dataset.
False Positive Rate
Specifies the name of the field or column containing the False Positive Rate data within your dataset.
Thresholds
Specifies the name of the field or column containing the Threshold values within your dataset.

Brick Info

version v0.1.4
python 3.11, 3.12, 3.13
requirements
  • shap>=0.47.0
  • numba>=0.56.0