[scikit-learn] Error with Kfold cross vailidation
bright silas Aboh
sbrightaboh at gmail.com
Thu Oct 25 09:15:12 EDT 2018
Ok. And thanks
On Wed, 24 Oct 2018 at 22:53, Joel Nothman <joel.nothman at gmail.com> wrote:
> Yes, it is not iterable. You are copying a tutorial or code that describes
> the usage of sklearn.cross_validation.KFold, which no longer exists in
> version 0.20. Find an example with the newer sklearn.model_selection.KFold.
> On Thu, 25 Oct 2018 at 00:36, bright silas Aboh <sbrightaboh at gmail.com>
>> Okey. I did removed the data.shape as suggested but I am now having a new
>> error that says:
>> Kfold object not iterable
>> On Wed, 24 Oct 2018 at 13:23, Gael Varoquaux <
>> gael.varoquaux at normalesup.org> wrote:
>>> > kf = KFold(data.shape, n_splits=5)
>>> > TypeError: __init__() got multiple values for argument 'n_splits'
>>> Don't specify data.shape, this is no longer necessary in the recent
>>> versions of scikit-learn.
>>> scikit-learn mailing list
>>> scikit-learn at python.org
>> scikit-learn mailing list
>> scikit-learn at python.org
> scikit-learn mailing list
> scikit-learn at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the scikit-learn