@@ -1062,11 +1062,12 @@ class SVDD(BaseLibSVM):
1062
1062
Penalty parameter C in the error term.
1063
1063
Should be within [1/n_samples, 1].
1064
1064
1065
- kernel : string, optional (default='rbf ')
1065
+ kernel : string, optional (default='linear ')
1066
1066
Specifies the kernel type to be used in the algorithm.
1067
1067
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.
1070
1071
1071
1072
degree : int, optional (default=3)
1072
1073
Degree of the polynomial kernel function ('poly').
@@ -1138,7 +1139,7 @@ class SVDD(BaseLibSVM):
1138
1139
>>> from sklearn.svm import SVDD
1139
1140
>>> import numpy as np
1140
1141
>>> X_train = np.array([[1, 1], [1, -1], [-1, 1], [-1, -1]])
1141
- >>> clf = SVDD(kernel='linear' )
1142
+ >>> clf = SVDD()
1142
1143
>>> clf.fit(X_train)
1143
1144
SVDD(C=1, cache_size=200, coef0=0.0, degree=3, gamma='auto',
1144
1145
kernel='linear', max_iter=-1, random_state=None, shrinking=True,
@@ -1147,7 +1148,7 @@ class SVDD(BaseLibSVM):
1147
1148
>>> clf.predict(X_test)
1148
1149
array([ 1., -1.])
1149
1150
"""
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 ,
1151
1152
tol = 1e-3 , C = 1 , shrinking = True , cache_size = 200 ,
1152
1153
verbose = False , max_iter = - 1 , random_state = None ):
1153
1154
super (SVDD , self ).__init__ (
0 commit comments