MeanStdRms
- class cubie.outputhandling.summarymetrics.mean_std_rms.MeanStdRms(precision)[source]
Bases:
SummaryMetricComposite metric that calculates mean, std, and rms together.
Notes
Uses three buffer slots: shift (first value), sum of shifted values, and sum of squares of shifted values. The shift technique improves numerical stability for the variance calculation.
The output array contains [mean, std, rms] in that order.
- build() MetricFuncCache[source]
Generate CUDA device functions for composite calculation.
- Returns:
Cache containing the device update and save callbacks.
- Return type:
MetricFuncCache
Notes
The update callback accumulates sum and sum_of_squares while the save callback computes all three metrics from these running sums and clears the buffer.