@@ -1848,14 +1848,15 @@ class SVDD(OutlierMixin, BaseLibSVM):
1848
1848
1849
1849
degree : int, default=3
1850
1850
Degree of the polynomial kernel function ('poly').
1851
- Ignored by all other kernels.
1851
+ Must be non-negative. Ignored by all other kernels.
1852
1852
1853
1853
gamma : {'scale', 'auto'} or float, default='scale'
1854
1854
Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
1855
1855
1856
1856
- if ``gamma='scale'`` (default) is passed then it uses
1857
1857
1 / (n_features * X.var()) as value of gamma,
1858
1858
- if 'auto', uses 1 / n_features.
1859
+ - if float, must be non-negative.
1859
1860
1860
1861
coef0 : float, default=0.0
1861
1862
Independent term in kernel function.
@@ -1933,9 +1934,9 @@ class SVDD(OutlierMixin, BaseLibSVM):
1933
1934
1934
1935
See Also
1935
1936
--------
1936
- OneClassSVM : Support vector method for outlier detection via a separating
1937
- soft-margin hyperplane implemented with libsvm with a parameter to
1938
- control the number of support vectors.
1937
+ sklearn.svm. OneClassSVM : Support vector method for outlier detection via
1938
+ a separating soft-margin hyperplane implemented with libsvm with
1939
+ a parameter to control the number of support vectors.
1939
1940
1940
1941
References
1941
1942
----------
@@ -1961,6 +1962,10 @@ class SVDD(OutlierMixin, BaseLibSVM):
1961
1962
1962
1963
_impl = "svdd_l1"
1963
1964
1965
+ _parameter_constraints = {** BaseLibSVM ._parameter_constraints } # type: ignore
1966
+ for unused_param in ["C" , "class_weight" , "epsilon" , "probability" , "random_state" ]:
1967
+ _parameter_constraints .pop (unused_param )
1968
+
1964
1969
def __init__ (
1965
1970
self ,
1966
1971
* ,
@@ -1994,7 +1999,7 @@ def __init__(
1994
1999
random_state = None ,
1995
2000
)
1996
2001
1997
- def fit (self , X , y = None , sample_weight = None , ** params ):
2002
+ def fit (self , X , y = None , sample_weight = None ):
1998
2003
"""Learn a soft minimum-volume hypersphere around the sample X.
1999
2004
2000
2005
Parameters
@@ -2010,14 +2015,6 @@ def fit(self, X, y=None, sample_weight=None, **params):
2010
2015
Per-sample weights. Rescale C per sample. Higher weights
2011
2016
force the classifier to put more emphasis on these points.
2012
2017
2013
- **params : dict
2014
- Additional fit parameters.
2015
-
2016
- .. deprecated:: 1.0
2017
- The `fit` method will not longer accept extra keyword
2018
- parameters in 1.2. These keyword parameters were
2019
- already discarded.
2020
-
2021
2018
Returns
2022
2019
-------
2023
2020
self : object
0 commit comments