<div dir="ltr">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.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, 25 Oct 2018 at 00:36, bright silas Aboh <<a href="mailto:sbrightaboh@gmail.com">sbrightaboh@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="auto">Okey. I did removed the data.shape as suggested but I am now having a new error that says:</div></div><div dir="auto">Kfold object not iterable </div><div><br><div class="gmail_quote"><div dir="ltr">On Wed, 24 Oct 2018 at 13:23, Gael Varoquaux <<a href="mailto:gael.varoquaux@normalesup.org" target="_blank">gael.varoquaux@normalesup.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">>   kf = KFold(data.shape[0], n_splits=5)<br>
> TypeError: __init__() got multiple values for argument 'n_splits'<br>
<br>
Don't specify data.shape[0], this is no longer necessary in the recent<br>
versions of scikit-learn.<br>
_______________________________________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org" target="_blank">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/scikit-learn</a><br>
</blockquote></div></div>
_______________________________________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org" target="_blank">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/scikit-learn</a><br>
</blockquote></div>