@@ -1331,34 +1331,13 @@ def test_svc_ovr_tie_breaking(SVCClass):
1331
1331
assert np .all (pred == np .argmax (dv , axis = 1 ))
1332
1332
1333
1333
1334
- def test_gamma_auto ():
1335
- X , y = [[0.0 , 1.2 ], [1.0 , 1.3 ]], [0 , 1 ]
1336
-
1337
- with pytest .warns (None ) as record :
1338
- svm .SVC (kernel = "linear" ).fit (X , y )
1339
- assert not [w .message for w in record ]
1340
-
1341
- with pytest .warns (None ) as record :
1342
- svm .SVC (kernel = "precomputed" ).fit (X , y )
1343
- assert not [w .message for w in record ]
1344
-
1345
-
1346
1334
def test_gamma_scale ():
1347
1335
X , y = [[0.0 ], [1.0 ]], [0 , 1 ]
1348
1336
1349
1337
clf = svm .SVC ()
1350
- with pytest .warns (None ) as record :
1351
- clf .fit (X , y )
1352
- assert not [w .message for w in record ]
1338
+ clf .fit (X , y )
1353
1339
assert_almost_equal (clf ._gamma , 4 )
1354
1340
1355
- # X_var ~= 1 shouldn't raise warning, for when
1356
- # gamma is not explicitly set.
1357
- X , y = [[1 , 2 ], [3 , 2 * np .sqrt (6 ) / 3 + 2 ]], [0 , 1 ]
1358
- with pytest .warns (None ) as record :
1359
- clf .fit (X , y )
1360
- assert not [w .message for w in record ]
1361
-
1362
1341
1363
1342
@pytest .mark .parametrize (
1364
1343
"SVM, params" ,
0 commit comments