SVM classifier performance and flipping of arguments

1 回表示 (過去 30 日間)
Tahir
Tahir 2015 年 5 月 9 日
Hi, I want to calculate the performance of SVM...i follow a very useful post of this forum.. SVM classifer
Here in the last there is an argument f..i have a question about that..what this argument means?? is it necessary to flip it? What is the benefit of this flipping. here is the code...Kindly tell me about the fliping of f .
shift = svm.ScaleData.shift;
scale = svm.ScaleData.scaleFactor;
Xnew = bsxfun(@plus,Xnew,shift);
Xnew = bsxfun(@times,Xnew,scale);
sv = svm.SupportVectors;
alphaHat = svm.Alpha;
bias = svm.Bias;
kfun = svm.KernelFunction;
kfunargs = svm.KernelFunctionArgs;
f = kfun(sv,Xnew,kfunargs{:})'*alphaHat(:) + bias;
f = -f; % flip the sign to get the score for the +1 class

回答 (0 件)

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by