Principal Component Analysis
来源:互联网 发布:用友软件需要联网吗 编辑:程序博客网 时间:2024/05/17 21:34
function [pc, score, latent, tsquare] = PCA(x);% PRINCOMP Principal Component Analysis (centered and scaled data).% [PC, SCORE, LATENT, TSQUARE] = PRINCOMP(X) takes a data matrix X and% returns the principal components in PC, the so-called Z-scores in SCORES,% the eigenvalues of the covariance matrix of X in LATENT, and Hotelling's% T-squared statistic for each data point in TSQUARE.[m,n] = size(x); % 得到矩阵的规模,m行,n列r = min(m-1,n); % max possible rank of x% 该矩阵最大的秩不能超过列数,% 也不能超过行数减1avg = mean(x); % 求每一列的均值,付给一个n维行向量centerx = (x - avg(ones(m,1),:));% x的每个元素减去该列的均值,% 使样本点集合重心与坐标原点重合[U,latent,pc] = svd(centerx./sqrt(m-1),0);% “经济型”的奇异值分解score = centerx*pc; % 得分矩阵即为原始矩阵乘主成分矩阵if nargout < 3, return; endlatent = diag(latent).^2; % 将奇异值矩阵转化为一个向量if (r<n) latent = [latent(1:r); zeros(n-r,1)]; score(:,r+1:end) = 0;endif nargout < 4, return; endtmp = sqrt(diag(1./latent(1:r)))*score(:,1:r)';tsquare = sum(tmp.*tmp)';
- Principal Component Analysis
- Principal component analysis
- Principal Component Analysis
- Principal Component Analysis
- Principal component analysis
- Principal Component Analysis
- Principal Component Analysis(PCA)
- PCA-principal component analysis
- Principal Component Analysis(PCA)
- PLA(principal component analysis ) 参考资料
- Principal component analysis in Matlab
- PCA(principal component analysis)
- PCA(Principal Component Analysis)
- General Remote Sensing Principal Component Analysis/ Transformations
- 主成分分析(Principal Component Analysis)
- 矩阵应用:PCA-Principal Component Analysis
- Study notes for Principal Component Analysis
- Coursera Machine Learning 8.2: Principal Component Analysis
- 如何使用"MySQL-Proxy"实现读写分离
- 《JAVA编程思想》学习备忘(第277页Polymorphism-1)
- if( boy.有房() and boy.有车() )
- Ubuntu系统的启动过程
- 通过分区(Partition)提升MySQL性能
- Principal Component Analysis
- SQL注入不完全思路与防注入程序
- MySQL分表实现上百万上千万记录分布存储的批量查询设计模式
- 从一则笑话分析需求的陷阱
- SQL注入不完全思路与防注入程序
- 用HSCALE实现MySQL的数据分布式存储
- 混音代码
- MySQL 分表分数据库服务器的一种方案HSCALE, 基于MySQL proxy
- MySQL的数据存储格式:按照读写比的选择