Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Splitting the metrics module in sub-module #3425

arjoly opened this Issue Jul 18, 2014 · 2 comments


None yet
3 participants

arjoly commented Jul 18, 2014

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

  • 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?

@arjoly arjoly added the API label Jul 18, 2014


mblondel commented Jul 18, 2014


I definitely prefer metrics.ranking to metrics.threshold though.

@arjoly arjoly added the Easy label Jul 18, 2014


amueller commented Jul 18, 2014


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