Skip to content

BinaryClassificationMetrics is not sealed - but equivalent classes for regression and multiclass are #2769

Closed

Description

@vinodshanbhag

Inconsistency in API extensibility -- see title

Activity

  1. codemzs commented on Feb 27, 2019

    @codemzs
    Member

    Hi @vinodshanbhag , This is because CalibratedBinaryClassificationMetrics inherits BinaryClassificationMetrics. Is this causing any issues for you?

  2. TomFinley commented on Feb 27, 2019

    @TomFinley
    Contributor

    As @codemzs points out this is deliberate. We generally don't have unsealed non-abstract or non-static classes anywhere in our API, but this seemed relatively harmless, especially since it is impossible to extend from it in any meaningful way anyway (given that its constructor is not part of the public surface). Plus we did need to distinguish between the two types of metrics it was possible to get out of a binary classifier.

    We could adopt the potentially more principled though somewhat more awkward position of having an abstract base class shared by both, and having the non-calibrated metrics just descend from it and be otherwise empty, but it would be nice to understand how it is causing you difficulty first.

  3. vinodshanbhag commented on Feb 27, 2019

    @vinodshanbhag
    ContributorAuthor

    It is not a problem for automl -- just happen to notice it while exploring 'below' and assumed it is an overlook. Didnt know about CalibratedBinary metrics before today....

    Automl API return type is a collection of RunResult<T> where T is either of BinaryMetrics, MulticlassMetrics or RegressionMetrics -- so I was exploring whether i can enforce a meaningful constraint on T but since RunResult<T> is not publicly constructable -- I imagine a constraint is strictly not necessary.

  4. codemzs commented on Feb 27, 2019

    @codemzs
    Member

    @vinodshanbhag Ok, sounds good, can you please close this bug if you think it is resolved?

  5. added a commit that references this issue on Mar 11, 2021
  6. ghost locked as resolved and limited conversation to collaborators on Mar 24, 2022
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions