Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added matthews correlation coefficient loss #706

Conversation

sarthakpati
Copy link
Collaborator

@sarthakpati sarthakpati commented Aug 5, 2023

Fixes #705

Proposed Changes

  • added mcc loss
  • updated function for generic loss calculation using either 1-criteria or -log
  • updated comments
  • blacked a few files
  • added print for penalty weights

Checklist

  • I have read the CONTRIBUTING guide.
  • My PR is based from the current GaNDLF master .
  • Non-breaking change (does not break existing functionality): provide as many details as possible for any breaking change.
  • Function/class source code documentation added/updated.
  • Code has been blacked for style consistency.
  • If applicable, version information has been updated in GANDLF/version.py.
  • If adding a git submodule, add to list of exceptions for black styling in pyproject.toml file.
  • Usage documentation has been updated, if appropriate.
  • Tests added or modified to cover the changes; if coverage is reduced, please give explanation.
  • If customized dependency installation is required (i.e., a separate pip install step is needed for PR to be functional), please ensure it is reflected in all the files that control the CI, namely: python-test.yml, and all docker files [1,2,3].

@sarthakpati sarthakpati marked this pull request as draft August 5, 2023 17:21
@sarthakpati sarthakpati marked this pull request as draft August 5, 2023 17:21
@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2023

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

Geeks-Sid
Geeks-Sid previously approved these changes Aug 5, 2023
Copy link
Collaborator

@Geeks-Sid Geeks-Sid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR does more than adding MCC. :) But it looks good to me.

@sarthakpati sarthakpati marked this pull request as ready for review August 7, 2023 19:32
@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Merging #706 (b68b0ee) into master (b5338fe) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #706   +/-   ##
=======================================
  Coverage   94.68%   94.69%           
=======================================
  Files         117      117           
  Lines        8228     8243   +15     
=======================================
+ Hits         7791     7806   +15     
  Misses        437      437           
Flag Coverage Δ
unittests 94.69% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
GANDLF/losses/__init__.py 100.00% <ø> (ø)
GANDLF/utils/modelio.py 84.21% <ø> (-0.17%) ⬇️
testing/test_full.py 99.16% <ø> (ø)
GANDLF/compute/generic.py 94.59% <100.00%> (+0.30%) ⬆️
GANDLF/losses/segmentation.py 98.90% <100.00%> (+0.19%) ⬆️

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

@sarthakpati sarthakpati merged commit d12ca21 into mlcommons:master Aug 8, 2023
16 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 8, 2023
@sarthakpati sarthakpati deleted the 705-add-matthews-correlation-coefficient-loss branch August 8, 2023 04:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Matthews Correlation Coefficient Loss
2 participants