ROC (Python)
The ROC Cython class wraps the C++ roc curve engine. It inherits
from TLine (via the C++ roc → plotting chain) so all
BasePlotting properties are available.
Properties
Property |
Type |
Description |
|---|---|---|
|
|
List of classifier score values (one per event). Triggers internal ROC computation on assignment. |
|
|
Ground-truth binary labels (0 or 1, one per event). |
|
|
Number of threshold steps used to build the ROC curve (default
|
|
|
Area Under the ROC Curve, computed after setting |
|
|
Legend labels for each ROC curve when plotting multiple classifiers. |
|
|
Blocked — use |
|
|
Blocked — use |
Usage Example
from AnalysisG.core.roc import ROC
r = ROC()
r.Scores = scores.tolist()
r.Truth = truth.tolist()
r.xBins = 200
r.Filename = "roc_curve"
r.OutputDirectory = "plots/"
r.SaveFigure()
print("AUC:", r.AUC)