Function power_iteration

Source
fn power_iteration(
    data: &[Vec<f64>],
    dim: usize,
    deflate_against: Option<&[f64]>,
) -> Vec<f64>
Expand description

Power iteration for finding a principal component.

If deflate_against is provided, the component is orthogonalized against it (for finding the second PC).