[
https://issues.apache.org/jira/browse/MATH-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14352272#comment-14352272
]
Thomas Neidhart commented on MATH-1203:
---------------------------------------
I have seen that Phil fixed this issue, but there is still something wrong in
case a bin has a constant real distribution as kernel:
{code}
final double[] data = {0, 0, 1, 1};
EmpiricalDistribution dist = new EmpiricalDistribution(2);
dist.load(data);
System.out.println(dist.cumulativeProbability(0));
{code}
Will output NaN. I have seen this while taking a look, but did not yet have the
time to further dig into it.
> getKernel fails for buckets with only multiple instances of the same value in
> random.EmpiricalDistribution
> ----------------------------------------------------------------------------------------------------------
>
> Key: MATH-1203
> URL: https://issues.apache.org/jira/browse/MATH-1203
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.4, 3.4.1
> Reporter: Kyle Kavanagh
>
> After loading a set of values into an EmpericalDistribution, assume that
> there's a case where a single bin ONLY contains multiple instances of the
> same value. In this case the standard deviation will equal zero. This will
> fail when getKernel attempts to create a NormalDistribution. The other case
> where stddev=0 is when there is only a single value in the bin, and this is
> handled by returning a ConstantRealDistribution rather than a
> NormalDistrbution.
> See: https://issues.apache.org/jira/browse/MATH-984
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)