Unsupervised dimensionality reduction

فهرست فصل‌ها دانلود آرشیوناشر

scikit-learn Docs · نسخهٔ 5e9184e53cd3 · BSD-3-Clause

=====================================

Unsupervised dimensionality reduction

If your number of features is high, it may be useful to reduce it with an unsupervised step prior to supervised steps. Many of the unsupervised-learning methods implement a `transform` method that can be used to reduce the dimensionality. Below we discuss two specific examples of this pattern that are heavily used.

The unsupervised data reduction and the supervised estimator can be chained in one step. See pipeline.

PCA: principal component analysis

decomposition.PCA looks for a combination of features that capture well the variance of the original features. See decompositions.

  • sphx_glr_auto_examples_applications_plot_face_recognition.py

Random projections

The module: ~sklearn.random_projection provides several tools for data reduction by random projections. See the relevant section of the documentation: random_projection.

  • sphx_glr_auto_examples_miscellaneous_plot_johnson_lindenstrauss_bound.py

Feature agglomeration

cluster.FeatureAgglomeration applies hierarchical_clustering to group together features that behave similarly.

  • sphx_glr_auto_examples_cluster_plot_feature_agglomeration_vs_univariate_selection.py
  • sphx_glr_auto_examples_cluster_plot_digits_agglomeration.py

Note that if features have very different scaling or statistical properties, cluster.FeatureAgglomeration may not be able to capture the links between related features. Using a preprocessing.StandardScaler can be useful in these settings.