On Sun, 1 Aug 2021 at 22:28, Gilles Sadowski <gillese...@gmail.com> wrote:
> Le dim. 1 août 2021 à 20:13, Alex Herbert <alex.d.herb...@gmail.com> a > écrit : > > > > On Sun, 1 Aug 2021 at 18:40, Alex Herbert <alex.d.herb...@gmail.com> > 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 value then the ConstantContinuousDistribution applies. > > > > > > Since this does not apply to the code in Commons statistics then I > would > > > suggest dropping it from the library. > > > > > > [1] https://issues.apache.org/jira/browse/MATH-984 > > > > > > > Opinion on dropping ConstantContinuousDistribution > > The class is used in Commons Math.[1] > Yes, my remiss. Of course it would be given MATH-984 is the use case for it. > > since the use case from > > Commons Math does not apply? > > 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 EmpiricalDistribution to function without knowing details of the bin, i.e. all bins have a kernel that is a distribution. I do not know a use case for this distribution and no other library I searched has an implementation. So removing it from the public API makes more sense. Regards, > Gilles > > > https://gitbox.apache.org/repos/asf?p=commons-math.git;a=blob;f=commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/distribution/EmpiricalDistribution.java;h=3fd8bbf4cc0a929811835e5c23590c55a0f2a534;hb=HEAD#l370 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > >