On Wed, Oct 24, 2012 at 10:00 PM, Andreas Mueller
<[email protected]>wrote:

>  Maybe the question was more "why does the user want to know that?"
> If it is called as
> RocAreaUnderCurveScore()(est, y_true, y_pred)
> why does the user need to discover how this is computed?
>

One use case would be error-handling. For example:

[in a classifier]
def score(self, X, y, metric=None):
   metric = get_metric(metric) # handle None / string
   if not ininstance(metric, ClassificationMetric):
       raise ValueError

or

  if not metric.classication_metric:
      raise ValueError

But some metrics may be used in different categories. For example, MSE is a
regression metric but you can use it to evaluate binary classification if
you really want too.
So I don't know if such error handling would be a good idea.

BTW, the way to call a metric object would be:
RocAreaUnderCurveScore()(est, X, y)

Mathieu
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to