Skip to main content

standardization

Function standardization 

Source
fn standardization(
    row: impl Fn(usize) -> Vec<f64>,
    known: impl Fn(usize) -> bool,
    n: usize,
    width: usize,
    dim: usize,
) -> (Vec<f64>, Vec<f64>)
Expand description

The mean and the deviation (population) of width columns over n rows, in two passes, rows made one at a time; 0 for a column that never changes. The columns from dim on (the header features) only over the rows that have them (known); without any, 0. A missing value (NaN) counts in neither.