Skip to content

Commit

Permalink
Include LinearSV{C, R} in models that support sample_weights
Browse files Browse the repository at this point in the history
With the latest release of sklearn, we have merged scikit-learn#15038
which officially adds support for sample weights to these models. Let's update the docs to reflect this.
  • Loading branch information
samj1912 committed Dec 12, 2019
1 parent 6c58288 commit f3ecaf5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions doc/modules/svm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,11 @@ that sets the parameter ``C`` of class ``class_label`` to ``C * value``.
:scale: 75


:class:`SVC`, :class:`NuSVC`, :class:`SVR`, :class:`NuSVR` and
:class:`OneClassSVM` implement also weights for individual samples in method
``fit`` through keyword ``sample_weight``. Similar to ``class_weight``, these
set the parameter ``C`` for the i-th example to ``C * sample_weight[i]``.
:class:`SVC`, :class:`NuSVC`, :class:`SVR`, :class:`NuSVR`, :class:`LinearSVC`,
:class:`LinearSVR` and :class:`OneClassSVM` implement also weights for
individual samples in method ``fit`` through keyword ``sample_weight``. Similar
to ``class_weight``, these set the parameter ``C`` for the i-th example to
``C * sample_weight[i]``.


.. figure:: ../auto_examples/svm/images/sphx_glr_plot_weighted_samples_001.png
Expand Down

0 comments on commit f3ecaf5

Please sign in to comment.