A singular value is the nonnegative square root of an eigenvalue of AAT or ATA. It occupies a diagonal position in S, the diagonal matrix of an SVD: A = U * S * VT. section 3.6
Use singular values to:
- Estimate the variance explained by each corresponding singular vector using the squared values normalized by their total. section 3.6.1
- Choose a reduced set of components for visualizing or transforming data. section 3.6 section 3.6.1
- Prefer SVD for sparse datasets, while using PCA for denser datasets. section 3.6
Mushroom data workflow
Encode categorical mushroom data, separate features from the class label, standardize the features, and run np.linalg.svd(X_features). Compute variance_explained = s**2 / sum(s**2), then plot the first two singular vectors with edible and poisonous labels. section 3.6.1
(3.3)
A = U * S * VT
Inspect the compact factorization that places singular values on the diagonal matrix S between orthogonal matrices U and VT. section 3.6

