Skip to content

sklearn.cross_validation.KFold updates #2

Description

@aedunn6

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions