Does fitcsvm downweight ||w||^2 when sample size is increased? (is margin size not scaled by 1/n?)
Show older comments
Hi,
I was looking into the specific svm plane fit for an SVM model as I was getting confusing results. I was manually comparing the fit parameters to the minimization task below (from Wikipedia) and getting confusing results. For example, total loss was >1 when in the equation below, loss could be set to 1 via w=0 and b=0.

After investigation, I realized that it seems like fitcsvm does not do the scaling by 1/n present in the minimization equation above.
Two questions:
- Is my diagnosis of this problem correct? If not, I will post some example code to show what I believe to be erroneous optimization of the SVM.
- Is there an easy way to turn this setting off, or must I modify BoxConstraint manually?
Thank you!
Accepted Answer
More Answers (0)
Categories
Find more on Get Started with 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!