low_rank_approx_ndarray

Function low_rank_approx_ndarray 

Source
pub fn low_rank_approx_ndarray<T>(
    a: &Array2<T>,
    k: usize,
) -> LapackResult<Array2<T>>
where T: Field + Clone + Zeroable + Real,
Expand description

Computes a low-rank approximation of a matrix.

Returns A_k = U_k Σ_k V_k^T, the best rank-k approximation in Frobenius norm.

§Arguments

  • a - The input matrix (m×n)
  • k - Target rank

§Returns

The rank-k approximation as a matrix