liveBook · Manning

Singular value

As explained in Data Without Labels

A singular value is a nonnegative diagonal value in a singular value decomposition that quantifies the magnitude of a corresponding matrix direction.

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

How Data Without Labels covers it

How deep it goes
Defines singular values mathematically and demonstrates their NumPy computation, but defers mathematical proofs.
Examples
Demonstrates encoded and standardized mushroom data, a variance-explained bar plot, and an edible-versus-poisonous component scatter plot.
What it assumes
Assumes matrix transposes, eigenvalues, eigenvectors, and PCA terminology while retaining an accessible explanation of their SVD roles.
What you can do after
Apply it via NumPy to compute variance explained and visualize selected components after preparing tabular data.
How it connects
Connects singular values with singular vectors, eigenvalues, eigenvalue decomposition, SVD, PCA, and variance explained.

Also explained in

Compare how 2 books explain singular value →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Without Labels. The section links point to the parts of the book it draws on.