Skip to main content

Module naive_svd

Module naive_svd 

Source
Expand description

The singular value decomposition computed the obvious way, from the eigenproblem of AᵀA.

If A = U Σ Vᵀ then AᵀA = V Σ² Vᵀ, so the right singular vectors are eigenvectors of AᵀA, the singular values are the square roots of its eigenvalues, and u_i = A v_i / σ_i. The trouble is that forming AᵀA squares every singular value: those below √ε σ_max ≈ 10⁻⁸ σ_max fall beneath the rounding error of the largest and are lost. Production SVDs work on A itself: Golub-Kahan bidiagonalisation (the default in lib_jsl_linalg, as in LAPACK) or one-sided Jacobi (lib_jsl_linalg’s SvdJacobi).

See the book entry The singular value decomposition.

Structs§

Svd
The thin SVD of an m × n matrix (m ≥ n): U is m × n, σ descends, V is n × n. Columns of U belonging to zero singular values are left zero.

Functions§

svd_via_normal_matrix
The SVD via the Jacobi eigenvalue method applied to AᵀA.