[Top][All Lists]

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

[Help-gsl] log probability density functions

From: Sam Mason
Subject: [Help-gsl] log probability density functions
Date: Thu, 29 Mar 2012 12:36:29 +0100


I'm just wondering whether it's deliberate that there aren't any log
probability density functions in the GSL?  I've had a quick search
through the archives and haven't seen anything obvious, but if you
could point me in the right direction that would be great!

As a bit of background, I'm using the GSL for doing Bayesian MCMC
inference and the starting point of a chain tends to be somewhere with
(very) low density.  The lack of log density functions means that
densities will be truncated to zero before I can take the log of them.

For all of the distributions I've looked at in GSL it's been trivial
to rearrange the maths so it's working with log densities and I'd be
happy to tidy up my hacks into a patch if it would be useful to other
people.  Which, as far as I can tell, seems to be anyone doing much
with likelihoods--the product of lots of very small numbers gets
truncated to zero very quickly and working with the log of these is an
easy way of getting sensible results!

Of course, any other suggestions would be appreciated!

Thanks in advance,


reply via email to

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