ROC from Probabilities

../../../../_images/roc_curve.svg

Computes Receiver operating characteristics (ROC) based on calculated Y-probabilities and from true Y.

Documentation

The ROC (receiver operating characteristic) curve is a graphical plot which illustrates the performance of a binary classifier system as its discrimination threshold is varied. It is created by plotting the fraction of true positives out of the positives (TPR = true positive rate) vs. the fraction of false positives out of the negatives (FPR = false positive rate), at various threshold settings.

The threshold will typically vary from 1 (or infinity), where only classifications with 100% confidence will be considered as correct, to 0 where all classifications will be considered correct. Thus the curve will always go from (TPR=0.0, FPR=0.0) to (TPR=1.0, FPR=1.0). A good classifier will have a high TPR for all thresholds, while a bad (random) classifier will yield a linear roc curve from (0, 0) to (1, 1).

Definition

Input ports

Y-prob
Type: table
Description: Y-prob
Y-true
Type: table
Description: Y-true

Output ports

roc
Type: table
Description: roc

Configuration

Drop suboptimal thresholds (drop_intermediate)

Whether to drop some suboptimal thresholds which would not appear on a plotted ROC curve. This is useful in order to create lighter ROC curves.

Added in version 0.17: parameter drop_intermediate.

header as label (header as label)

Use header of Y-prob as the target label

Positive class label (pos_label)

The label of the positive class. When pos_label=None, if y_true is in {-1, 1} or {0, 1}, pos_label is set to 1, otherwise an error will be raised.

Examples

The node can be found in:

Implementation

class node_metrics.ROCFromProb[source]