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

Fix Entropy Test #697

Merged
merged 2 commits into from
Sep 11, 2022
Merged

Fix Entropy Test #697

merged 2 commits into from
Sep 11, 2022

Conversation

wycccccc
Copy link
Collaborator

@wycccccc wycccccc commented Sep 11, 2022

#677
修正bug
image

1509147145

原来的测试是根据数据在范围内的变化验证entropy是否在正常工作。
在图中范围内撒一百个点,例左边上下范围比右边大所以点落的就会更分散,点分散代表事件的随机程度更大。因此左边会比右边entropy更大。

但是在极少数的情况中,哪怕范围比较大,落的点可能恰好会比较集中,这时候机会变成右边比左边entropy。
想要杜绝的话就直接设置固定值,这样也能看作事件发生概率的比较(一直发生同一件事)

Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

如果這個測試不會太久的話,可否加上@RepeatedTest(value = 3)來讓其多測試幾次

@wycccccc
Copy link
Collaborator Author

我忘記在上面說明了,上面的運行結果就是測試10000次的結果
已無問題

@wycccccc wycccccc merged commit 1e6f404 into main Sep 11, 2022
@chinghongfang chinghongfang deleted the fixEntropyTest branch September 19, 2022 03:09
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.

2 participants