Machine Learning - Week 8 : Unsupervised Learning&Dimensionality Reduction(k-means & PCA)
Ubuntu16.04.1上安装Octave4.0.2
Unsupervised Learning
1. Clustering
1.1 K-means algorithm


1.2 Optimization objective


1.3 Random Initialization
Make K-means avoid local optima——multiple random initializations


1.4 Choosing the number of clusters【k】——Elbow method


Dimensionality Reduction
2. Motivation
2.1 Motivation 1: Data Compression
For example: 2D -> 1D, 3D -> 2D
2.2 Motivation 2: Data Visualization
ND -> 2/3D can visualize it (N >= 2/3).
3. Principal Component Analysis【PCA】
通常需要先将数据归一化





4. Applying PCA
4.1 Reconstruction from compressed representation

4.2 Choosing the number of principal components

仅调用一次svd()函数,计算不同的k值是否满足>=0.99,获得合适的k参数。


4.3 Advice for applying PCA

使用正则化的方法避免过拟合,而非PCA

在已经使用ML算法后发现有必要使用PCA时,再使用

网友评论