commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (MATH-1203) getKernel fails for buckets with only multiple instances of the same value in random.EmpiricalDistribution
Date Tue, 10 Mar 2015 13:40:38 GMT

    [ https://issues.apache.org/jira/browse/MATH-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14354888#comment-14354888
] 

Phil Steitz edited comment on MATH-1203 at 3/10/15 1:40 PM:
------------------------------------------------------------

Thanks for reviewing, Thomas.  I did think about checking variance = 0 instead and probably
should have done that.  In fact, since it is possible that a non-constant user-supplied kernel
can have no support in a bin, the 0/0 computation that led to MATH-1208 could happen even
without variance == 0.  So I guess a more robust test is first check if the distribution is
variance is 0, then check kB > 0.  Thanks again for reviewing.  


was (Author: psteitz):
Thanks for reviewing, Thomas.  I did think about checking variance = 0 instead and probably
should have done that.  In fact, since it is possible that a non-constant user-supplied kernel
can have no support in a bin, the 0/0 computation that led to this bug could happen even without
variance == 0.  So I guess a more robust test is first check if the distribution is variance
is 0, then check kB > 0.  Thanks again for reviewing.  

> 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)

Mime
View raw message