假设我有我的特征矩阵(rows = observation,columns = features)。 我想找到我的分类问题的最佳功能。
我正在做的是
%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);
我不完全确定它是否有意义......但所选择的特征应该与其他九个最不相关...你觉得怎么样?