[scikit-learn] Re: Error with Kfold cross vailidation
eamanu15
emmanuelarias30 at gmail.com
Wed Oct 24 08:45:13 EDT 2018
Hello Bright!
> I am Bright and am trying to build a machine learning model with sklearn
> I get the following error however, can someone please help me?
>
> kf = KFold(data.shape[0], n_splits=5)
> TypeError: __init__() got multiple values for argument 'n_splits'
>
>
Reading the doc [1] I think that the problem is that you are setting the
parameters from a wrong way.
The first parameter is n_split, but you set data.shape[0] and then you set
again "n_splits=5"
That is the error.
[1]
http://scikit-learn.org/stable/modules/generated/sklearn.model_selection.KFold.html
--
Arias Emmanuel
http://eamanu.com
Github/Gitlab; @eamanu
Debian: @eamanu-guest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20181024/6f503202/attachment.html>
More information about the scikit-learn
mailing list