pub struct Mean { /* private fields */ }Expand description
Incremental mean computed with the delta method to minimize floating-point accumulation error.
§Examples
use rill_ml::stats::Mean;
use rill_ml::OnlineStatistic;
let mut m = Mean::new();
m.update(1.0).unwrap();
m.update(2.0).unwrap();
m.update(3.0).unwrap();
assert_eq!(m.value(), 2.0);
assert_eq!(m.samples_seen(), 3);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mean
impl RefUnwindSafe for Mean
impl Send for Mean
impl Sync for Mean
impl Unpin for Mean
impl UnsafeUnpin for Mean
impl UnwindSafe for Mean
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more