8000 DOC svm add callable as accepted type for kernel parameter (#21675) · scikit-learn/scikit-learn@51174b7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 51174b7

Browse files
authored
DOC svm add callable as accepted type for kernel parameter (#21675)
1 parent 3766232 commit 51174b7

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

sklearn/svm/_classes.py

+10-15
Original file line numberDiff line numberDiff line change
@@ -538,10 +538,9 @@ class SVC(BaseSVC):
538538
inversely proportional to C. Must be strictly positive. The penalty
539539
is a squared l2 penalty.
540540
541-
kernel : {'linear', 'poly', 'rbf', 'sigmoid', 'precomputed'}, default='rbf'
541+
kernel : {'linear', 'poly', 'rbf', 'sigmoid', 'precomputed'} or callable, \
542+
default='rbf'
542543
Specifies the kernel type to be used in the algorithm.
543-
It must be one of 'linear', 'poly', 'rbf', 'sigmoid', 'precomputed' or
544-
a callable.
545544
If none is given, 'rbf' will be used. If a callable is given it is
546545
used to pre-compute the kernel matrix from data matrices; that matrix
547546
should be an array of shape ``(n_samples, n_samples)``.
@@ -802,10 +801,9 @@ class NuSVC(BaseSVC):
802801
<nu_svc>`) and a lower bound of the fraction of support vectors.
803802
Should be in the interval (0, 1].
804803
805-
kernel : {'linear', 'poly', 'rbf', 'sigmoid', 'precomputed'}, default='rbf'
804+
kernel : {'linear', 'poly', 'rbf', 'sigmoid', 'precomputed'} or callable, \
805+
default='rbf'
806806
Specifies the kernel type to be used in the algorithm.
807-
It must be one of 'linear', 'poly', 'rbf', 'sigmoid', 'precomputed' or
808-
a callable.
809807
If none is given, 'rbf' will be used. If a callable is given it is
810808
used to precompute the kernel matrix.
811809
@@ -1067,10 +1065,9 @@ class SVR(RegressorMixin, BaseLibSVM):
10671065
10681066
Parameters
10691067
----------
1070-
kernel : {'linear', 'poly', 'rbf', 'sigmoid', 'precomputed'}, default='rbf'
1068+
kernel : {'linear', 'poly', 'rbf', 'sigmoid', 'precomputed'} or callable, \
1069+
default='rbf'
10711070
Specifies the kernel type to be used in the algorithm.
1072-
It must be one of 'linear', 'poly', 'rbf', 'sigmoid', 'precomputed' or
1073-
a callable.
10741071
If none is given, 'rbf' will be used. If a callable is given it is
10751072
used to precompute the kernel matrix.
10761073
@@ -1271,10 +1268,9 @@ class NuSVR(RegressorMixin, BaseLibSVM):
12711268
C : float, default=1.0
12721269
Penalty parameter C of the error term.
12731270
1274-
kernel : {'linear', 'poly', 'rbf', 'sigmoid', 'precomputed'}, default='rbf'
1271+
kernel : {'linear', 'poly', 'rbf', 'sigmoid', 'precomputed'} or callable, \
1272+
default='rbf'
12751273
Specifies the kernel type to be used in the algorithm.
1276-
It must be one of 'linear', 'poly', 'rbf', 'sigmoid', 'precomputed' or
1277-
a callable.
12781274
If none is given, 'rbf' will be used. If a callable is given it is
12791275
used to precompute the kernel matrix.
12801276
@@ -1454,10 +1450,9 @@ class OneClassSVM(OutlierMixin, BaseLibSVM):
14541450
14551451
Parameters
14561452
----------
1457-
kernel : {'linear', 'poly', 'rbf', 'sigmoid', 'precomputed'}, default='rbf'
1453+
kernel : {'linear', 'poly', 'rbf', 'sigmoid', 'precomputed'} or callable, \
1454+
default='rbf'
14581455
Specifies the kernel type to be used in the algorithm.
1459-
It must be one of 'linear', 'poly', 'rbf', 'sigmoid', 'precomputed' or
1460-
a callable.
14611456
If none is given, 'rbf' will be used. If a callable is given it is
14621457
used to precompute the kernel matrix.
14631458

0 commit comments

Comments
 (0)
0