Hi Peter
It is most probably 0.11.I'm not so sure, It can be older version too.
Regards
Nikit Saraf
On Fri, Jul 6, 2012 at 1:39 AM, Peter Prettenhofer <
[email protected]> wrote:
> Nikit,
> which version of sklearn do you use? master or 0.11?
>
> best,
> Peter
>
> 2012/7/5 Nikit Saraf <[email protected]>:
> > Hi Peter
> >
> > Thanks for the reply.
> >
> > dtype of Y_1 is 'string64' and its shape is (12137,1)
> > dtype of X_1 is 'float64" and its shape is (12137,100)
> >
> > And here is the example of 10 cases http://paste.ubuntu.com/1077028/
> >
> > It would be great if you could point out where I'm going wrong.Thank you
> so
> > much for the help.
> >
> > Regards
> > Nikit Saraf
> >
> >
> > On Fri, Jul 6, 2012 at 1:16 AM, Peter Prettenhofer
> > <[email protected]> wrote:
> >>
> >> Hi Nikit,
> >>
> >> thanks for reporting - I added a test case for symbolic class labels
> >> and it works ok (class labels get mapped to internal class ids prior
> >> to fitting; see gradient_boosting.py:629:631) - I think the source of
> >> the error is something different.
> >>
> >> Can you check the dtype and shape of ``Y_1``?
> >>
> >> It would be great if you could send me a minimal example to reproduce
> the
> >> error.
> >>
> >> thanks,
> >> Peter
> >>
> >> 2012/7/5 Nikit Saraf <[email protected]>:
> >> > I was trying to train a Character Recognition Model with the help of
> >> > GradientBoostingClassifier. When i tried to run, it gave me the
> >> > following
> >> > error :-
> >> >
> >> > Traceback (most recent call last):
> >> > File "charRecog.py", line 23, in <module>
> >> > clf = GradientBoostingClassifier().fit(X_1,Y_1)
> >> > File
> >> >
> >> >
> "/usr/local/lib/python2.7/dist-packages/sklearn/ensemble/gradient_boosting.py",
> >> > line 633, in fit
> >> > return super(GradientBoostingClassifier, self).fit(X, y)
> >> > File
> >> >
> >> >
> "/usr/local/lib/python2.7/dist-packages/sklearn/ensemble/gradient_boosting.py",
> >> > line 439, in fit
> >> > self.init.fit(X, y)
> >> > File
> >> >
> >> >
> "/usr/local/lib/python2.7/dist-packages/sklearn/ensemble/gradient_boosting.py",
> >> > line 85, in fit
> >> > class_counts = np.bincount(y)
> >> > ValueError: object too deep for desired array
> >> >
> >> > Seeing the error, i realised it is the bincount() function which was
> >> > causing
> >> > the error as it counts only the no. of occurrences of non-negative
> >> > integers
> >> > in the array. But my labels are all strings such as 'A','e','3' etc.
> >> > This
> >> > concludes that the GradientBoostingClassifier would work only with the
> >> > non-negative integer labels and hence would not be a universal
> >> > classifier.
> >> > So, I believe, to fix the bug, the function bincount() should be
> >> > replaced
> >> > with another function which does similar work but also universal.
> >> >
> >> > Please correct me if I'm wrong, as I am fairly new to Machine
> Learning.
> >> >
> >> > Regards
> >> > Nikit Saraf
> >> >
> >> >
> >> >
> ------------------------------------------------------------------------------
> >> > Live Security Virtual Conference
> >> > Exclusive live event will cover all the ways today's security and
> >> > threat landscape has changed and how IT managers can respond.
> >> > Discussions
> >> > will include endpoint security, mobile security and the latest in
> >> > malware
> >> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> >> > _______________________________________________
> >> > Scikit-learn-general mailing list
> >> > [email protected]
> >> > https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
> >> >
> >>
> >>
> >>
> >> --
> >> Peter Prettenhofer
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> Live Security Virtual Conference
> >> Exclusive live event will cover all the ways today's security and
> >> threat landscape has changed and how IT managers can respond.
> Discussions
> >> will include endpoint security, mobile security and the latest in
> malware
> >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> >> _______________________________________________
> >> Scikit-learn-general mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and
> > threat landscape has changed and how IT managers can respond. Discussions
> > will include endpoint security, mobile security and the latest in malware
> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> > _______________________________________________
> > Scikit-learn-general mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
> >
>
>
>
> --
> Peter Prettenhofer
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general