Dimensionality Reduction

--Hands-on Machine Learning with Scikit-Learn and TensorFlow -Chapter 8



Introduction

  1. 降维 pros:有助于加快训练速度;有助于数据可视化。cons:可能会导致重要信息丢失。
  2. Two main approaches to dimensionality:projection and manifold learning
  3. Three popular dimensionality reduction techniques:PCA,Kernel PCA, and LLE

Two main approaches for Dimensionalty Reduction

  1. Projection 在实际问题当中,训练数据通常是非均匀的分布在整个维度里面。有很多特征是连续的,但是有一些特征非常相似。结果这些训练数据在低纬度空间中挨得非常近。
  2. Manifold Learning (流形学习)


PCA(Principal Component Analysis)

  1. pca是迄今为止最流行的降维算法。首先定义一个超平面,然后将数据投影到上面去。
  2. pca降维应当注意点地方:
  3. 2.1 preserving the variance

    2.2 the axis minimizes the mean squared distance between the original dataset and projection onto the axis

3. Principal Components:PCA identifies the axis that accounts for the largest amount of variance in the training set.

the unit vector that defines the i(th) axis is called i(th) principal component.

如何找到训练数据的主成分?Singular Value Decomposition(SVD)

PAC默认数据集是以愿数据为中心的。Sklearn 的pca 包已经将数据集中化处理了。而用其他方法构造pca时候,不要忘记首先集中化处理数据。(centering the data)

在降维的时候,一定要尽可能的保证更大的方差。

from sklearn.decomposition import PCA

pca=PCA(n_components=2)
X2D=pcd.fit_transform(X)pca.explained_variance_ratio_

选择合适的维数

原文地址:https://www.cnblogs.com/makino/p/9626871.html

时间: 2024-08-01 01:10:07

Dimensionality Reduction的相关文章

dimensionality reduction动机---data compression

data compression可以使数据占用更少的空间,并且能使算法提速 什么是dimensionality reduction(维数约简)    例1:比如说我们有一些数据,它有很多很多的features,取其中的两个features,如上图所示,一个为物体的长度用cm来度量的,一个也是物体的长度是用inches来度量的,显然这两上features是相关的,画到上图中,近似于一条直线,之所以点不在一条直线上,是因为我们在对物体测量长度是会取整(对cm进行取整,对inches进行取整),这样的

Machine Learning - XIV. Dimensionality Reduction降维

http://blog.csdn.net/pipisorry/article/details/44705051 机器学习Machine Learning - Andrew NG courses学习笔记 Dimensionality Reduction降维 Motivation Data Compression数据压缩 Motivation Visualization可视化 Principal Component Analysis Problem Formulation主成分分析问题的构想 Pri

Stanford机器学习笔记-10. 降维(Dimensionality Reduction)

10. Dimensionality Reduction Content  10. Dimensionality Reduction 10.1 Motivation 10.1.1 Motivation one: Data Compression 10.2.2 Motivation two: Visualization 10.2 Principal Component Analysis 10.2.1 Problem formulation 10.2.2 Principal Component An

可视化MNIST之降维探索Visualizing MNIST: An Exploration of Dimensionality Reduction

At some fundamental level, no one understands machine learning. It isn’t a matter of things being too complicated. Almost everything we do is fundamentally very simple. Unfortunately, an innate human handicap interferes with us understanding these si

scikit-learn:4.4. Unsupervised dimensionality reduction(降维)

参考:http://scikit-learn.org/stable/modules/unsupervised_reduction.html 对于高维features,常常需要在supervised之前unsupervised dimensionality reduction. 下面三节的翻译会在之后附上. 4.4.1. PCA: principal component analysis decomposition.PCA looks for a combination of features t

Seven Techniques for Data Dimensionality Reduction

Seven Techniques for Data Dimensionality Reduction Seven Techniques for Data Dimensionality Reduction 12 May, 2015 - 12:38 — rs The recent explosion of data set size, in number of records and attributes, has triggered the development of a number of b

单细胞数据高级分析之初步降维和聚类 | Dimensionality reduction | Clustering

Dimensionality reduction. Throughout the manuscript we use diffusion maps, a non-linear dimensionality reduction technique37. We calculate a cell-to-cell distance matrix using 1 - Pearson correlation and use the diffuse function of the diffusionMap R

数据降维(Dimensionality reduction)

数据降维(Dimensionality reduction) 应用范围 无监督学习 图片压缩(需要的时候在还原回来) 数据压缩 数据可视化 数据压缩(Data Compression) 将高维的数据转变为低维的数据, 这样我们存储数据的矩阵的列就减少了, 那么我们需要存储的数据就减少了 数据可视化 数据可视化是非常重要的, 通过可视化数据可以发现数据的规律, 但是大多数时候我们到的数据是高维度的, 可视化很困难, 采用数据降维可以将数据降到二维进行数据可视化 加快机器学习算法的速度 维度少了程序

Ng第十四课:降维(Dimensionality Reduction)

14.1  动机一:数据压缩 14.2  动机二:数据可视化 14.3  主成分分析问题 14.4  主成分分析算法 14.5  选择主成分的数量 14.6  重建的压缩表示 14.7  主成分分析法的应用建议 14.1  动机一:数据压缩 14.2  动机二:数据可视化 14.3  主成分分析问题 14.4  主成分分析算法 14.5  选择主成分的数量 14.6  重建的压缩表示 14.7  主成分分析法的应用建议