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

Phil Steitz edited comment on MATH-699 at 11/7/11 3:18 PM:
-----------------------------------------------------------

My inclination would be to keep the implementation in the base class as simple 
as possible, documenting what it does and pushing the responsibility for 
dealing with plateaus in the distribution to the implementations that have 
these.  I don't think any of the currently implemented real distributions have 
this problem.  Correct?  

The invariant you are proposing for when to return infinities for domain lower 
and upper bounds would make sense if these were intended to be the bounds of 
support for the distribution, but this is not what these properties represent.  
They are initial guesses for where to start when trying to bracket a root.  
That means they have to be values that can be fed into the cumulative 
probability function. I may be missing the point that you and Christian are 
making, but the basic problem is that as Christian points out, we always need 
to start with finite values and that is what led to the somewhat inelegant 
construct of the domain lower/upper bounds as guesses and the need to do the 
bracketing step.  The code you reference is trying to do the bracketing, 
starting with the domain upper and lower bounds as initial guesses.  

Remember to consider convergence problems when the actual parameter to inverse 
cum is close to or exactly equal to 0 or 1.  Per the comment in the code above 
the test that uses (or should use) the function value absolute accuracy, if the 
distribution has bounded support and the argument is 0 or 1, bracketing will 
fail.


                
      was (Author: psteitz):
    My inclination would be to keep the implementation in the base class as 
simple as possible, documenting what it does and pushing the responsibility for 
dealing with plateaus in the distribution to the implementations that have 
these.  I don't think any of the currently implemented real distributions have 
this problem.  Correct?  

The invariant you are proposing for when to return infinities for domain lower 
and upper bounds would make sense if these were intended to be the bounds of 
support for the distribution, but this is not what these properties represent.  
They are initial guesses for where to start when trying to bracket a root.  
That means they have to be values that can be fed into the cumulative 
probability function. Have you convinced yourself that we do not need to 
bracket a root at the beginning?  What bounds would we then provide to the 
solver?  The code you reference is trying to do the bracketing, starting with 
the domain upper and lower bounds as initial guesses.  

Remember to consider convergence problems when the actual parameter to inverse 
cum is close to or exactly equal to 0 or 1.  Per the comment in the code above 
the test that uses (or should use) the function value absolute accuracy, if the 
distribution has bounded support and the argument is 0 or 1, bracketing will 
fail.


                  
> inverseCumulativeDistribution fails with cumulative distribution having a 
> plateau
> ---------------------------------------------------------------------------------
>
>                 Key: MATH-699
>                 URL: https://issues.apache.org/jira/browse/MATH-699
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>            Priority: Minor
>         Attachments: AbstractContinuousDistributionTest.java
>
>
> This bug report follows MATH-692. The attached unit test fails. As required 
> by the definition in MATH-692, the lower-bound of the interval on which the 
> cdf is constant should be returned. This is not so at the moment.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to