@@ -66,7 +66,7 @@ def test_iforest():
66
66
67
67
@pytest .mark .filterwarnings ('ignore:default contamination' )
68
68
@pytest .mark .filterwarnings ('ignore:threshold_ attribute' )
69
- @pytest .mark .filterwarnings ('ignore:Default " behaviour"' )
69
+ @pytest .mark .filterwarnings ('ignore:behaviour="old "' )
70
70
def test_iforest_sparse ():
71
71
"""Check IForest for various parameter settings on sparse input."""
72
72
rng = check_random_state (0 )
@@ -96,7 +96,7 @@ def test_iforest_sparse():
96
96
97
97
@pytest .mark .filterwarnings ('ignore:default contamination' )
98
98
@pytest .mark .filterwarnings ('ignore:threshold_ attribute' )
99
- @pytest .mark .filterwarnings ('ignore:Default " behaviour"' )
99
+ @pytest .mark .filterwarnings ('ignore:behaviour="old "' )
100
100
def test_iforest_error ():
101
101
"""Test that it gives proper exception on deficient input."""
102
102
X = iris .data
@@ -141,7 +141,7 @@ def test_iforest_error():
141
141
142
142
143
143
@pytest .mark .filterwarnings ('ignore:default contamination' )
144
- @pytest .mark .filterwarnings ('ignore:Default " behaviour"' )
144
+ @pytest .mark .filterwarnings ('ignore:behaviour="old "' )
145
145
def test_recalculate_max_depth ():
146
146
"""Check max_depth recalculation when max_samples is reset to n_samples"""
147
147
X = iris .data
@@ -151,7 +151,7 @@ def test_recalculate_max_depth():
151
151
152
152
153
153
@pytest .mark .filterwarnings ('ignore:default contamination' )
154
- @pytest .mark .filterwarnings ('ignore:Default " behaviour"' )
154
+ @pytest .mark .filterwarnings ('ignore:behaviour="old "' )
155
155
def test_max_samples_attribute ():
156
156
X = iris .data
157
157
clf = IsolationForest ().fit (X )
@@ -169,7 +169,7 @@ def test_max_samples_attribute():
169
169
170
170
@pytest .mark .filterwarnings ('ignore:default contamination' )
171
171
@pytest .mark .filterwarnings ('ignore:threshold_ attribute' )
172
- @pytest .mark .filterwarnings ('ignore:Default " behaviour"' )
172
+ @pytest .mark .filterwarnings ('ignore:behaviour="old "' )
173
173
def test_iforest_parallel_regression ():
174
174
"""Check parallel regression."""
175
175
rng = check_random_state (0 )
@@ -195,7 +195,7 @@ def test_iforest_parallel_regression():
195
195
196
196
197
197
@pytest .mark .filterwarnings ('ignore:default contamination' )
198
- @pytest .mark .filterwarnings ('ignore:Default " behaviour"' )
198
+ @pytest .mark .filterwarnings ('ignore:behaviour="old "' )
199
199
def test_iforest_performance ():
200
200
"""Test Isolation Forest performs well"""
201
201
@@ -238,7 +238,7 @@ def test_iforest_works():
238
238
239
239
240
240
@pytest .mark .filterwarnings ('ignore:default contamination' )
241
- @pytest .mark .filterwarnings ('ignore:Default " behaviour"' )
241
+ @pytest .mark .filterwarnings ('ignore:behaviour="old "' )
242
242
def test_max_samples_consistency ():
243
243
# Make sure validated max_samples in iforest and BaseBagging are identical
244
244
X = iris .data
@@ -248,7 +248,7 @@ def test_max_samples_consistency():
248
248
249
249
@pytest .mark .filterwarnings ('ignore:default contamination' )
250
250
@pytest .mark .filterwarnings ('ignore:threshold_ attribute' )
251
- @pytest .mark .filterwarnings ('ignore:Default " behaviour"' )
251
+ @pytest .mark .filterwarnings ('ignore:behaviour="old "' )
252
252
def test_iforest_subsampled_features ():
253
253
# It tests non-regression for #5732 which failed at predict.
254
254
rng = check_random_state (0 )
@@ -274,7 +274,7 @@ def test_iforest_average_path_length():
274
274
275
275
276
276
@pytest .mark .filterwarnings ('ignore:default contamination' )
277
- @pytest .mark .filterwarnings ('ignore:Default " behaviour"' )
277
+ @pytest .mark .filterwarnings ('ignore:behaviour="old "' )
278
278
def test_score_samples ():
279
279
X_train = [[1 , 1 ], [1 , 2 ], [2 , 1 ]]
280
280
clf1 = IsolationForest (contamination = 0.1 ).fit (X_train )
@@ -288,7 +288,7 @@ def test_score_samples():
288
288
289
289
290
290
@pytest .mark .filterwarnings ('ignore:default contamination' )
291
- @pytest .mark .filterwarnings ('ignore:Default " behaviour"' )
291
+ @pytest .mark .filterwarnings ('ignore:behaviour="old "' )
292
292
def test_deprecation ():
293
293
X = [[0.0 ], [1.0 ]]
294
294
clf = IsolationForest ()
@@ -299,7 +299,7 @@ def test_deprecation():
299
299
clf .fit , X )
300
300
301
301
assert_warns_message (FutureWarning ,
302
- 'Default " behaviour" parameter will change to "new" '
302
+ 'behaviour="old" is deprecated and will be removed '
303
303
'in version 0.22' ,
304
304
clf .fit , X )
305
305
@@ -311,7 +311,7 @@ def test_deprecation():
311
311
312
312
313
313
@pytest .mark .filterwarnings ('ignore:default contamination' )
314
- @pytest .mark .filterwarnings ('ignore:Default " behaviour"' )
314
+ @pytest .mark .filterwarnings ('ignore:behaviour="old "' )
315
315
def test_behaviour_param ():
316
316
X_train = [[1 , 1 ], [1 , 2 ], [2 , 1 ]]
317
317
clf1 = IsolationForest (behaviour = 'old' ).fit (X_train )
0 commit comments