[scikit-learn] Error with Kfold cross vailidation

serafim loukas seralouk at hotmail.com
Wed Oct 24 08:02:04 EDT 2018


Do you import KFold from sklearn.model_selection ?

On 24 Oct 2018, at 13:29, bright silas Aboh <sbrightaboh at gmail.com<mailto:sbrightaboh at gmail.com>> wrote:

Hi Everyone,

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'

Thank you

scikit-learn mailing list
scikit-learn at python.org<mailto:scikit-learn at python.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20181024/023ac96e/attachment.html>

More information about the scikit-learn mailing list