Std
- class cubie.outputhandling.summarymetrics.std.Std(precision)[source]
Bases:
SummaryMetricSummary metric that calculates the standard deviation of a variable.
Notes
The metric uses three buffer slots: one for the shift value (first sample), one for the sum of shifted values, and one for the sum of squares of shifted values. The standard deviation is calculated using a numerically stable shifted-data algorithm to avoid catastrophic cancellation.
- build() MetricFuncCache[source]
Generate CUDA device functions for standard deviation calculation.
- Returns:
Cache containing the device update and save callbacks.
- Return type:
MetricFuncCache
Notes
The update callback accumulates both sum and sum of squares while the save callback computes the standard deviation and clears the buffer.