SVM classifier performance and flipping of arguments
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!