Skip to content

Commit 0759033

Browse files
committed
FIX make test_importances pass on 32 bit linux
1 parent b9be858 commit 0759033

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sklearn/ensemble/tests/test_forest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,14 +243,14 @@ def check_importances(name, criterion, dtype, tolerance):
243243

244244
def test_importances():
245245
for dtype in (np.float64, np.float32):
246-
tolerance = 0.001
246+
tolerance = 0.01
247247
for name, criterion in product(FOREST_CLASSIFIERS,
248248
["gini", "entropy"]):
249249
yield check_importances, name, criterion, dtype, tolerance
250250

251251
for name, criterion in product(FOREST_REGRESSORS,
252252
["mse", "friedman_mse", "mae"]):
253-
tolerance = 0.01 if criterion == "mae" else 0.001
253+
tolerance = 0.05 if criterion == "mae" else 0.01
254254
yield check_importances, name, criterion, dtype, tolerance
255255

256256

sklearn/tree/tests/test_tree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def test_numerical_stability():
365365

366366
def test_importances():
367367
# Check variable importances.
368-
X, y = datasets.make_classification(n_samples=2000,
368+
X, y = datasets.make_classification(n_samples=5000,
369369
n_features=10,
370370
n_informative=3,
371371
n_redundant=0,

0 commit comments

Comments
 (0)