Re: [Statistics] ContinuousDistribution probability and ConstantContinuousDistribution

2021-08-01 Thread Gilles Sadowski
> > > > [...] > > > > > > Opinion on dropping ConstantContinuousDistribution > > > > [...] > > > > Do you mean that this ad-hoc class should be moved back to CM (as a > > private inner class of "EmpiricalDistribution")? > > > > That would be cleaner. The distribution is only used to allow the > Emp

Re: [Statistics] ContinuousDistribution probability and ConstantContinuousDistribution

2021-08-01 Thread Alex Herbert
On Sun, 1 Aug 2021 at 22:28, Gilles Sadowski wrote: > Le dim. 1 août 2021 à 20:13, Alex Herbert a > écrit : > > > > On Sun, 1 Aug 2021 at 18:40, Alex Herbert > wrote: > > > > > > > > A bit of digging in the commit history of CM found that this > distribution > > > was added to fix MATH-984 [1]

Re: [Statistics] ContinuousDistribution probability and ConstantContinuousDistribution

2021-08-01 Thread Gilles Sadowski
Le dim. 1 août 2021 à 20:13, Alex Herbert a écrit : > > On Sun, 1 Aug 2021 at 18:40, Alex Herbert wrote: > > > > > A bit of digging in the commit history of CM found that this distribution > > was added to fix MATH-984 [1] so the EmpericalDistribution can represent > > each bin using a distributi

Re: [Statistics] ContinuousDistribution probability and ConstantContinuousDistribution

2021-08-01 Thread Alex Herbert
On Sun, 1 Aug 2021 at 18:40, Alex Herbert wrote: > > A bit of digging in the commit history of CM found that this distribution > was added to fix MATH-984 [1] so the EmpericalDistribution can represent > each bin using a distribution that can perform sampling of the bin. If a > bin has a single v

Re: [Statistics] ContinuousDistribution probability and ConstantContinuousDistribution

2021-08-01 Thread Gilles Sadowski
Le dim. 1 août 2021 à 19:57, Alex Herbert a écrit : > > On Sun, 1 Aug 2021 at 15:57, Gilles Sadowski wrote: > > > > > > > > > 1. Remove the method > > > > +1 > > > If we remove: > > ContinuousDistribution.probability(double) > > There is the option to rename > > ContinuousDistribution.density(dou

Re: [Statistics] ContinuousDistribution probability and ConstantContinuousDistribution

2021-08-01 Thread Alex Herbert
On Sun, 1 Aug 2021 at 15:57, Gilles Sadowski wrote: > > > > > 1. Remove the method > > +1 If we remove: ContinuousDistribution.probability(double) There is the option to rename ContinuousDistribution.density(double) ContinuousDistribution.logDensity(double) To probability and logProbability

Re: [Statistics] ContinuousDistribution probability and ConstantContinuousDistribution

2021-08-01 Thread Alex Herbert
On Sun, 1 Aug 2021 at 18:20, Gilles Sadowski wrote: > Hi. > > Le dim. 1 août 2021 à 18:52, Alex Herbert a > écrit : > > > > On Sun, 1 Aug 2021 at 15:57, Gilles Sadowski > wrote: > > > > > > > > > > > Do you think that the API defined in the > > > "commons-statistics-distribution" > > > module

Re: [Statistics] ContinuousDistribution probability and ConstantContinuousDistribution

2021-08-01 Thread Gilles Sadowski
Hi. Le dim. 1 août 2021 à 18:52, Alex Herbert a écrit : > > On Sun, 1 Aug 2021 at 15:57, Gilles Sadowski wrote: > > > > > > > Do you think that the API defined in the > > "commons-statistics-distribution" > > module is suitable for implementing this concept: > > https://en.wikipedia.org/wiki

Re: [Statistics] ContinuousDistribution probability and ConstantContinuousDistribution

2021-08-01 Thread Alex Herbert
On Sun, 1 Aug 2021 at 15:57, Gilles Sadowski wrote: > > > Do you think that the API defined in the > "commons-statistics-distribution" > module is suitable for implementing this concept: > https://en.wikipedia.org/wiki/Distribution_(mathematics) > ? > That is a different definition of distri

Re: [Statistics] ContinuousDistribution probability and ConstantContinuousDistribution

2021-08-01 Thread Gilles Sadowski
Hello. Le dim. 1 août 2021 à 16:45, Alex Herbert a écrit : > > The ContinuousDistribution interface has the method: > > /** > * For a random variable {@code X} whose values are distributed according > * to this distribution, this method returns {@code P(X = x)}. > * In other words, this method

[Statistics] ContinuousDistribution probability and ConstantContinuousDistribution

2021-08-01 Thread Alex Herbert
The ContinuousDistribution interface has the method: /** * For a random variable {@code X} whose values are distributed according * to this distribution, this method returns {@code P(X = x)}. * In other words, this method represents the probability mass function * (PMF) for the distribution.