SVM classifier performance and flipping of arguments
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!