Skip to content

Multi-metric scoring is incredibly slow because it repeats predictions for every metric #10802

Closed
@jimmywan

Description

@jimmywan

Description

The implementation of _multimetric_score will call every scorer individually. HERE

Unfortunately, these scorers are typically generated via make_scorer and each individual metric will end up repeatedly calling predict, proba, etc. HERE

For a recent exploratory GridSearch where I was generating lots of metrics (multi-output regression and wanted individual statistics for each output), My scoring time was 75% as long as my fit time which is bonkers and I know that my scoring functions are nowhere near that slow.

Suggested Change

This code should really just be calling predict once and feeding the same predictions into each of the scorers.

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