Clustering Principal Component Analysis Q2选2。。。手滑
Quiz
findClosestCentroids.m
temp zeros(K,1);
for i 1:size(X,1)for j 1:Ktemp(j) sum((X(i,:) - centroids(j,:)).^2); end[value,idx(i)] min(temp,[],1);
end computeCentroids.m
for i 1:Kcentro…
三角函数形式: f ( t ) = a 0 2 + ∑ n = 1 ∞ [ a n c o s ( n w t ) + b n s i n ( n w t ) ] (1) f(t)=\frac{a_0}{2}+\sum_{n=1}^\infty[~a_ncos(nwt)+b_nsin(nwt)~] \tag{1} f(t)=2a0+n=1∑∞[ ancos(nwt)+bnsin(nwt) ](1) a 0 = 2 T ∫ − π π f ( t ) …