lenskit / lkpy

Python recommendation toolkit
https://lkpy.lenskit.org
MIT License
270 stars 61 forks source link

Implement global metrics and global/local metric interface #517

Closed mdekstrand closed 1 week ago

mdekstrand commented 1 week ago

This changes metrics from callables to classes that implement ListMetric and/or GlobalMetric (although simple list metrics can be specified as functions), and implements global RMSE & MAE.

These are slower than the old bulk operations, but clearer to write. We may look at re-optimizing later.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 87.65432% with 20 lines in your changes missing coverage. Please review.

Project coverage is 92.58%. Comparing base (481141b) to head (b95b6a2). Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
lenskit/lenskit/metrics/predict.py 82.19% 13 Missing :warning:
lenskit/lenskit/metrics/_base.py 75.00% 3 Missing :warning:
lenskit/lenskit/metrics/__init__.py 71.42% 2 Missing :warning:
lenskit/lenskit/metrics/bulk.py 95.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #517 +/- ## ========================================== - Coverage 92.67% 92.58% -0.10% ========================================== Files 94 94 Lines 6323 6362 +39 ========================================== + Hits 5860 5890 +30 - Misses 463 472 +9 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features: