成功解决TypeError: __init__() got an unexpected keyword argument 'indices'
目录
解决问题
TypeError: __init__() got an unexpected keyword argument 'indices'
解决思路
类型错误:得到意外的关键字参数“indexs”
解决方法
先尝试把多余的参数去掉,如果不行就升级函数包即可!
cv=StratifiedShuffleSplit(Y_train, n_iter=10, test_size=0.2, train_size=None, indices=None,
random_state=seed)).fit(X_train, Y_train)
改为
cv=StratifiedShuffleSplit(Y_train, n_iter=10, test_size=0.2, train_size=None, random_state=seed)).fit(X_train, Y_train)
大功告成!哈哈!