liveBook · Manning

Scree plot

As explained in Data Without Labels

A scree plot is a graph of component eigenvalues or explained variance used to inspect how much information successive components capture.

A scree plot shows cumulative explained variance as principal components are added, helping choose a smaller set without losing most of the dataset’s information. section 3.5.2

Use the plot to:

  • Inspect how quickly successive principal components capture variance. section 3.5.2
  • Compare the component count with a target level of retained information. section 3.5.2
  • Select two components when they retain 95.08% of total variance, as in the Iris workflow. section 3.5.2

Plot cumulative explained variance in Python

After fitting PCA to standardized data, plot np.cumsum(pca.explained_variance_ratio_) against the number of components, label the axes, and use the curve to choose the retained dimensions.

How Data Without Labels covers it

How deep it goes
Explains the visualization and applies it to component selection, but does not develop scree-plot theory beyond PCA variance calculations.
Examples
Uses standardized Iris measurements, four principal components, a cumulative-variance plot, and a two-component projection.
What it assumes
Assumes familiarity with datasets and PCA inputs, while demonstrating standardization, covariance, eigenvalues, and explained variance in sequence.
What you can do after
Apply it via scikit-learn, NumPy, and Matplotlib to select a practical number of PCA components.
How it connects
Connects PCA with explained variance, eigenvalues, standardization, covariance matrices, and dimensionality reduction.

Also explained in

Compare how 2 books explain scree plot →

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.