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

Sébastien Brisard commented on MATH-699:
----------------------------------------

I agree with you: however careful we are, the default implementation will never 
be perfect, and it should be clearly stated in the javadoc. I see (but haven't 
dug into it yet) there is an abstract test for continuous distributions. I'll 
try and make sure that most possible cases of failure of 
{{inverseCumulativeProbability}} are tested in this abstract framework, so that 
users could be *strongly* encouraged to implement this test for their very 
specific distribution.

I do think we can widen a little bit the scope of the default implementation. I 
actually worked towards eliminating the bracketing step, but you convinced me 
that it should be the other way round: can we eliminate the 
domainLower/upperBound methods (which I agree are very efficient, but a little 
bit of a pain in the neck...).

Here is an idea I'm going to check (keeping in mind the accuracy issues you've 
already pointed at)
* for distributions with bounded support: maybe the bounds (possibly shifted if 
the bounds are not inclusive) of the support itself could be used as an initial 
bracketting range.
* for distributions with unbounded support: start from *any* (? or a better 
guess? average value?) point in the support, and do bracketting. However, I do 
agree with Christian, we should use geometric progressions in this case, 
instead of arithmetic progressions. This would probably lead to a very large 
interval, but it would provide us an interval more quickly, and the solver 
itself would probably be quite good at narrowing it very quickly. I can try 
some monitoring on this issue.

As for plateaus, I think what I'm currently working on is not too inefficient. 
I'm sure it's not *the* answer (which is, anyway, 42 :)), but I'm struggling to 
fail this algo... Don't worry, I'll break it. I think that what I've done 
entails very little additional cost (maybe one more evaluation of 
cumulativeProbability) for distributions *without* plateau, but I need to check 
that (we do not want to pay a heavy price for plateaus, since most of our 
distributions do not have one, as you rightly pointed out).

I would be grateful for any idea on these topics, and will keep you informed. 
All the best for now,
Sébastien
                
> 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