chrisclark / PythonForDataScience

PythonForDataScience
154 stars 125 forks source link

sklearn.cross_validation.KFold updates #2

Open aedunn6 opened 9 years ago

aedunn6 commented 9 years ago

Running crossValidate.py with the latest version of sklearn gave this error:

Traceback (most recent call last): File "crossValidate.py", line 29, in main() File "crossValidate.py", line 16, in main cv = cross_validation.KFold(len(train), k=5, indices=False) TypeError: init() got an unexpected keyword argument 'k'

Changing "k=5" to "n_folds=5", per the documentation fixed the error.

However, I then got this warning:

DeprecationWarning: The indices parameter is deprecated and will be removed (assumed True) in 0.17 stacklevel=1)

PNR-1 commented 7 years ago

This means that the indices argument will no longer be supported and a warning to alter your code before the next release. Its to make sure your code doesn't break all of a sudden.

kareemkhater commented 9 months ago

means that the indices argument will no longer be supported and a warning to alter your code before the next release. Its to make sure your code doesn't break all of a sudden.