Metrics Module
The metrics class is the framework’s training-analytics engine. It
registers one analytics_t object per model/kfold pair and captures
loss, accuracy, and invariant-mass histograms during each epoch, then dumps
ROOT/PDF plots to the output directory.
Struct: analytics_t
Header: <metrics/metrics.h>
analytics_t holds all ROOT histograms for one model/kfold pair.
Field |
Type |
Description |
|---|---|---|
|
|
Pointer to the associated model (not owned). |
|
|
Pointer to the model-report struct (owned; freed by |
|
|
Current epoch counter for this model/kfold. |
|
|
Per-mode (train/valid/eval) loss histograms for graph-level features. |
|
same type |
Node-level loss histograms. |
|
same type |
Edge-level loss histograms. |
|
same type |
Graph-level accuracy histograms. |
|
same type |
Node-level accuracy histograms. |
|
same type |
Edge-level accuracy histograms. |
|
same type |
Predicted invariant-mass histograms for edge features. |
|
same type |
Truth invariant-mass histograms for edge features. |
Method |
Description |
|---|---|
|
Deletes all histogram pointers and the |
|
Iterates and deletes all |
Class: metrics
Header: <metrics/metrics.h>
Inheritance: tools, notification
Public Fields
Field |
Type |
Description |
|---|---|---|
|
|
Directory to which plots are written. |
|
|
Framework settings struct (kfolds, batch-size, etc.). |
|
|
ROOT colour list for multi-kfold overlays (red, green, blue, cyan, violet, orange, coffee, aurora). |
Public Methods
Signature |
Description |
|---|---|
|
Creates and stores an |
|
Captures loss, accuracy, and mass histograms from the current model outputs for mode (train/valid/eval) at the given kfold/epoch. smpl_len is the number of events in the batch (used for normalisation). |
|
Writes all loss + accuracy + mass plots for fold k to |
|
Writes only loss plots for fold k. |
|
Writes only accuracy plots for fold k. |
|
Writes only invariant-mass plots for fold k. |