Hello all, as agreed in MATH-692, I've looked into making o.a.c.m.distribution.AbstractContinuousDistribution.inverseCumulativeDistribution() more robust. One of the main issues is the fact that the present implementation does not return the expected value when the cumulative distribution has a plateau. This should be recorded as a bug, but there is nothing wrong with the logic of the current implementation of inverseCumulativeDistribution. Rather, the bracketing method and the solver can be slightly altered to return the expected value. As an example, I did quick and dirty modifications, which seem to solve the problem: 1. The contract for bracketing is to return [a, b] such as f(a) * f(b) <= 0. If we require f(a) * f(b) < 0 (strict equality), we ensure that the entire plateau is included. 2. In inverseCumulativeDistribution, I replaced the default solver (Brent) by Bisection (because it's easier to alter if needed). inverseCumulativeDistribution then returns the expected value (ie, the lower-end of the plateau).
The above modifications are very dirty, and their description are very vague for the moment. I will post diff files, as I think there is space for discussion on these points. I would like to open a JIRA ticket on this specific issue, in order not to clutter MATH-692 (which is more design-oriented) too much. Especially, point 1 might be an improvement on the current implementation of the bracketing method, because the "plateau issue" is likely to occur elsewhere in CM. Looking forward to reading your thoughts, Sébastien --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org