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
fix entropy #468
fix entropy #468
Conversation
Codecov Report
@@ Coverage Diff @@
## master #468 +/- ##
==========================================
+ Coverage 85.05% 85.09% +0.03%
==========================================
Files 21 21
Lines 2088 2093 +5
==========================================
+ Hits 1776 1781 +5
Misses 312 312
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #468 +/- ##
=======================================
Coverage 85.05% 85.05%
=======================================
Files 21 21
Lines 2088 2088
=======================================
Hits 1776 1776
Misses 312 312
Continue to review full report at Codecov.
|
You really should have added to the docstring about this behaviour. |
@@ -119,6 +119,8 @@ it = (xᵢ for xᵢ in x) | |||
|
|||
@test entropy([0.5, 0.5],2) ≈ 1.0 | |||
@test entropy([0.2, 0.3, 0.5], 2) ≈ 1.4854752972273344 | |||
@test entropy([0.2, 0.3, 0.5], 2) ≈ 1.4854752972273344 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, it looks like you duplicated one of the tests here.
There was a bug in the definition of entropy, we should have entropy of a Dirac peak = 0.0