Skip to content

RegressionEvaluator return 0 for MSE && RMSE if all scores are NaN #6361

Open

Description

@LittleLittleCloud

It seems that RegressionEvaluator filters out all NaN scores when calculating metrics. So if a predictor produces NaN only for the entire evaluation dataset, the RMSE and MSE from RegressionEvaluator would be 0, which is ironically the best result it can get.

While it may need further discussion, I wonder if it's necessary to FILTER out the NaN value when calculating metrics, as NaN in prediction result usually indicates a model is not well-trained, and thus should be reflected in evaluation metrics.

Activity

  1. ghost added
    untriagedNew issue has not been triaged
    on Oct 7, 2022
  2. michaelgsharp commented on Oct 10, 2022

    @michaelgsharp
    Contributor

    What do you think it should do? If we did math with nan values it would cause the final result to be nan, even if there was only 1 nan result. Maybe we just should just change it so that if all results are NAN that the final result is NAN instead of 0?

    @luisquintanilla

  3. LittleLittleCloud commented on Oct 10, 2022

    @LittleLittleCloud
    MemberAuthor

    I would vote for just return NaN even if just one result is NaN because a NaN in score usually means the model is not well-trained.

  4. michaelgsharp commented on Feb 6, 2023

    @michaelgsharp
    Contributor

    @luisquintanilla are you ok with returning NaN if one result is a NaN?

  5. added this to the ML.NET 3.0 milestone on Feb 6, 2023
  6. ghost removed
    untriagedNew issue has not been triaged
    on Feb 6, 2023
  7. added
    area-CoreCore ML.NET APIs and shared functionality
    and removed on Sep 8, 2026
  8. rosebyte commented on Oct 23, 2026

    @rosebyte
    Member

    Triage: we will take a look when we will have time.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-CoreCore ML.NET APIs and shared functionalitygreendevelopment

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions