Dynesty
Documentation for Dynesty.
Dynesty.dyplotDynesty.DynamicNestedSamplerDynesty.DynestyOutputDynesty.NestedSamplerBase.mergeDynesty.boundplotDynesty.cornerboundDynesty.cornerplotDynesty.cornerpointsDynesty.dysampleDynesty.dysampleDynesty.resample_equalDynesty.runplotDynesty.traceplot
Dynesty.dyplot — Constant`dyplot`Object that holds the plotting submodule of the dynesty package
Dynesty.DynamicNestedSampler — Type`DynamicNestedSampler`Julia interface to the dynesty DynamicNestedSampler class. Note that we do not pass the loglikelihood or prior transform function here. Instead this is passed to the dysample call.
Example
# define a distribution
d = MvNormal(ones(10))
loglikelihood(x) = logpdf(d, x)
prior_transform(p) = -10.0 .+ 20.0.*p
smplr = DynamicNestedSampler()
# sample using dynamic nested sampling with 500 initial live points
res = sample(loglikelihood, prior_transform, 10, smplr; dlogz=0.5, nlive_init=500)Dynesty.DynestyOutput — TypeDynestyOutputA objects that holds the dynesty output as well as the sampler. This object can be passed to the plotting functions to produce the usual dynesty diagnostic plots.
Notes
We have also implemented a limited number of Julia's Dictionary interface so you can access the output in the usual Dynesty manner
Example
# define a distribution
d = MvNormal(ones(10))
loglikelihood(x) = logpdf(d, x)
# We only look at finite region of parameter space
prior_transform(p) = -5.0 .+ 10.0.*p
smplr = NestedSampler()
# sample using dynamic nested sampling with 500 initial live points
res = dysample(loglikelihood, prior_transform, 10, smplr; dlogz=0.5, nlive_init=500)
# fetch the samples
res[:samples]
# print the keys
keys(res)Dynesty.NestedSampler — Type`NestedSampler`Julia interface to the dynesty NestedSampler class. Note that we do not pass the loglikelihood or prior transform function here. Instead this is passed to the dysample call.
Example
# define a distribution
d = MvNormal(ones(10))
loglikelihood(x) = logpdf(d, x)
prior_transform(p) = -10.0 .+ 20.0.*p
smplr = NestedSampler()
res = sample(loglikelihood, prior_transform, 10, smplr; dlogz=0.5)Base.merge — Methodmerge(args::DynestyOutput...; print_progres=true)Runs dynesty's merge_runs to combine multiple separate dynesty runs.
Dynesty.boundplot — Methodboundplot(d::DynestyOutput; kwargs...)Produces the boundplot plot from the dynesty.plotting module. For a list of possible kwargs see the dynesty documentation at [dynesty.readthedocs.io]
Dynesty.cornerbound — Methodcornerbound(d::DynestyOutput; kwargs...)Produces the cornerbound plot from the dynesty.plotting module. For a list of possible kwargs see the dynesty documentation at [dynesty.readthedocs.io]
Dynesty.cornerplot — Methodcornerplot(d::DynestyOutput; kwargs...)Produces the cornerplot plot from the dynesty.plotting module. For a list of possible kwargs see the dynesty documentation at [dynesty.readthedocs.io]
Dynesty.cornerpoints — Methodcornerpoints(d::DynestyOutput; kwargs...)Produces the cornerpoints plot from the dynesty.plotting module. For a list of possible kwargs see the dynesty documentation at [dynesty.readthedocs.io]
Dynesty.dysample — Method`dysample(loglikelihood, prior_transform, ndim::Int, s::DynamicNestedSampler; kwargs...)`Runs dynesty's DynamicNestedSampler algorithm with the specified loglikelihood and priortransform. The loglikelihood and priortransform are functions. For the specific relevant kwargs see the dynesty documentation at [https://dynesty.readthedocs.io/]
Dynesty.dysample — Method`sample(loglikelihood, prior_transform, ndim::Int, s::NestedSampler; kwargs...)`Runs dynesty's NestedSampler algorithm with the specified loglikelihood and priortransform. The loglikelihood and priortransform are functions. For the specific relevant kwargs see the dynesty documentation at [https://dynesty.readthedocs.io/]
Dynesty.resample_equal — Methodresample_equal(res::DynestyOutput, nsamples::Int)Resample the dynesty nested sampling run so that the samples have equal weighting. This uses the StatsBase algorithm under the hood.
The results are a vector of vectors where the inner vector corresponds to the samples.
Dynesty.runplot — Methodrunplot(d::DynestyOutput; kwargs...)Produces the runplot plot from the dynesty.plotting module. For a list of possible kwargs see the dynesty documentation at [dynesty.readthedocs.io]
Dynesty.traceplot — Methodtraceplot(d::DynestyOutput; kwargs...)Produces the traceplot plot from the dynesty.plotting module. For a list of possible kwargs see the dynesty documentation at [dynesty.readthedocs.io]