commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles <gil...@harfang.homelinux.org>
Subject Re: [Math] Separating Sampling from Distributions
Date Thu, 09 Oct 2014 13:43:15 GMT
On Thu, 09 Oct 2014 08:12:06 -0500, Ole Ersoy wrote:
> Hello,
>
> Just sharing a few more thoughts on this WRT:
> https://issues.apache.org/jira/browse/MATH-1124
>
> (1) The issues currently are:
> You have to inject an RNG when using the constructor lengthening
> instantiation time and possibly increasing memory usage without
> benefit.
>
> (2)
> The design of the distribution is heavier than it needs to be.  For
> example if you subclass AbstractIntegerDistribution the code I pasted
> below, which I believe is used only in sampling, is included.  As a
> result of this anything that uses the distributions become heavier 
> and
> more complicated than need be, including:
> - test code
> - subclasses
> - composites
> - etc.
>
> SAMPLING ONLY CODE IN AbstractIntegerDistribution

I'm not sure for "AbstractIntegerDistribution", but 
"inverseCumulativeProbability"
from "AbstractRealDistribution" is used in some classes in package 
"o.a.c.m.stat".

> [...]
>
>
> Side Note:
> There is a logProbability method that just computes the log of a
> probability.  If someone needs to do this can't they just do
> FastMath.log(probability) directly?

I think that, for some distribution, the computation of log(p) is more
accurate. This was a feature request from not long ago.


Regards,
Gilles


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


Mime
View raw message