Re: [scikit-learn] Error with Kfold cross vailidation

2018-10-25 Thread bright silas Aboh
Ok. And thanks

On Wed, 24 Oct 2018 at 22:53, Joel Nothman  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 
> wrote:
>
>> 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.varoqu...@normalesup.org> wrote:
>>
>>> >   kf = KFold(data.shape[0], n_splits=5)
>>> > TypeError: __init__() got multiple values for argument 'n_splits'
>>>
>>> Don't specify data.shape[0], this is no longer necessary in the recent
>>> versions of scikit-learn.
>>> ___
>>> scikit-learn mailing list
>>> scikit-learn@python.org
>>> https://mail.python.org/mailman/listinfo/scikit-learn
>>>
>> ___
>> scikit-learn mailing list
>> scikit-learn@python.org
>> https://mail.python.org/mailman/listinfo/scikit-learn
>>
> ___
> scikit-learn mailing list
> scikit-learn@python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn


Re: [scikit-learn] Error with Kfold cross vailidation

2018-10-24 Thread Joel Nothman
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 
wrote:

> 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.varoqu...@normalesup.org> wrote:
>
>> >   kf = KFold(data.shape[0], n_splits=5)
>> > TypeError: __init__() got multiple values for argument 'n_splits'
>>
>> Don't specify data.shape[0], this is no longer necessary in the recent
>> versions of scikit-learn.
>> ___
>> scikit-learn mailing list
>> scikit-learn@python.org
>> https://mail.python.org/mailman/listinfo/scikit-learn
>>
> ___
> scikit-learn mailing list
> scikit-learn@python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn


Re: [scikit-learn] Error with Kfold cross vailidation

2018-10-24 Thread serafim loukas
What is your scikit learn version?

In case you have the latest  try to reinstall the module.

On 24 Oct 2018, at 15:36, bright silas Aboh 
mailto:sbrighta...@gmail.com>> wrote:

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 
mailto:gael.varoqu...@normalesup.org>> wrote:
>   kf = KFold(data.shape[0], n_splits=5)
> TypeError: __init__() got multiple values for argument 'n_splits'

Don't specify data.shape[0], this is no longer necessary in the recent
versions of scikit-learn.
___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn
___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn
___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn


Re: [scikit-learn] Error with Kfold cross vailidation

2018-10-24 Thread bright silas Aboh
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 
wrote:

> >   kf = KFold(data.shape[0], n_splits=5)
> > TypeError: __init__() got multiple values for argument 'n_splits'
>
> Don't specify data.shape[0], this is no longer necessary in the recent
> versions of scikit-learn.
> ___
> scikit-learn mailing list
> scikit-learn@python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn


Re: [scikit-learn] Error with Kfold cross vailidation

2018-10-24 Thread Gael Varoquaux
>   kf = KFold(data.shape[0], n_splits=5)
> TypeError: __init__() got multiple values for argument 'n_splits'

Don't specify data.shape[0], this is no longer necessary in the recent
versions of scikit-learn.
___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn


Re: [scikit-learn] Error with Kfold cross vailidation

2018-10-24 Thread bright silas Aboh
yes please. I import KFold from sklearn.model_selection

On Wed, Oct 24, 2018 at 12:02 PM serafim loukas 
wrote:

> Hello,
>
>
> Do you import KFold from sklearn.model_selection ?
>
>
>
> On 24 Oct 2018, at 13:29, bright silas Aboh  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@python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
>
> ___
> scikit-learn mailing list
> scikit-learn@python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn


Re: [scikit-learn] Error with Kfold cross vailidation

2018-10-24 Thread serafim loukas
Hello,


Do you import KFold from sklearn.model_selection ?



On 24 Oct 2018, at 13:29, bright silas Aboh 
mailto:sbrighta...@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@python.org
https://mail.python.org/mailman/listinfo/scikit-learn

___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn


[scikit-learn] Error with Kfold cross vailidation

2018-10-24 Thread bright silas Aboh
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@python.org
https://mail.python.org/mailman/listinfo/scikit-learn