无监督学习
1.1.1 Finding closest centroids
1 | v = []; |
The
1.1.2 Computing centroid means
$$\mu k := \dfrac{1}{\left | C_k \right |}\sum{i\in C_k}^{ }x^{(i)}$$
1 | for i = 1:K |

2.2 Implementing PCA
1 | sigma = X'*X/m; |
2.3.1 Projecting the data onto the principal components
1 | Z = X * U; |
2.3.2 Reconstructing an approximation of the data
1 | X_rec = Z * U(:,1:K)'; |

