@@ -163,6 +163,8 @@ def test_contamination():
163
163
assert_raises (ValueError , clf .fit , X )
164
164
165
165
166
+ @ignore_warnings (category = DeprecationWarning )
167
+ # contamination changed to 'auto' 0.22
166
168
def test_novelty_errors ():
167
169
X = iris .data
168
170
@@ -180,6 +182,8 @@ def test_novelty_errors():
180
182
assert_raises_regex (AttributeError , msg , getattr , clf , 'fit_predict' )
181
183
182
184
185
+ @ignore_warnings (category = DeprecationWarning )
186
+ # contamination changed to 'auto' 0.22
183
187
def test_novelty_training_scores ():
184
188
# check that the scores of the training samples are still accessible
185
189
# when novelty=True through the negative_outlier_factor_ attribute
@@ -198,6 +202,8 @@ def test_novelty_training_scores():
198
202
assert_array_almost_equal (scores_1 , scores_2 )
199
203
200
204
205
+ @ignore_warnings (category = DeprecationWarning )
206
+ # contamination changed to 'auto' 0.22
201
207
def test_hasattr_prediction ():
202
208
# check availability of prediction methods depending on novelty value.
203
209
X = [[1 , 1 ], [1 , 2 ], [2 , 1 ]]
@@ -219,6 +225,8 @@ def test_hasattr_prediction():
219
225
assert not hasattr (clf , 'score_samples' )
220
226
221
227
228
+ @ignore_warnings (category = DeprecationWarning )
229
+ # contamination changed to 'auto' 0.22
222
230
def test_novelty_true_common_tests ():
223
231
# the common tests are run for the default LOF (novelty=False).
224
232
# here we run these common tests for LOF when novelty=True
0 commit comments