This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Add contrib.rand_zipfian #9747
Merged
Merged
Add contrib.rand_zipfian #9747
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
65fcf2f
draft
ZiyueHuang 4ed3ba4
move to contrib
ZiyueHuang 0792162
rename op
ZiyueHuang 6162c18
CR comments
ZiyueHuang 105c212
Update contrib.py
eric-haibin-lin 6be919c
Update contrib.py
eric-haibin-lin 136defb
Update random.py
eric-haibin-lin 4d128a7
update example in the doc
eric-haibin-lin 436543b
update example in symbol doc
eric-haibin-lin 1cee16f
CR comments
ZiyueHuang 2533576
Merge branch 'master' into log-uniform
eric-haibin-lin a765d2f
update op name
eric-haibin-lin c93af4a
update op name
eric-haibin-lin c53c2a9
update op name in test
eric-haibin-lin c17c215
Merge remote-tracking branch 'upstream/master' into log-uniform
add866d
update test
c48aebe
Update contrib.py
eric-haibin-lin 90d684d
Merge remote-tracking branch 'upstream/master' into log-uniform
ZiyueHuang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The example output looks suspicious as it does not sum up to 1.
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.
Sorry I've misunderstood the term. It should be correct.
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.
I feel it's suspicious at first glance because the exp_count of 1 is larger than the exp_count of 3. However, the sampling result show that 3 is much more often then 1. We need to sample multiple times and test if the empirical expectation matches the true expectation.
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.
It's just a coincident for the first 5 samples. If I sample 50 times, it returns:
0's = 19
1's = 12
2's = 8
3's = 7
4's = 4
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.
OK, looks good