PCA降维代码---MATLAB我要分享

PCA reduced-order code---MATLAB

matlab pca 代码

关注次数: 323

下载次数: 0

文件大小: 1.41 kB

代码分类: 其他

开发平台: matlab

下载需要积分: 2积分

版权声明:如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

代码描述

中文说明:可用于M*N大数据降维,里面步骤很清新哦···程序说明:y = pca(mixedsig),程序中mixedsig为 n*T 阶混合数据矩阵,n为信号个数,T为采样点数, y为 m*T 阶主分量矩阵。程序设计步骤:1、取均值2、计算协方差矩阵及其特征值和特征向量3、计算协方差矩阵的特征值大于阈值的个数4、降序排列特征值5、去掉较小的特征值6、去掉较大的特征值(一般没有这一步)7、合并选择的特征值8、选择相应的特征值和特征向量9、计算白化矩阵10、提取主分量


English Description:

Program description: y = PCA (mixedsig), mixedsig is n * t order mixed data matrix, n is the number of signals, t is the number of sampling points, y is m * t order principal component matrix. The program design steps are as follows: 1. Take the mean value; 2. Calculate the covariance matrix and its eigenvalues and eigenvectors; 3. Calculate the number of covariance matrix eigenvalues greater than the threshold; 4. Arrange the eigenvalues in descending order; 5. Remove the smaller eigenvalues; 6. Remove the larger eigenvalues (generally without this step); 7. Merge the selected eigenvalues; 8. Select the corresponding eigenvalues and eigenvectors; 9. Calculate the whitening matrix; 10 Extracting principal component


代码预览