Skip to content

Commit

Permalink
* debian/tests/deb_tests_lower_precision - to lower precision of test…
Browse files Browse the repository at this point in the history
…_feature_importances to avoid FTBFS on some (BE) platforms
  • Loading branch information
yarikoptic committed Dec 22, 2015
1 parent 4b21c08 commit 2999a2f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ scikit-learn (0.17.0-3) unstable; urgency=medium
* debian/rules
- boost minimal Cython version for recythonization to 0.23.1.
Should enable back bakckports on older Debian/Ubuntus
* debian/tests/deb_tests_lower_precision
- to lower precision of test_feature_importances to avoid FTBFS on some
(BE) platforms

-- Yaroslav Halchenko <[email protected]> Mon, 21 Dec 2015 20:38:42 -0500
-- Yaroslav Halchenko <[email protected]> Mon, 21 Dec 2015 21:02:16 -0500

scikit-learn (0.17.0-2) unstable; urgency=medium

Expand Down
11 changes: 11 additions & 0 deletions debian/patches/deb_tests_lower_precision
Original file line number Diff line number Diff line change
@@ -0,0 +1,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=5)

# For the Lasso and related models, the threshold defaults to 1e-5
transformer = SelectFromModel(estimator=Lasso(alpha=0.1))
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ deb_git_revision_cmd
deb_no_plot_gallery
deb_optional_linkcode
deb_nopaypal
deb_tests_lower_precision

0 comments on commit 2999a2f

Please sign in to comment.