8000 MAINT: Changed default kernel of SVDD to 'linear' · scikit-learn/scikit-learn@fa716ff · GitHub
[go: up one dir, main page]

Skip to content

Commit fa716ff

Browse files
author
Nikolay Mayorov
committed
MAINT: Changed default kernel of SVDD to 'linear'
1 parent b10a401 commit fa716ff

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

sklearn/svm/classes.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,11 +1062,12 @@ class SVDD(BaseLibSVM):
10621062
Penalty parameter C in the error term.
10631063
Should be within [1/n_samples, 1].
10641064
1065-
kernel : string, optional (default='rbf')
1065+
kernel : string, optional (default='linear')
10661066
Specifies the kernel type to be used in the algorithm.
10671067
It must be one of 'linear', 'poly', 'rbf' or 'sigmoid'.
1068-
If none is given, 'rbf' will be used. Precomputed and callable
1069-
kernels are not supported.
1068+
If none is given, 'linear' will be used, note that it is different
1069+
from all other classes based on libsvm.
1070+
Precomputed and callable kernels are not supported.
10701071
10711072
degree : int, optional (default=3)
10721073
Degree of the polynomial kernel function ('poly').
@@ -1138,7 +1139,7 @@ class SVDD(BaseLibSVM):
11381139
>>> from sklearn.svm import SVDD
11391140
>>> import numpy as np
11401141
>>> X_train = np.array([[1, 1], [1, -1], [-1, 1], [-1, -1]])
1141-
>>> clf = SVDD(kernel='linear')
1142+
>>> clf = SVDD()
11421143
>>> clf.fit(X_train)
11431144
SVDD(C=1, cache_size=200, coef0=0.0, degree=3, gamma='auto',
11441145
kernel='linear', max_iter=-1, random_state=None, shrinking=True,
@@ -1147,7 +1148,7 @@ class SVDD(BaseLibSVM):
11471148
>>> clf.predict(X_test)
11481149
array([ 1., -1.])
11491150
"""
1150-
def __init__(self, kernel='rbf', degree=3, gamma='auto', coef0=0.0,
1151+
def __init__(self, kernel='linear', degree=3, gamma='auto', coef0=0.0,
11511152
tol=1e-3, C=1, shrinking=True, cache_size=200,
11521153
verbose=False, max_iter=-1, random_state=None):
11531154
super(SVDD, self).__init__(

0 commit comments

Comments
 (0)
0