假设我有我的特征矩阵(行 = 观察,列 = 特征)。我想为我的分类问题找到最好的特征。
我正在做的是
%feature matrix
X=rand(10)
%find the correlation matrix of X
r = corr(X)
%sum the r coefficients over the columns
%(I know that it's not the best way to do this) :)
for i=1:size(r,2)
vectorsum(i) = sum(r(:,i));
end
%find the feature that is less correlated with the others
bestfeature = min(vectorsum);
我不完全确定这是否有意义....但是选择的特征应该与其他九个特征的相关性最小...你怎么看?