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] [Reopened] (MATH-1208) EmpiricalDistribution cumulativeProbability can return NaN when evaluated within a constant bin
Date Mon, 09 Mar 2015 13:51:38 GMT

     [ https://issues.apache.org/jira/browse/MATH-1208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Phil Steitz reopened MATH-1208:
-------------------------------

I think the fix I committed in master: b148046add84f6c5bd19aeceb10c1a0fcf2e1283 is incorrect.
 When a constant kernel is explicitly set, behavior should pass the original version of testKernelOverrideConstant
(with within-bin values less than the point mass not contributing the mass of the bin to the
cumulative probability).   The special handling in cumulativeProbability should be
{code}
if (x < kernel.getNumericalMean()) {
    return pBminus;
 } else {
     return pBminus + pB;
 }
{code}


> EmpiricalDistribution cumulativeProbability can return NaN when evaluated within a constant
bin
> -----------------------------------------------------------------------------------------------
>
>                 Key: MATH-1208
>                 URL: https://issues.apache.org/jira/browse/MATH-1208
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.4.1
>            Reporter: Phil Steitz
>             Fix For: 4.0, 3.5
>
>
> If x belongs to a bin with no variance or to which a ConstantRealDistribution kernel
has been assigned, cumulativeProbability(x) can return NaN.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message