[
https://issues.apache.org/jira/browse/MATH-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14354525#comment-14354525
]
Thomas Neidhart commented on MATH-1203:
---------------------------------------
Sorry to bugger again, but there is something with the fix that should at least
be documented.
The getKernel method is protected, thus users may override it to return a
different distribution, but the cumulativeProbability method now explicitly
checks if the bin kernel is of type ConstantRealDistribution. Either we
document this explicitly in the javadoc as a requirements when overriding the
method, or we do a check on the variance of the kernel to decide if we have to
do interpolation or not.
> 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)