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

Sébastien Brisard updated MATH-699:
-----------------------------------

    Attachment: inv-cum-new-impl.zip

Hi,
please find attached a proposal for a new implementation of 
{{inverseCumulativeDistribution}}. For the time being, this new implementation 
is implemented as a static (utility) class, as I would like you to check the 
logics before committing it.
Highlights are
* use of Chebyshev's inequality (thanks Phil) to bracket the root
* in cases where the random variable has no mean or no variance, and is not 
compactly supported, the method falls back to geometric bracketing, instead of 
arithmetic bracketing.
* removal of calls to {{getDomainLowerBound(p)}}, {{getDomainUpperBound(p)}}, 
{{getInitialDomain(p)}}.

The attached class has a main() method which runs some performance checks (new 
impl vs old impl). The report on my machine (Intel Core i5 M540 @2.53GHz, 4Go 
RAM) tends to indicate that the new implementation is slightly quicker than the 
old one.

Commented out is also a plateau detection which proves fairly robust (although 
I'm sure we can fail it), but induces a slight decrease of the overall 
performances. I'm just wondering if we should set a flag in the constructor, to 
indicate whether or not plateaux should be detected ? Alternatively, we could 
remove plateau detection altogether, and clearly state in the javadoc that the 
default impl *fails* with plateaux.

Looking forward to reading your comments,
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, 
> inv-cum-new-impl.zip
>
>
> 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