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.
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
Add OrderStatistic and JointOrderStatistics distributions #1668
Add OrderStatistic and JointOrderStatistics distributions #1668
Changes from 43 commits
f74d4ac
d0eb010
d084189
4266f87
f725eab
57dd262
f610dea
5325fd4
c5d458e
a3e8844
c78f614
ac5f421
e59b9d7
0bcabf3
f9b2c09
e5dd13a
f314d88
5431c36
2c3fa12
42c1ba7
6a6487f
60d3b98
548acac
606ab3c
23b48ff
edb05e2
8a770a6
cf5d188
9e7fb7d
6d2a660
50bf3da
8c87e01
5e18eba
9a75518
018b431
b6ddcba
56d028f
8bd0bc2
ebcabbc
433dfe1
f96f191
f9a424e
fa4dd6b
f888acd
d4a0c7e
2804662
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Seems we should maybe use some heuristic for choosing one of the two algorithms, depending on
n
and possibly the type of distribution?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'm not certain what heuristic we could use here, since which strategy is faster strongly depends on the relative speed of the quantile function and the
rand
method of the wrapped distribution. Alson
, since the direct method has anO(nlog(n))
sort step that forn
large enough will make it slower than the exponential method, which is alwaysO(n)
, though potentially with a large constant factor.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.
This motivated the idea of implementing two samplers and then just choosing the sampler based on a heuristic. But the idea of the user choosing a sampler themselves does not seem to be documented; are there any cases where a sampler is intended for direct usage and exported?
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.
Hmm, no I'm not aware of such an example. Might be good enough for now.