liveBook · Manning

Singular vector

As explained in Data Without Labels

A singular vector is a vector in a singular value decomposition associated with a left or right orthogonal factor of the decomposed matrix.

A singular vector is an eigenvector of either A Aᵀ or AᵀA. These vectors form the orthonormal factors used to decompose an m × n matrix with singular value decomposition (SVD), which works for rectangular matrices as well as square ones. section 3.6

Use singular vectors to:

  • Represent the orthogonal matrices U and V in SVD; their corresponding singular values are the square roots of the eigenvalues. section 3.6
  • Reduce dimensions by selecting leading singular vectors and examining the variance explained by each one. section 3.6.1
  • Work with sparse datasets where SVD is presented as an alternative to PCA based on eigenvalue decomposition. section 3.6

Mushroom feature reduction

Encode categorical mushroom data, separate predictors from the class label, standardize the predictors, and run `u, s, v = np.linalg.svd(X_features, full_matrices=True)`. Compute `s**2 / sum(s**2)` to estimate variance explained, place the first two columns of `u` in a dataframe as SV1 and SV2, and plot them against edible or poisonous class labels. section 3.6.1

(3.3)

A = U * S * VT

The factorization A = U * S * Vᵀ shows where singular vectors appear in the SVD representation. section 3.6

How Data Without Labels covers it

How deep it goes
Defines their matrix origin and orthonormality, then demonstrates computation and variance analysis, while deferring mathematical proof.
Examples
Demonstrates mushroom classification with standardized features, NumPy SVD, two-component dataframes, and SV1–SV2 scatter plots.
What it assumes
Assumes matrix transposes, eigenvectors, orthogonal matrices, PCA, and basic data preparation, while introducing SVD-specific terminology.
What you can do after
Apply singular vectors with NumPy to compute components, quantify variance explained, and visualize reduced datasets.
How it connects
Connects singular vectors to singular value decomposition, eigenvectors, eigenvalue decomposition, PCA, singular values, and variance explained.

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.