Module stats

Module stats 

Source
Expand description

Outcome Statistics with Welford’s Online Algorithm

Provides numerically stable running statistics for outcome dimensions.

§Invariants

  • INV-002: Variance is always non-negative
  • All operations are O(dim) where dim is the outcome dimension

§Example

use rag_plusplus_core::OutcomeStats;

let mut stats = OutcomeStats::new(3);
stats.update(&[0.8, 0.9, 0.7]);
stats.update(&[0.85, 0.88, 0.75]);

assert_eq!(stats.count(), 2);
assert!(stats.mean().is_some());

Structs§

OutcomeStats
Running statistics using Welford’s online algorithm.