[MRG] Updates to SVM User Guide#16769
Conversation
| >>> rbf_svc.kernel | ||
| 'rbf' | ||
|
|
||
| Parameters of the RBF Kernel |
|
pinging the suggested reviewers @thomasjpfan @glemaitre @qinhanmin2014 |
adrinjalali
left a comment
There was a problem hiding this comment.
Thanks @NicolasHug , love having better user guides :)
will try to review the rest tomorrow :)
| multi-class strategy, thus training n_class models. If there are only | ||
| two classes, only one model is trained:: |
There was a problem hiding this comment.
any particular reason to remove the sentence here?
There was a problem hiding this comment.
The whole section is about "multiclass classification"
Also the example below is an illustration of multiclass, not binary as the sentence suggests, so it's misleading
| :class:`LinearSVC` by the `liblinear`_ implementation is much more | ||
| efficient than its `libsvm`_-based :class:`SVC` counterpart and can |
There was a problem hiding this comment.
don't the liblinear and libsvm actually point to the right places?
doc/modules/svm.rst
Outdated
| generalization error of the classifier. | ||
|
|
||
| generalization error of the classifier. The figure below shows the decision | ||
| function for a separable problem, with three samples within the margin |
There was a problem hiding this comment.
| function for a separable problem, with three samples within the margin | |
| function for a linearly separable problem, with three samples on the margin |
maybe?
There was a problem hiding this comment.
indeed these are on the margin but in general, i.e. when classes aren't separable, the SVs are "within" the margin boundary
doc/modules/svm.rst
Outdated
| is the kernel. The terms :math:`\alpha_i` are called the dual coefficients. | ||
| This dual representation highlights the fact that training vectors are | ||
| implicitly mapped into a higher (maybe infinite) | ||
| dimensional space by the function :math:`\phi`. |
There was a problem hiding this comment.
It's really tricky to explain why the dual highlights this fact. Hmm
There was a problem hiding this comment.
"tricky"
I see what you did there.
(all jokes aside yeah, we can't really explain that unless we explain the kernel trick. I'll add a link to https://en.wikipedia.org/wiki/Kernel_method which is reasonably good)
doc/modules/svm.rst
Outdated
| While SVM models derived from `libsvm`_ and `liblinear`_ use ``C`` as | ||
| While SVM models derived from `libsvm` and `liblinear` use ``C`` as |
Co-Authored-By: Adrin Jalali <adrin.jalali@gmail.com>
NicolasHug
left a comment
There was a problem hiding this comment.
Thanks for the fast review!
| multi-class strategy, thus training n_class models. If there are only | ||
| two classes, only one model is trained:: |
There was a problem hiding this comment.
The whole section is about "multiclass classification"
Also the example below is an illustration of multiclass, not binary as the sentence suggests, so it's misleading
doc/modules/svm.rst
Outdated
| generalization error of the classifier. | ||
|
|
||
| generalization error of the classifier. The figure below shows the decision | ||
| function for a separable problem, with three samples within the margin |
There was a problem hiding this comment.
indeed these are on the margin but in general, i.e. when classes aren't separable, the SVs are "within" the margin boundary
doc/modules/svm.rst
Outdated
| is the kernel. The terms :math:`\alpha_i` are called the dual coefficients. | ||
| This dual representation highlights the fact that training vectors are | ||
| implicitly mapped into a higher (maybe infinite) | ||
| dimensional space by the function :math:`\phi`. |
There was a problem hiding this comment.
"tricky"
I see what you did there.
(all jokes aside yeah, we can't really explain that unless we explain the kernel trick. I'll add a link to https://en.wikipedia.org/wiki/Kernel_method which is reasonably good)
thomasjpfan
left a comment
There was a problem hiding this comment.
Changing the notation from rho to b and including scaling in the examples are great.
Minor comments, otherwise LGTM.
| (maybe infinite) dimensional space by the function :math:`\phi`. | ||
|
|
||
| The decision function is: | ||
| The prediction is: |
There was a problem hiding this comment.
But it is the prediction is the sign of this, isn't it?
There was a problem hiding this comment.
That's for regression (I did fix it for classification)
* WIP * WIP * Updates to the math section * so apparently crammer-singer isn't consistent (http://www.cs.columbia.edu/\~rocco/papers/icml13.html) * reorganized example links and described pictures * Added references * more refs * Added scaler to docstring examples * doc about dual coefs * WIP * note about shrinking and gram matrix * ellipsis * ellipsis again * maybe fixed doc issue * details for regression * training error -> margin error * Apply suggestions from code review Co-Authored-By: Adrin Jalali <adrin.jalali@gmail.com> * put back links + addressed rest of comments * small detail about margin boundaries and SVs * Addressed comments from Thomas and Adrin Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
tolandmax_iterthough (seems really libsvm-specific).