File: deb_tests_lower_precision

package info (click to toggle)
scikit-learn 0.18-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 71,040 kB
  • ctags: 91,142
  • sloc: python: 97,257; ansic: 8,360; cpp: 5,649; makefile: 242; sh: 238
file content (11 lines) | stat: -rw-r--r-- 612 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
--- a/sklearn/feature_selection/tests/test_from_model.py
+++ b/sklearn/feature_selection/tests/test_from_model.py
@@ -92,7 +92,7 @@ def test_feature_importances():
     importances = transformer.estimator_.feature_importances_
     transformer.fit(X, y, sample_weight=3 * sample_weight)
     importances_bis = transformer.estimator_.feature_importances_
-    assert_almost_equal(importances, importances_bis)
+    assert_almost_equal(importances, importances_bis, decimal=4)
 
     # For the Lasso and related models, the threshold defaults to 1e-5
     transformer = SelectFromModel(estimator=Lasso(alpha=0.1))