W in svm-rfe :
w=sigma(alpha(k)*x(k)*y(k))
In to program
w = fs_model.SVs' * fs_model.sv_coef;
Is Formula One and two are equal?????????
sigma(alpha(k)*x(k)*y(k))== fs_model.SVs' * fs_model.sv_coef;
??????????
PROGRAM:::
-----------------------------------------------------------------------------
while ~isempty(s)
X = train_data(:,s);
fs_model = svmtrain(train_label, X, sprintf('-s 0 -t %f -c %f -g %f -b 1', kernel, cost, gamma));
w = fs_model.SVs' * fs_model.sv_coef; %'
c = w.^2;
[c_minvalue, f] = min(c);
r = [s(f),r];
ind = [1:f-1, f+1:length(s)];
s = s(ind);
iter = iter + 1;
end
----------------------------------------------------------------------------