Open YeungOnion opened 2 months ago
@YeungOnion I can try working on this one. if it is okay.
Also, 1 question: Minimum Value is 0, and Maximum Value is the total number of trials, n. Is my understanding correct?
Sorry about the delay in reply,
Minimum Value is 0, and Maximum Value is the total number of trials, n.
I believe I posted the issue thinking that the above sentiment was correct. All 0 or all n
, it is analogous to the impl
for MultivariateNormal
. However, I suppose that Max
and Min
for multivariate distributions are not clear.
Perhaps we could flesh out the use case of these kinds of values and then reimplement the useful trait, whether or not it maintains its name and signature. At the moment, I don't see a generic programming usage for Max
and Min
, i.e. I wouldn't use them as trait bounds. Further, we don't express inclusivity/exclusivity on those bounds, but I'm rambling, apologies.
--
For actionable steps, I've a list below. [^obvious]
statistics::traits
that have an "obviously" unique implementation for a given distribution under the current constraint are implemented as such for each distributionstatistics::traits
that are not "obviously" unique
impl
As an open question for some design, how might we reformulate this API to express something that users or contributors to statrs
may wish to generically program over or use? Just to toss my own ideas into the air,
pdf
and cdf
to test if a value is between max
and min
would be supported by the existing traits,
max
and min
but a notion of pdf "support" could fill the bounds checking needFeel free to rename or open a new issue for that part as well. Thanks for your help!
[^obvious]: I use the word "obvious" to convey a very low degree of unexpectedness or very little ambiguity in behavior when a user sees the trait with it's trait level docs and sees that a given type implements it, but does not see the implementation or impl
-level docs
Noticed while reviewing #275 that we're missing some of the support traits (Min, Max) for multinomial. There may be others to find as well.