nikola-sur / Dynesty.jl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dynesty

Build Status Coverage

A Julia interface to the python nested sampling library dynesty

This is built on PyCall and imports a lot of the functionality of dynesty. There are some differences in the interface to make the code more "Julian".

To install you need to first install dynesty on your Julia aware python repo.

Example

Here we will sample a 5 dimensional Gaussian restricted to the domain [-10,10]5

using Distributions
using Dynesty
# define a distribution
ndim = 5
d = MvNormal(ones(ndim))

loglikelihood(x) = logpdf(d, x)

prior_transform(p) = -10.0 .+ 20.0.*p

smplr = NestedSampler(ndim)

res = dysample(loglikelihood, prior_transform, smplr; dlogz=0.5)

# plot the results
cornerplot(res)

About

License:MIT License


Languages

Language:Julia 100.0%