fix DeprecationWarning on sklearn.cross_validation (#2075)
* fix DeprecationWarning on sklearn.cross_validation * fix syntax * fix kfold n_split issue * fix mistype * fix n_splits multiple value issue * split should pass a iterable * use np.arange instead of xrange, py3 compatibility
This commit is contained in:
committed by
Yuan (Terry) Tang
parent
d581a3d0e7
commit
301540f1d9
@@ -57,7 +57,10 @@ class TestEvalMetrics(unittest.TestCase):
|
||||
|
||||
def test_eval_metrics(self):
|
||||
tm._skip_if_no_sklearn()
|
||||
from sklearn.cross_validation import train_test_split
|
||||
try:
|
||||
from sklearn.model_selection import train_test_split
|
||||
except:
|
||||
from sklearn.cross_validation import train_test_split
|
||||
from sklearn.datasets import load_digits
|
||||
|
||||
digits = load_digits(2)
|
||||
|
||||
Reference in New Issue
Block a user