필터 지우기
필터 지우기

How to compute SFS(Sequential feature selection) with "multiple class" SVM?

조회 수: 4 (최근 30일)
Hsiang-Sheng Wang
Hsiang-Sheng Wang 2016년 4월 14일
답변: Nisar Ahmed 2018년 9월 20일
I can use sequentialfs function to compute the SFS with two-class SVM.(means the binary output [0 1])
below is my code:
%% x=features, y=binary response. c = cvpartition(y,'k',10); opts = statset('display','iter'); [fs,history] = sequentialfs(fun,x,y,'cv',c,'options',opts)
function err = SVM_class_fun(xTrain, yTrain, xTest, yTest) model = svmtrain(xTrain, yTrain, 'Kernel_Function', 'polynomial','polyorder',2, 'boxconstraint', 1); err = sum(svmclassify(model, xTest) ~= yTest); end
my issue is how to cumpute SFS when y is not binary.
I can't try it successfully,
help me, thanks!

답변 (1개)

Nisar Ahmed
Nisar Ahmed 2018년 9월 20일
You can use Mdl = fitcecoc(xTrain, yTrain) instead of svmtrain for model construction.

카테고리

Help CenterFile Exchange에서 Sensitivity Analysis에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by