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

Documentation, test and normalization for cross entropy calculation #45

Merged
merged 8 commits into from
Sep 9, 2021

Conversation

eileen-kuehn
Copy link
Member

@eileen-kuehn eileen-kuehn commented Sep 8, 2021

This PR extends documentation for the cross entropy calculation and adds normalisation as well as a simple unit test based on the discussion in Stackoverflow.

Closes #47.

@eileen-kuehn eileen-kuehn requested a review from cDenius September 8, 2021 16:41
@codecov
Copy link

codecov bot commented Sep 8, 2021

Codecov Report

Merging #45 (ca0184b) into ce_fix (d6b35e9) will decrease coverage by 0.84%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           ce_fix      #45      +/-   ##
==========================================
- Coverage   76.43%   75.58%   -0.85%     
==========================================
  Files          15       16       +1     
  Lines        1379     1110     -269     
  Branches      147      107      -40     
==========================================
- Hits         1054      839     -215     
+ Misses        321      267      -54     
  Partials        4        4              
Impacted Files Coverage Δ
maskit/utils.py 100.00% <100.00%> (+100.00%) ⬆️
tests/test_utils.py 100.00% <100.00%> (ø)
main.py 0.00% <0.00%> (-0.70%) ⬇️
maskit/masks.py 100.00% <0.00%> (ø)
tests/test_masks.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d6b35e9...ca0184b. Read the comment docs.

@eileen-kuehn
Copy link
Member Author

@cDenius, you can happily ignore that one failing test regarding project coverage :)

Copy link
Contributor

@cDenius cDenius left a comment

Choose a reason for hiding this comment

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

I would change the test case so we are identical to the sklearn implementation

tests/test_utils.py Outdated Show resolved Hide resolved
@eileen-kuehn eileen-kuehn changed the title Documentation and test for cross entropy calculation Documentation, test and normalization for cross entropy calculation Sep 9, 2021
Copy link
Contributor

@cDenius cDenius left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@maxfischer2781 maxfischer2781 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@eileen-kuehn eileen-kuehn merged commit 21eb8e9 into ce_fix Sep 9, 2021
eileen-kuehn added a commit that referenced this pull request Sep 9, 2021
* Divide by sample size

* Document, test and normalize cross entropy calculation (#45)

Co-authored-by: Christof Wendenius <christof.wendenius@kit.edu>
Co-authored-by: Eileen Kuehn <eileen.kuehn@kit.edu>
@eileen-kuehn eileen-kuehn deleted the change/ce_fix branch September 9, 2021 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants