Principle:Haifengl Smile Decomposition Result Extraction
Overview
Decomposition Result Extraction is the final stage of the Matrix_Decomposition_Pipeline, where the factored components produced by decompositions are accessed, manipulated, and used for downstream analysis. This includes extracting singular values and vectors from SVD, eigenvalues and eigenvectors from EVD, sorting eigenvalues, constructing diagonal matrices, and computing derived quantities such as matrix rank, condition number, null space, and range.
For large sparse matrices where full decomposition is infeasible, Smile provides ARPACK (Implicitly Restarted Arnoldi/Lanczos Method) for computing a small number of extremal eigenpairs or singular triples efficiently.
Theoretical Basis
SVD Result Interpretation
Given the SVD :
| Component | Symbol | Interpretation |
|---|---|---|
| Singular values | Importance of each component; square roots of eigenvalues of | |
| Left singular vectors | Orthonormal basis for the column space of | |
| Right singular vectors | Orthonormal basis for the row space of | |
| Diagonal matrix | The "stretching factors" of the transformation |
Derived Quantities from SVD
Matrix Rank: The number of singular values above a threshold:
where the threshold is .
Condition Number: The ratio of the largest to smallest singular value:
A condition number close to 1 indicates a well-conditioned matrix. When is large or infinite, the matrix is ill-conditioned or singular.
Nullity:
Range Space: The first columns of form an orthonormal basis for .
Null Space: The last rows of (equivalently, last columns of ) form an orthonormal basis for .
The Eckart-Young Theorem
The truncated SVD provides the best low-rank matrix approximation. Keeping only the top singular values:
minimizes and over all rank- matrices. This is the theoretical basis for PCA, latent semantic indexing, and data compression.
EVD Result Interpretation
Given the eigenvalue decomposition of a square matrix :
Symmetric Case
where with all real eigenvalues and is orthogonal.
Spectral properties:
- All eigenvalues are real
- Eigenvectors corresponding to distinct eigenvalues are orthogonal
- Positive definite iff all
General (Non-Symmetric) Case
Eigenvalues may be complex:
The diagonal matrix uses a block structure:
- Real eigenvalue : a 1x1 block on the diagonal
- Complex conjugate pair : a 2x2 block
Sorting Eigenvalues
Eigenvalues are sorted by descending magnitude:
where . The corresponding eigenvectors are reordered accordingly.
ARPACK: Large Sparse Eigenproblems
For matrices too large for full EVD (), ARPACK computes a small number of eigenvalues using the Implicitly Restarted Arnoldi Method (IRAM):
For symmetric matrices (Lanczos variant):
- Builds a Krylov subspace
- Extracts eigenvalue approximations (Ritz values) from the tridiagonal projection
- Applies implicit QR shifts to restart with a refined subspace
Which eigenvalues to compute (SymmOption enum):
| Option | Description | Use Case |
|---|---|---|
| LA | Largest algebraic | PCA (largest positive eigenvalues) |
| SA | Smallest algebraic | Graph Laplacian (near-zero eigenvalues) |
| LM | Largest magnitude | Dominant modes, spectral radius |
| SM | Smallest magnitude | Near-singular directions |
| BE | Both ends | Spectral gap analysis |
Computational complexity: where ncv is the number of Arnoldi vectors (typically ), compared to for full EVD.
Key property: ARPACK only requires the action of on a vector (matrix-vector product), not the matrix entries themselves. This enables use with sparse matrices and implicit matrix representations.
ARPACK SVD
ARPACK can also compute the top- singular triples by solving the equivalent eigenproblem on (via the AtA implicit matrix wrapper) and recovering the singular vectors.
Relationship to the Pipeline
Construction --> Arithmetic --> Decomposition --> Solving --> Result Extraction
^
|
(this principle)
Result extraction is the final stage that produces the quantities used by ML algorithms: eigenvalues for PCA, singular values for matrix rank, eigenvectors for spectral clustering, and so on.
Related
Knowledge Sources
Domains
Linear_Algebra, Numerical_Computing, Dimensionality_Reduction, Spectral_Analysis