10000 Revert "DOC Clarify what the decision function in SVM calculates (#12… · xhluca/scikit-learn@1bda05b · GitHub
[go: up one dir, main page]

Skip to content

Commit 1bda05b

Browse files
author
Xing
committed
Revert "DOC Clarify what the decision function in SVM calculates (scikit-learn#12708)"
This reverts commit 543d640.
1 parent 09ed6d7 commit 1bda05b

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

sklearn/svm/base.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def _compute_kernel(self, X):
383383
return X
384384

385385
def _decision_function(self, X):
386-
"""Evaluates the decision function for the samples in X.
386+
"""Distance of the samples X to the separating hyperplane.
387387
388388
Parameters
389389
----------
@@ -528,7 +528,7 @@ def _validate_targets(self, y):
528528
return np.asarray(y, dtype=np.float64, order='C')
529529

530530
def decision_function(self, X):
531-
"""Evaluates the decision function for the samples in X.
531+
"""Distance of the samples X to the separating hyperplane.
532532
533533
Parameters
534534
----------
@@ -540,16 +540,7 @@ def decision_function(self, X):
540540
Returns the decision function of the sample for each class
541541
in the model.
542542
If decision_function_shape='ovr', the shape is (n_samples,
85DA 543-
n_classes).
544-
545-
Notes
546-
------
547-
If decision_function_shape='ovo', the function values are proportional
548-
to the distance of the samples X to the separating hyperplane. If the
549-
exact distances are required, divide the function values by the norm of
550-
the weight vector (``coef_``). See also `this question
551-
<https://stats.stackexchange.com/questions/14876/
552-
interpreting-distance-from-hyperplane-in-svm>`_ for further details.
543+
n_classes)
553544
"""
554545
dec = self._decision_function(X)
555546
if self.decision_function_shape == 'ovr' and len(self.classes_) > 2:

0 commit comments

Comments
 (0)
0