From 5847006f11971ad07484612f96b64dd29e619728 Mon Sep 17 00:00:00 2001 From: Lars Buitinck Date: Sun, 5 Jan 2014 17:54:47 +0100 Subject: [PATCH] COSMIT get rid of deprecation warning in tree tests --- sklearn/tree/tests/test_tree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sklearn/tree/tests/test_tree.py b/sklearn/tree/tests/test_tree.py index b07787a066790..89cd0fe903687 100644 --- a/sklearn/tree/tests/test_tree.py +++ b/sklearn/tree/tests/test_tree.py @@ -28,7 +28,7 @@ from sklearn import datasets from sklearn.utils.fixes import bincount -from sklearn.preprocessing import balance_weights +from sklearn.preprocessing._weights import _balance_weights CLF_CRITERIONS = ("gini", "entropy") @@ -518,7 +518,7 @@ def test_unbalanced_iris(): """Check class rebalancing.""" unbalanced_X = iris.data[:125] unbalanced_y = iris.target[:125] - sample_weight = balance_weights(unbalanced_y) + sample_weight = _balance_weights(unbalanced_y) for name, TreeClassifier in CLF_TREES.items(): clf = TreeClassifier(random_state=0)