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】
通常需要先將數(shù)據(jù)歸一化
4. Applying PCA
4.1 Reconstruction from compressed representation
4.2 Choosing the number of principal components
僅調(diào)用一次svd()函數(shù)胆胰,計(jì)算不同的k值是否滿足>=0.99恶迈,獲得合適的k參數(shù)。
4.3 Advice for applying PCA
使用正則化的方法避免過(guò)擬合,而非PCA
在已經(jīng)使用ML算法后發(fā)現(xiàn)有必要使用PCA時(shí),再使用