Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

Added class_weight parameter to sparse_categorical_focal_loss #11

Merged
merged 2 commits into from
Nov 1, 2020

Conversation

artemmavrin
Copy link
Owner

Similar to the pos_weight parameter of binary_focal_loss, class_weight allows the user to specify the relative weight of each class.

@codecov-io
Copy link

codecov-io commented Nov 1, 2020

Codecov Report

Merging #11 into master will decrease coverage by 2.12%.
The diff coverage is 95.57%.

Impacted file tree graph

@@             Coverage Diff             @@
##            master      #11      +/-   ##
===========================================
- Coverage   100.00%   97.87%   -2.13%     
===========================================
  Files            8        8              
  Lines          513      612      +99     
  Branches        60       69       +9     
===========================================
+ Hits           513      599      +86     
- Misses           0       10      +10     
- Partials         0        3       +3     
Impacted Files Coverage Δ
src/focal_loss/_categorical_focal_loss.py 89.65% <87.17%> (-10.35%) ⬇️
src/focal_loss/__init__.py 100.00% <100.00%> (ø)
...l_loss/tests/test_sparse_categorical_focal_loss.py 100.00% <100.00%> (ø)
src/focal_loss/_binary_focal_loss.py 91.66% <0.00%> (-8.34%) ⬇️

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 9e023de...c03f719. Read the comment docs.

@artemmavrin artemmavrin merged commit 5b2ca68 into master Nov 1, 2020
@artemmavrin artemmavrin deleted the class_weight branch November 1, 2020 09:37
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.

2 participants