Fix #3730: scikit-learn 0.20 compatibility fix (#3731)

* Fix #3730: scikit-learn 0.20 compatibility fix

sklearn.cross_validation has been removed from scikit-learn 0.20,
so replace it with sklearn.model_selection

* Display test names for Python tests for clarity
This commit is contained in:
Philip Hyunsu Cho
2018-09-27 15:03:05 -07:00
committed by GitHub
parent fbe9d41dd0
commit 51478a39c9
4 changed files with 31 additions and 48 deletions

View File

@@ -49,7 +49,7 @@ class TestGPUPredict(unittest.TestCase):
# Test case for a bug where multiple batch predictions made on a test set produce incorrect results
def test_multi_predict(self):
from sklearn.datasets import make_regression
from sklearn.cross_validation import train_test_split
from sklearn.model_selection import train_test_split
n = 1000
X, y = make_regression(n, random_state=rng)