@@ -411,9 +411,9 @@ class SVC(BaseSVC):
411411 Degree of the polynomial kernel function ('poly').
412412 Ignored by all other kernels.
413413
414- gamma : float, optional (default=0.0 )
414+ gamma : float, optional (default='auto' )
415415 Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
416- If gamma is 0.0 then 1/n_features will be used instead.
416+ If gamma is 'auto' then 1/n_features will be used instead.
417417
418418 coef0 : float, optional (default=0.0)
419419 Independent term in kernel function.
@@ -489,7 +489,7 @@ class SVC(BaseSVC):
489489 >>> clf = SVC()
490490 >>> clf.fit(X, y) #doctest: +NORMALIZE_WHITESPACE
491491 SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0, degree=3,
492- gamma=0.0 , kernel='rbf', max_iter=-1, probability=False,
492+ gamma='auto' , kernel='rbf', max_iter=-1, probability=False,
493493 random_state=None, shrinking=True, tol=0.001, verbose=False)
494494 >>> print(clf.predict([[-0.8, -1]]))
495495 [1]
@@ -506,7 +506,7 @@ class SVC(BaseSVC):
506506
507507 """
508508
509- def __init__ (self , C = 1.0 , kernel = 'rbf' , degree = 3 , gamma = 0.0 ,
509+ def __init__ (self , C = 1.0 , kernel = 'rbf' , degree = 3 , gamma = 'auto' ,
510510 coef0 = 0.0 , shrinking = True , probability = False ,
511511 tol = 1e-3 , cache_size = 200 , class_weight = None ,
512512 verbose = False , max_iter = - 1 , random_state = None ):
@@ -545,9 +545,9 @@ class NuSVC(BaseSVC):
545545 Degree of the polynomial kernel function ('poly').
546546 Ignored by all other kernels.
547547
548- gamma : float, optional (default=0.0 )
548+ gamma : float, optional (default='auto' )
549549 Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
550- If gamma is 0.0 then 1/n_features will be used instead.
550+ If gamma is 'auto' then 1/n_features will be used instead.
551551
552552 coef0 : float, optional (default=0.0)
553553 Independent term in kernel function.
@@ -614,7 +614,7 @@ class NuSVC(BaseSVC):
614614 >>> from sklearn.svm import NuSVC
615615 >>> clf = NuSVC()
616616 >>> clf.fit(X, y) #doctest: +NORMALIZE_WHITESPACE
617- NuSVC(cache_size=200, coef0=0.0, degree=3, gamma=0.0 , kernel='rbf',
617+ NuSVC(cache_size=200, coef0=0.0, degree=3, gamma='auto' , kernel='rbf',
618618 max_iter=-1, nu=0.5, probability=False, random_state=None,
619619 shrinking=True, tol=0.001, verbose=False)
620620 >>> print(clf.predict([[-0.8, -1]]))
@@ -630,7 +630,7 @@ class NuSVC(BaseSVC):
630630 liblinear.
631631 """
632632
633- def __init__ (self , nu = 0.5 , kernel = 'rbf' , degree = 3 , gamma = 0.0 ,
633+ def __init__ (self , nu = 0.5 , kernel = 'rbf' , degree = 3 , gamma = 'auto' ,
634634 coef0 = 0.0 , shrinking = True , probability = False ,
635635 tol = 1e-3 , cache_size = 200 , verbose = False , max_iter = - 1 ,
636636 random_state = None ):
@@ -671,9 +671,9 @@ class SVR(BaseLibSVM, RegressorMixin):
671671 Degree of the polynomial kernel function ('poly').
672672 Ignored by all other kernels.
673673
674- gamma : float, optional (default=0.0 )
674+ gamma : float, optional (default='auto' )
675675 Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
676- If gamma is 0.0 then 1/n_features will be used instead.
676+ If gamma is 'auto' then 1/n_features will be used instead.
677677
678678 coef0 : float, optional (default=0.0)
679679 Independent term in kernel function.
@@ -727,7 +727,7 @@ class SVR(BaseLibSVM, RegressorMixin):
727727 >>> X = np.random.randn(n_samples, n_features)
728728 >>> clf = SVR(C=1.0, epsilon=0.2)
729729 >>> clf.fit(X, y) #doctest: +NORMALIZE_WHITESPACE
730- SVR(C=1.0, cache_size=200, coef0=0.0, degree=3, epsilon=0.2, gamma=0.0 ,
730+ SVR(C=1.0, cache_size=200, coef0=0.0, degree=3, epsilon=0.2, gamma='auto' ,
731731 kernel='rbf', max_iter=-1, shrinking=True, tol=0.001, verbose=False)
732732
733733 See also
@@ -740,9 +740,9 @@ class SVR(BaseLibSVM, RegressorMixin):
740740 Scalable Linear Support Vector Machine for regression
741741 implemented using liblinear.
742742 """
743- def __init__ (self , kernel = 'rbf' , degree = 3 , gamma = 0.0 , coef0 = 0.0 , tol = 1e-3 ,
744- C = 1.0 , epsilon = 0.1 , shrinking = True , cache_size = 200 ,
745- verbose = False , max_iter = - 1 ):
743+ def __init__ (self , kernel = 'rbf' , degree = 3 , gamma = 'auto' , coef0 = 0.0 ,
744+ tol = 1e-3 , C = 1.0 , epsilon = 0.1 , shrinking = True ,
745+ cache_size = 200 , verbose = False , max_iter = - 1 ):
746746
747747 super (SVR , self ).__init__ (
748748 'epsilon_svr' , kernel = kernel , degree = degree , gamma = gamma ,
@@ -783,9 +783,9 @@ class NuSVR(BaseLibSVM, RegressorMixin):
783783 Degree of the polynomial kernel function ('poly').
784784 Ignored by all other kernels.
785785
786- gamma : float, optional (default=0.0 )
786+ gamma : float, optional (default='auto' )
787787 Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
788- If gamma is 0.0 then 1/n_features will be used instead.
788+ If gamma is 'auto' then 1/n_features will be used instead.
789789
790790 coef0 : float, optional (default=0.0)
791791 Independent term in kernel function.
@@ -839,8 +839,9 @@ class NuSVR(BaseLibSVM, RegressorMixin):
839839 >>> X = np.random.randn(n_samples, n_features)
840840 >>> clf = NuSVR(C=1.0, nu=0.1)
841841 >>> clf.fit(X, y) #doctest: +NORMALIZE_WHITESPACE
842- NuSVR(C=1.0, cache_size=200, coef0=0.0, degree=3, gamma=0.0, kernel='rbf',
843- max_iter=-1, nu=0.1, shrinking=True, tol=0.001, verbose=False)
842+ NuSVR(C=1.0, cache_size=200, coef0=0.0, degree=3, gamma='auto',
843+ kernel='rbf', max_iter=-1, nu=0.1, shrinking=True, tol=0.001,
844+ verbose=False)
844845
845846 See also
846847 --------
@@ -853,7 +854,7 @@ class NuSVR(BaseLibSVM, RegressorMixin):
853854 """
854855
855856 def __init__ (self , nu = 0.5 , C = 1.0 , kernel = 'rbf' , degree = 3 ,
856- gamma = 0.0 , coef0 = 0.0 , shrinking = True , tol = 1e-3 ,
857+ gamma = 'auto' , coef0 = 0.0 , shrinking = True , tol = 1e-3 ,
857858 cache_size = 200 , verbose = False , max_iter = - 1 ):
858859
859860 super (NuSVR , self ).__init__ (
@@ -891,9 +892,9 @@ class OneClassSVM(BaseLibSVM):
891892 Degree of the polynomial kernel function ('poly').
892893 Ignored by all other kernels.
893894
894- gamma : float, optional (default=0.0 )
895+ gamma : float, optional (default='auto' )
895896 Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
896- If gamma is 0.0 then 1/n_features will be used instead.
897+ If gamma is 'auto' then 1/n_features will be used instead.
897898
898899 coef0 : float, optional (default=0.0)
899900 Independent term in kernel function.
@@ -942,9 +943,9 @@ class OneClassSVM(BaseLibSVM):
942943 Constants in decision function.
943944
944945 """
945- def __init__ (self , kernel = 'rbf' , degree = 3 , gamma = 0.0 , coef0 = 0.0 , tol = 1e-3 ,
946- nu = 0.5 , shrinking = True , cache_size = 200 , verbose = False ,
947- max_iter = - 1 , random_state = None ):
946+ def __init__ (self , kernel = 'rbf' , degree = 3 , gamma = 'auto' , coef0 = 0.0 ,
947+ tol = 1e-3 , nu = 0.5 , shrinking = True , cache_size = 200 ,
948+ verbose = False , max_iter = - 1 , random_state = None ):
948949
949950 super (OneClassSVM , self ).__init__ (
950951 'one_class' , kernel , degree , gamma , coef0 , tol , 0. , nu , 0. ,
0 commit comments