MetricsReloaded icon indicating copy to clipboard operation
MetricsReloaded copied to clipboard

MONAI support

Open brudfors opened this issue 3 years ago • 1 comments

This PR allows for use of the metrics in pairwise_measures.py to be used from MONAI, in particular it enables the use of a batch dimension and a smoothing parameter. Some small modifications have also been made in some places to make the code slightly more efficient (e.g, one-hot encode only once in MultiClassPairwiseMeasures.weighted_cohens_kappa , repeated computations removed from MultiClassPairwiseMeasures.normalised_expected_cost., etc). All unit tests pass, and the smoothing parameters is disabled by default; that is, the output of the metrics have not changed. With this PR integrated into the package, the wrapper on the MONAI side (for the pairwise metrics) should be easy to implement :)

brudfors avatar Dec 08 '22 19:12 brudfors

Codecov Report

Merging #33 (090a9a7) into main (d721a99) will decrease coverage by 1.60%. The diff coverage is 72.00%.

@@            Coverage Diff             @@
##             main      #33      +/-   ##
==========================================
- Coverage   66.81%   65.21%   -1.60%     
==========================================
  Files           8        8              
  Lines        2091     2139      +48     
  Branches      338      361      +23     
==========================================
- Hits         1397     1395       -2     
- Misses        598      640      +42     
- Partials       96      104       +8     
Impacted Files Coverage Δ
MetricsReloaded/utility/utils.py 60.92% <38.88%> (-2.14%) :arrow_down:
MetricsReloaded/metrics/pairwise_measures.py 78.80% <74.87%> (-7.66%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Dec 08 '22 19:12 codecov[bot]