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
@@ -8,7 +8,10 @@ import pickle
|
||||
import xgboost as xgb
|
||||
|
||||
import numpy as np
|
||||
from sklearn.cross_validation import KFold, train_test_split
|
||||
try:
|
||||
from sklearn.model_selection import KFold, train_test_split
|
||||
except:
|
||||
from sklearn.cross_validation import KFold, train_test_split
|
||||
from sklearn.metrics import confusion_matrix, mean_squared_error
|
||||
from sklearn.grid_search import GridSearchCV
|
||||
from sklearn.datasets import load_iris, load_digits, load_boston
|
||||
|
||||
Reference in New Issue
Block a user