scikitplot.decomposition#

This package/module is designed to be compatible with both Python 2 and Python 3. The imports below ensure consistent behavior across different Python versions by enforcing Python 3-like behavior in Python 2.

The decomposition module includes plots built specifically for scikit-learn estimators that are used for dimensionality reduction e.g. PCA. You can use your own estimators, but these plots assume specific properties shared by scikit-learn estimators. The specific requirements are documented per function.

User guide. See the Decomposition section for further details.

plot_pca_component_variance

Plots PCA components' explained variance ratios.

plot_pca_2d_projection

Plots the 2-dimensional projection of PCA on a given dataset.