多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 4.4. 无监督降维 校验者: [@程威](https://github.com/apachecn/scikit-learn-doc-zh) 翻译者: [@十四号](https://github.com/apachecn/scikit-learn-doc-zh) 如果你的特征数量很多, 在监督步骤之前, 可以通过无监督的步骤来减少特征. 很多的 [无监督学习](../unsupervised_learning.html#unsupervised-learning) 方法实现了一个名为 `transform` 的方法, 它可以用来降低维度. 下面我们将讨论大量使用这种模式的两个具体示例. ## 4.4.1. PCA: 主成份分析 [`decomposition.PCA`](generated/sklearn.decomposition.PCA.html#sklearn.decomposition.PCA "sklearn.decomposition.PCA") 寻找能够捕捉原始特征的差异的特征的组合. 请参阅 [分解成分中的信号(矩阵分解问题)](decomposition.html#decompositions). **示例** - ref:‘sphx\_glr\_auto\_examples\_applications\_plot\_face\_recognition.py’ ## 4.4.2. 随机投影 模块: `random_projection` 提供了几种用于通过随机投影减少数据的工具. 请参阅文档的相关部分: [随机投影](random_projection.html#random-projection). **示例** - [The Johnson-Lindenstrauss bound for embedding with random projections](../auto_examples/plot_johnson_lindenstrauss_bound.html#sphx-glr-auto-examples-plot-johnson-lindenstrauss-bound-py) ## 4.4.3. 特征聚集 [`cluster.FeatureAgglomeration`](generated/sklearn.cluster.FeatureAgglomeration.html#sklearn.cluster.FeatureAgglomeration "sklearn.cluster.FeatureAgglomeration") 应用 [层次聚类](clustering.html#hierarchical-clustering) 将行为类似的特征分组在一起. **示例** - [Feature agglomeration vs. univariate selection](../auto_examples/cluster/plot_feature_agglomeration_vs_univariate_selection.html#sphx-glr-auto-examples-cluster-plot-feature-agglomeration-vs-univariate-selection-py) - [Feature agglomeration](../auto_examples/cluster/plot_digits_agglomeration.html#sphx-glr-auto-examples-cluster-plot-digits-agglomeration-py) **特征缩放** 请注意,如果功能具有明显不同的缩放或统计属性,则 [`cluster.FeatureAgglomeration`](generated/sklearn.cluster.FeatureAgglomeration.html#sklearn.cluster.FeatureAgglomeration "sklearn.cluster.FeatureAgglomeration")可能无法捕获相关特征之间的关系.使用一个 [`preprocessing.StandardScaler`](generated/sklearn.preprocessing.StandardScaler.html#sklearn.preprocessing.StandardScaler "sklearn.preprocessing.StandardScaler") 可以在这些 设置中使用.