資源簡介
使用Fisher score進行特征選擇的機器學習算法
代碼片段和文件信息
function?[out]?=?fsFisher(XY)
%Fisher?Score?use?the?N?var?formulation
%???X?the?data?each?raw?is?an?instance
%???Y?the?label?in?1?2?3?...?format
numC?=?max(Y);
[~?numF]?=?size(X);
out.W?=?zeros(1numF);
%?statistic?for?classes
cIDX?=?cell(numC1);
n_i?=?zeros(numC1);
for?j?=?1:numC
????cIDX{j}?=?find(Y(:)==j);
????n_i(j)?=?length(cIDX{j});
end
%?calculate?score?for?each?features
for?i?=?1:numF
????temp1?=?0;
????temp2?=?0;
????f_i?=?X(:
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????945??2015-11-24?19:56??Fisher?Score.m
- 上一篇:matlab多因子選股代碼
- 下一篇:EWT算法
評論
共有 條評論