matlab實現PCA降維

利用PCA,把二維數據降爲一維數據ide load ('ex7data1.mat'); %變成一維 K = 1; %對數據歸一化 means = mean(X); X_means = bsxfun(@minus, X, means); sigma = std(X_means); X_std = bsxfun(@rdivide, X_means, sigma); %繪製原始數據 scatter(X_
相關文章
相關標籤/搜索