ROC Curve Module
The roc class derives from plotting and provides ROC (Receiver Operating
Characteristic) curve computation and storage for multi-class classifiers.
It is used by the built-in AccuracyMetric to generate AUC tables after training.
Struct: roc_t
Header: <plotting/roc.h>
Field |
Type |
Description |
|---|---|---|
|
|
Class index (0-based) that this ROC curve belongs to. |
|
|
k-fold index for which the ROC was computed. |
|
|
Name of the model that produced these scores. |
|
|
Area under the ROC curve for each threshold (one per class). |
|
|
True-positive rates across thresholds (outer: threshold, inner: class). |
|
|
False-positive rates across thresholds. |
|
|
Pointer to truth labels (shape |
|
|
Pointer to model score tensors (shape |
Class: roc
Header: <plotting/roc.h>
Inheritance: plotting
Public Methods
Signature |
Description |
|---|---|
|
Computes the ROC curves for classifier name, fold kfold, given
ground-truth label (flat integer class vector) and scores (one
row per event, one column per class). Results are stored in the
internal |
|
Returns pointers to all computed |
Public Fields
Field / Type |
Description |
|---|---|
|
Maps model-name → {kfold → score vectors}. |
|
Maps model-name → {kfold → truth label vectors}. |
Example:
roc roc_obj;
roc_obj.build_ROC("MyModel", 0, &truth_labels, &model_scores);
for (roc_t* r : roc_obj.get_ROC()) {
std::cout << "AUC (class 0): " << r->_auc[0] << std::endl;
}