Expand description
Singular Value Decomposition (SVD)
SVD factorizes a matrix A into the product U * Σ * V^T, where:
- U is an orthogonal matrix (left singular vectors)
- Σ is a diagonal matrix (singular values)
- V^T is an orthogonal matrix (right singular vectors)
SVD is used for:
- Matrix approximation and compression
- Principal Component Analysis (PCA)
- Solving linear least squares problems
- Pseudoinverse computation
§Examples
use advanced_algorithms::numerical::svd::SVD;
let matrix = vec![
vec![1.0, 2.0],
vec![3.0, 4.0],
vec![5.0, 6.0],
];
let svd = SVD::decompose(&matrix, 1e-10, 1000).unwrap();
let singular_values = svd.singular_values();Structs§
- SVD
- SVD decomposition result