@@ -71,7 +71,7 @@ def test_classification():
7171                           Perceptron (tol = 1e-3 ),
7272                           DecisionTreeClassifier (),
7373                           KNeighborsClassifier (),
74-                            SVC (gamma = "scale" )]:
74+                            SVC ()]:
7575        for  params  in  grid :
7676            BaggingClassifier (base_estimator = base_estimator ,
7777                              random_state = rng ,
@@ -117,17 +117,15 @@ def fit(self, X, y):
117117            for  f  in  ['predict' , 'predict_proba' , 'predict_log_proba' , 'decision_function' ]:
118118                # Trained on sparse format 
119119                sparse_classifier  =  BaggingClassifier (
120-                     base_estimator = CustomSVC (gamma = 'scale' ,
121-                                              decision_function_shape = 'ovr' ),
120+                     base_estimator = CustomSVC (decision_function_shape = 'ovr' ),
122121                    random_state = 1 ,
123122                    ** params 
124123                ).fit (X_train_sparse , y_train )
125124                sparse_results  =  getattr (sparse_classifier , f )(X_test_sparse )
126125
127126                # Trained on dense format 
128127                dense_classifier  =  BaggingClassifier (
129-                     base_estimator = CustomSVC (gamma = 'scale' ,
130-                                              decision_function_shape = 'ovr' ),
128+                     base_estimator = CustomSVC (decision_function_shape = 'ovr' ),
131129                    random_state = 1 ,
132130                    ** params 
133131                ).fit (X_train , y_train )
@@ -155,7 +153,7 @@ def test_regression():
155153                           DummyRegressor (),
156154                           DecisionTreeRegressor (),
157155                           KNeighborsRegressor (),
158-                            SVR (gamma = 'scale' )]:
156+                            SVR ()]:
159157        for  params  in  grid :
160158            BaggingRegressor (base_estimator = base_estimator ,
161159                             random_state = rng ,
@@ -201,15 +199,15 @@ def fit(self, X, y):
201199
202200            # Trained on sparse format 
203201            sparse_classifier  =  BaggingRegressor (
204-                 base_estimator = CustomSVR (gamma = 'scale' ),
202+                 base_estimator = CustomSVR (),
205203                random_state = 1 ,
206204                ** params 
207205            ).fit (X_train_sparse , y_train )
208206            sparse_results  =  sparse_classifier .predict (X_test_sparse )
209207
210208            # Trained on dense format 
211209            dense_results  =  BaggingRegressor (
212-                 base_estimator = CustomSVR (gamma = 'scale' ),
210+                 base_estimator = CustomSVR (),
213211                random_state = 1 ,
214212                ** params 
215213            ).fit (X_train , y_train ).predict (X_test )
@@ -334,7 +332,7 @@ def test_oob_score_classification():
334332                                                        iris .target ,
335333                                                        random_state = rng )
336334
337-     for  base_estimator  in  [DecisionTreeClassifier (), SVC (gamma = "scale" )]:
335+     for  base_estimator  in  [DecisionTreeClassifier (), SVC ()]:
338336        clf  =  BaggingClassifier (base_estimator = base_estimator ,
339337                                n_estimators = 100 ,
340338                                bootstrap = True ,
@@ -464,8 +462,7 @@ def test_parallel_classification():
464462    assert_array_almost_equal (y1 , y3 )
465463
466464    # decision_function 
467-     ensemble  =  BaggingClassifier (SVC (gamma = 'scale' ,
468-                                      decision_function_shape = 'ovr' ),
465+     ensemble  =  BaggingClassifier (SVC (decision_function_shape = 'ovr' ),
469466                                 n_jobs = 3 ,
470467                                 random_state = 0 ).fit (X_train , y_train )
471468
@@ -482,8 +479,7 @@ def test_parallel_classification():
482479                         "" .format (X_test .shape [1 ], X_err .shape [1 ]),
483480                         ensemble .decision_function , X_err )
484481
485-     ensemble  =  BaggingClassifier (SVC (gamma = 'scale' ,
486-                                      decision_function_shape = 'ovr' ),
482+     ensemble  =  BaggingClassifier (SVC (decision_function_shape = 'ovr' ),
487483                                 n_jobs = 1 ,
488484                                 random_state = 0 ).fit (X_train , y_train )
489485
@@ -529,7 +525,7 @@ def test_gridsearch():
529525    parameters  =  {'n_estimators' : (1 , 2 ),
530526                  'base_estimator__C' : (1 , 2 )}
531527
532-     GridSearchCV (BaggingClassifier (SVC (gamma = "scale" )),
528+     GridSearchCV (BaggingClassifier (SVC ()),
533529                 parameters ,
534530                 scoring = "roc_auc" ).fit (X , y )
535531
@@ -578,7 +574,7 @@ def test_base_estimator():
578574
579575    assert  isinstance (ensemble .base_estimator_ , DecisionTreeRegressor )
580576
581-     ensemble  =  BaggingRegressor (SVR (gamma = 'scale' ),
577+     ensemble  =  BaggingRegressor (SVR (),
582578                                n_jobs = 3 ,
583579                                random_state = 0 ).fit (X_train , y_train )
584580    assert  isinstance (ensemble .base_estimator_ , SVR )
0 commit comments