help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] Question about the GSL random number generator-wishart (y


From: Patrick Alken
Subject: Re: [Help-gsl] Question about the GSL random number generator-wishart (yorkey)
Date: Thu, 7 Jul 2016 12:04:08 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

Hello,

If you could provide files similar to the existing files in the randist directory for the two new distributions, I can certainly help get them added in.

I am no expert on random number generation so I probably can't help much with the testing. But a quick look at randist/test.c - it looks like the testMoments() generates N random numbers and counts how many fall within [a,b], and compares that with the expected number of p*N. The trick would be determining the appropriate a,b,p from the distribution you are using.

But also it looks like very few of the distributions use the testMoments() test. The testPDF() test looks more important.

Patrick

On 07/07/2016 10:21 AM, Timothée Flutre wrote:
Hello,

it would indeed be very useful to add support for random number generation
for the multivariate Normal and Wishart distributions in the GSL.

I recently obtained C code from colleagues who published an article using
the GSL (Jia and Jannink, Genetics, 2012). It hence is under the GPL, too.
In their code, they added 2 functions, one for multivariate Normal and one
for Wishart.

How can I add these 2 functions to the GSL? Can I simply create files ready
to be included into the GSL and send them to this mailing list?

Moreover, the original authors didn't provide any test. So I guess one
would have to add this. So I had a quick look into "tree/randist/test.c" in
the git repo, but didn't quite understand how "testMoments()" is working. I
can't be considered as a solid C programmer... I can give it a try, but
would anyone be willing to help?

Timothée Flutre

2016-06-21 18:00 GMT+02:00 <address@hidden>:

Send Help-gsl mailing list submissions to
         address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
         https://lists.gnu.org/mailman/listinfo/help-gsl
or, via email, send a message with subject or body 'help' to
         address@hidden

You can reach the person managing the list at
         address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Help-gsl digest..."


Today's Topics:

    1. Question about the GSL random number generator-wishart (yorkey)


----------------------------------------------------------------------

Message: 1
Date: Tue, 21 Jun 2016 10:38:33 +0800
From: yorkey <address@hidden>
To: address@hidden
Cc: yorkey <address@hidden>
Subject: [Help-gsl] Question about the GSL random number
         generator-wishart
Message-ID: <address@hidden>
Content-Type: text/plain; charset=gb2312

Dear Sir or Madam,
      I am using the GSL random number generator to sample cases from
various distributions in my project. It is great to find that GSL supports
lots of distributions. However, neither ?wishart? nor ?inverse wishart? has
been found in GSL. In Gibbs sampling, we always draw samples from the
inverse wishart distribution, which is the conjugate prior for the
covariance matrix of the multivariate gaussian distribution. Notice that
the multivariate gaussian and the related conjugate prior distributions are
frequently employed in Bayesian analysis, I want to know: is there any
alternative implementation of wishart is GSL? Or is there any version under
development supporting the inverse wishart distribution?
     Thanks a lot for your kind attention.

Best,
yorkey



------------------------------

Subject: Digest Footer

_______________________________________________
Help-gsl mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-gsl


------------------------------

End of Help-gsl Digest, Vol 151, Issue 2
****************************************





reply via email to

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