假设有一个矩阵B,其大小为a 500*1000 double(这里,500代表观察1000的数量并代表特征的数量).
sigma是协方差矩阵B,D是一个对角矩阵,其对角元素是特征值sigma.假设A是协方差矩阵的特征向量sigma.
我有以下问题:
我需要选择k = 800对应于具有最大幅度的特征值的第一个特征向量来对所选特征进行排序.最终的矩阵命名Aq.我怎样才能在MATLAB中做到这一点?
这些选定的特征向量是什么意思?
看来最终的矩阵的大小Aq是1000*800 double有一次我计算Aq.时间点/观察信息500已经消失.对于最终的矩阵Aq,什么是价值1000矩阵Aq现在代表什么呢?此外,800矩阵中的值Aq现在代表什么?
以下两个功能有什么区别?
prepTransform.m
function [mu trmx] = prepTransform(tvec, comp_count)
% Computes transformation matrix to PCA space
% tvec - training set (one row represents one sample)
% comp_count - count of principal components in the final space
% mu - mean value of the training set
% trmx - transformation matrix to comp_count-dimensional PCA space
% this is memory-hungry version
% commented out is the version proper for Win32 environment
tic;
mu = mean(tvec);
cmx = cov(tvec);
%cmx = zeros(size(tvec,2));
%f1 …Run Code Online (Sandbox Code Playgroud)