commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: [math] Generate random data using the Inverse CDF Method?
Date Mon, 02 Nov 2009 21:24:32 GMT
I think that it would be good to have samplers in the random package.

One reasonable one would be InverseCumulativeSampler.

Another would be something like RecursiveLookupTableDiscreteSampler

The generic nextSample routine could call the most generic sampler we have.
I would guess that would start with InverseCumulativeSampler and for
discrete distributions it might use a slightly more clever sampler that
switches from InverseCumulativeSampler to something more advanced after
being called a few times (that being the clue that some setup time would be
reasonable).

On Mon, Nov 2, 2009 at 1:06 PM, Mikkel Meyer Andersen <mikl@mikl.dk> wrote:

> Another way of implementing the functionality is to call some
> nextSample(Abstract{Continuous, Discrete}Distribution) in the Random
> package from the Distribution-classes
>



-- 
Ted Dunning, CTO
DeepDyve

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message