[−][src]Function ml_rust_cuda::math::stats::std_dev
pub fn std_dev(vec: &Vector) -> f32
Returns the standard deviation of the values contained in a mathematical vector.
Examples
use ml_rust_cuda::math::{ f32_eq, linear::Vector, stats::std_dev }; let vec = Vector::new(vec![9_f32, 5_f32, 8_f32, 3_f32, 4_f32, 0_f32]); let std_dev = std_dev(&vec); println!("{}", std_dev); assert!(f32_eq(std_dev, 3.3116));