Skip to content

Implement scorers that evaluate return_std #18017

Open

Description

@jnothman

While we don't tend to focus on uncertainty estimation on predictions, we support it through return_std, yet we do not have any scorers that take this into account for model selection and evaluation. Ideally where users want to make use of return_std, it should be considered as a factor in model quality.

Methods for measuring model performance while accounting for its prediction of uncertainty include:

  • "mean standardized squared error" or "mean squared deviation ratio" (both terms used in geostatistics) defined as the mean over samples of the squared error divided by the predicted variance:
    image (from Webster and Oliver)). A median of this standardized squared error may also be used.
  • Measuring the proportion of true values falling within a k% predictive interval. (Given that we only provide return_std, we need to assume gaussian residuals in any measure of error.)

Activity

  1. jnothman commented on Jul 28, 2020

    @jnothman
    MemberAuthor

    What do others think?

  2. will-thompson-k commented on Jul 28, 2020

    @will-thompson-k

    So you are proposing an additional method within sklearn.metrics (~ sklearn.metrics.msdr ) which would measure SSE (y - y_hat)^2 relative to its y_hat_std^2 as a measure of errors relative to prediction uncertainty, is that right? (sanity-checking understanding). I personally think this is a useful measure, especially when concerned about if the predictions are well-behaved.

  3. jnothman commented on Jul 28, 2020

    @jnothman
    MemberAuthor

    Yes, that, and a corresponding scorer accessible with get_scorer, which would call .predict(..., return_std=True); this would also be something new.

  4. will-thompson-k commented on Jul 28, 2020

    @will-thompson-k

    Got it. I can implement it if you want to assign to me and/or I can create a PR.

  5. jnothman commented on Jul 28, 2020

    @jnothman
    MemberAuthor
  6. will-thompson-k commented on Jul 28, 2020

    @will-thompson-k
  7. will-thompson-k commented on Jul 30, 2020

    @will-thompson-k
  8. will-thompson-k commented on Aug 12, 2020

    @will-thompson-k

    -I am hitting paywalls when trying to look at that chapter.-
    **Correction: I found the chapter.

  9. will-thompson-k commented on Aug 13, 2020

    @will-thompson-k

    In reading this chapter @jnothman, you would probably not want MSDR as a metric, but abs( 1.0 - MSDR(x,z)) as unity is definitionally a perfect explanation of the kriging variances in cross-validation. Anything >> 1.0 or <<1.0 is considered a poor fit. This is also reflected in the mean residual in that table right after .
    Screen Shot 2020-08-13 at 9 12 08 AM

    The only other measure I've seen is the Bayes R^2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions