commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31688] - Proposal for Poisson distributuion
Date Tue, 02 Nov 2004 01:37:20 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31688>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31688

Proposal for Poisson distributuion





------- Additional Comments From brent@worden.org  2004-11-02 01:37 -------
Few comments:

1) The createFormat method uses replaceAll, a JDK 1.4 call.  I think [math] is 
meant to be compatible with JDK 1.3 if not JDK 1.2.

2) I see createFormat is being used to force precision on the inverse 
cumulative probs.  Is there a reason this is being done on intermediate 
results?  Is it necessary at all?

3) For the probability method, I would suggest using the ol' Exp[Log[f(x)]] 
trick to avoid numerical overflow.  n! is a very volatile method for even 
moderate n values.

4) Can the parameter be renamed to something a little more descriptive?  I 
would suggest mean.

5) I think the cumulative probability method can be optimized one of two ways, 
or by utilizing both.  Cumulative probabilities for Poisson can be expressed in 
terms of the regularized gamma function which we already have implemented.  The 
performance of this approach would not deteriorate for large x as the current 
loop does.  At a minimum, instead of making calls to probability for each 
summation term, the ratio of successive terms should be used to alleviate the 
need to call n! for every term.

6) Is there a compelling reason not to use the inverseCumulativeProbability 
method provided by the AbstractDiscreteDistribution class?

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message