Le dim. 1 août 2021 à 19:57, Alex Herbert <alex.d.herb...@gmail.com> a écrit :
>
> On Sun, 1 Aug 2021 at 15:57, Gilles Sadowski <gillese...@gmail.com> 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. This would then match the names in the
> DiscreteDistribution interface. Functions in Matlab use the term pdf for
> both discrete and continuous distributions. Functions in R use the prefix
> 'p' for probability. So some libraries do use the same term for both types
> of distribution.
>
> The javadoc can be used to distinguish the PMF [1] (discrete distributions)
> and PDF [2] (continuous distributions).
>
> I am not convinced by this rename. The use of density does make it clear
> that it is the probability density function and applies as the derivative
> of the CDF. Integrating the PDF must be used to obtain a probability.

I also think that "density" is the more correct and non-ambiguous term.

Regards,
Gilles

> Wikipedia does state that the term probability function may be used in the
> literature for other functions leading to confusion.
>
> I would just reorder the method's occurrence in the interface to the top,
> matching the occurrence in the DiscreteDistribution interface.
>
> [1] https://en.wikipedia.org/wiki/Probability_mass_function
> [2] https://en.wikipedia.org/wiki/Probability_density_function

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to