Coverage for addmo/s3_model_tuning/scoring/metrics/abstract_metric.py: 100%

2 statements  

« prev     ^ index     » next       coverage.py v7.4.4, created at 2025-08-31 13:05 +0000

1"""When creating custom metrics, comply to scikit-learn API. 

2Here a metric is what scikit-learn calls a scorer. 

3Use the following to turn a plain metric into a scorer: 

4https://scikit-learn.org/stable/modules/generated/sklearn.metrics.make_scorer.html. 

5 

6Since some metrics, like AIC, also need the estimator to be calculated, I decided to call a metric 

7an object that takes the estimator and produces a score. Equivalent to scikit-learn's scorer. 

8""" 

9 

10class AbstractMetric: 

11 pass