8000 COSMIT get rid of deprecation warning in tree tests · jwchennlp/scikit-learn@5847006 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5847006

Browse files
committed
COSMIT get rid of deprecation warning in tree tests
1 parent b3a9da9 commit 5847006

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sklearn/tree/tests/test_tree.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from sklearn import datasets
2929
from sklearn.utils.fixes import bincount
3030

31-
from sklearn.preprocessing import balance_weights
31+
from sklearn.preprocessing._weights import _balance_weights
3232

3333

3434
CLF_CRITERIONS = ("gini", "entropy")
@@ -518,7 +518,7 @@ def test_unbalanced_iris():
518518
"""Check class rebalancing."""
519519
unbalanced_X = iris.data[:125]
520520
unbalanced_y = iris.target[:125]
521-
sample_weight = balance_weights(unbalanced_y)
521+
sample_weight = _balance_weights(unbalanced_y)
522522

523523
for name, TreeClassifier in CLF_TREES.items():
524524
clf = TreeClassifier(random_state=0)

0 commit comments

Comments
 (0)
0