Skip to content

Splitting the metrics module in sub-module #3425

@arjoly

Description

@arjoly

Currently, the metrics.py module is becoming huge and contains 2345 lines. It becomes difficult to enter in the module to newcomers. I propose to split sklearn.metrics.metrics
in

  • sklearn.metrics.classification which would contains all classification metrics without score involved
  • sklearn.metrics.regression which would contains all regression metrics
  • sklearn.metrics.ranking or sklearn.metrics.threshold which would contains all classification metrics with a score involved.

The sklearn/metrics/tests/test_metrics.py, which contains 2710 lines, would be split in 4 testing files:

  • sklearn/metrics/tests/test_invariance.py with invariance tests and common tests to all metrics
  • sklearn/metrics/tests/test_classification.py
  • sklearn/metrics/tests/test_regression.py
  • sklearn/metrics/tests/test_ranking.py or sklearn/metrics/tests/test_threshold.py

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIEasyWell-defined and straightforward way to resolve

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions