help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Discrete PRNG


From: X Statistics
Subject: Re: [Help-gsl] Discrete PRNG
Date: Tue, 11 Jan 2011 08:00:49 +1100

Hi,

I do not have it but I am interested if you code it up. Please post here if
you do.

In my applications (sampling importance resampling) the number of discrete
values and the draws are large, say greater than 500. Walker's method
(available in GSL) works pretty well for that case. Nowadays, however, I am
using a stratified sampling in which just one uniform random variate must be
draw to obtain a sample of any size M >= 1. That is fast and induces less
variability in the estimation of functions or parameters.

Ralph.

On Tue, Jan 11, 2011 at 7:15 AM, Rodney Sparapani <address@hidden> wrote:

> Hi:
>
> In the General Discrete Distributions section (19.28), I see this blurb:
> ... the idea is to
> preprocess the probability list, and save the result in some form of
> lookup table; then the individual calls for a random discrete event can
> go rapidly.  An approach invented by G. Marsaglia (Generating discrete
> random numbers in a computer, Comm ACM 6, 37-38 (1963)) is very clever,
> and readers interested in examples of good algorithm design are
> directed to this short and well-written paper.  Unfortunately, for
> large K, Marsaglia's lookup table can be quite large.
>
> I have relatively small Ks: 3, 6 and 10.  And, I'd like to try Marsaglia's
> method to see if I can speed up my application.  I have the paper (and I
> could FAX it if you promise to use it fairly ;o)  However,
> I must be missing the trick to program this.  Has anyone tried it?
> I'd be willing to work on contributing this to GSL.
>
> Thanks,
>
> Rodney
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]