Thanks Andy. I'll wait for your input (and will check the bug reports
myself as well), before creating a new PR.

In the mean time, I wonder why you would even need to do a type checking
here? As far as I know, Python strongly encourages duck typing. Why not
remove the type checking altogether and just let the exception "bubble up"
 when the duck cannot quack (i.e., when the score function output cannot be
used by the respective caller)?

As for cross_val_score being used in GridSearchCV, I quickly skimmed
through the code and it doesn't look like it's being used there. Can
someone else confirm as well?

Thanks!

Faraz


On Sun, Feb 2, 2014 at 1:38 PM, Andy <t3k...@gmail.com> wrote:

> On 01/31/2014 09:50 AM, Gael Varoquaux wrote:
> >> if not isinstance(score, numbers.Number):
> >>      raise ValueError("scoring must return a number, got %s (%s)"
> >>                              " instead." % (str(score), type(score)))
> > I am not opposed to making this check more relaxed: we could add an 'or
> > (isinstance(score, np.ndarray) and score.dtype.kind in ('i', 'f'))'.
> >
> > PR welcomed
> >
> > G
> This has come up before. I am not 100% what the trouble was. I put this
> in there as a bug fix.
> There was a PR, not sure where it went.
> cross_val_score is not called by GridSearchCV, right?
>
> I'll try to find out what I was thinking....
>
> Andy
>
>
> ------------------------------------------------------------------------------
> WatchGuard Dimension instantly turns raw network data into actionable
> security intelligence. It gives you real-time visual feedback on key
> security issues and trends.  Skip the complicated setup - simply import
> a virtual appliance and go from zero to informed in seconds.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to