Documentation for AdaptEllipticalSliceSampler.jl

AdaptEllipticalSliceSampler.AGESSFunction
AGESS(log_posterior, n_MCMC, P; μ_0, Σ_0, init_x, t_dist, ν, burnin, ϵ, single_step_prop, β)

Performs adaptive generalized elliptical slice sampling.

Performs AGESS on a target distribution specified by log_posterior. The target distribution is of dimension P and n_MCMC iterations of Markov chain Monte Carlo will be performed using the AGESS transition scheme.

Arguments

  • log_posterior::Function: a function evaluating the posterior log pdf with only the state (or variables) as the input
  • n_MCMC::Integer: the number of iterations to run the Markov chain for
  • P::Integer: the dimension of the target distribution

Keyword Arguments

  • μ_0::Union{AbstractVector{<:AbstractFloat}, AbstractFloat} = 0.0: a vector (or number which will be multiplied by the one vector) containing the initial (or prior) mean of adaptive distribution
  • Σ_0::Union{AbstractMatrix{<:AbstractFloat}, AbstractFloat} = 1.0: a matrix (or number which will be multiplied by I) containing the initial (or prior) scale of adaptive distribution
  • init_x::Union{AbstractVector{<:AbstractFloat}, AbstractFloat} = 0.0: a vector (or number which will be multiplied by the one vector) containing the initial starting location of the Markov chain
  • t_dist::Bool = true: a Boolean variable indicating whether to use a t-distribution (true) or normal distribution (false) for elliptical slice sampling (Note: should almost always use t-distribution)
  • ν::AbstractFloat = 6.0: the degrees of freedom of the t-distribution
  • burnin::AbstractFloat = 0.25: the proportion of chain used for burnin
  • ϵ::AbstractFloat = 0.05: the proportion of non-adaptive transitions
  • single_step_prop::AbstractFloat = 0.05: the proportion of transitions where we perform one-dimensional updated (P >= 10)
  • β::AbstractFloat = 0.5: the rate at which the adaptation diminishes
  • param_names: optional vector of parameter names (dimension P)
  • blocks::Union{Vector{AGESSBlock}, Nothing} = nothing: optional partition of 1:P into AGESSBlocks for the 1-d update phase (see AGESSBlock's docstring); nothing uses the default per-coordinate updates

Returns

output: a struct of type MCMCChains.Chains:

  • value: An AxisArray object with axes iter × var × chains
  • logevidence : A field containing the logevidence.
  • name_map : A NamedTuple mapping each variable to a section.
  • info : A NamedTuple containing miscellaneous information relevant to the chain.

Examples

For examples, please view the Tutorials section of the documentation.

References

N. Marco and S. T. Tokdar. Adaptive generalized elliptical slice sampling. arXiv preprint arXiv:2605.21659, 2026.

source
AdaptEllipticalSliceSampler.AGESS_single_step!Function
AGESS_single_step!(x, z, params, ph, μ_adapt, Σ_chol_adapt, i)

Performs one iteration of adaptive generalized elliptical slice sampling.

Performs an in-place update of the Markov chain using AGESS. This function should only be used for custom (advanced) sampling schemes (see AGESS for general use). The matrix x contains the Markov chain, while z is an auxiliary variable for constructing the ellipse. ph is a vector used for intermediate calculations of same dimension of z (i.e. dimension of the target distribution). params contains all the information of the Markov chain, including log pdf of target distribution. μ_adapt and Σ_chol_adapt contain information about the mean and scale parameters of the adapted distribution, while i contains the current state of the Markov chain. The current state of X should be populated with the last state of the Markov chain.

Arguments

  • x_current::AbstractVector{<:AbstractFloat}: a vector containing the current state of the Markov Chain
  • x_next::AbstractVector{<:AbstractFloat}: a vector which will contain the next state of the Markov Chain
  • z::AbstractVector{<:AbstractFloat}: a vector used to create the ellipse (dim = P)
  • log_posterior::Function: a function evaluating the log posterior pdf with a vector of parameters as the only input
  • t_dist::Bool: a Boolean containing whether to use the T-distribution to generate ellipses
  • ν::AbstractFloat: the user-specified degrees of freedom
  • P::Integer: the dimension of the target distribution
  • ph::AbstractVector{<:AbstractFloat}: a vector used for intermediate calculations (dim = P)
  • μ_adapt::AbstractVector{<:AbstractFloat}: a vector containing the mean parameter of adapted distribution (dim = P)
  • Σ_chol_adapt::LowerTriangular{<:AbstractFloat, <:AbstractMatrix{<:AbstractFloat}}: a lower triangular matrix containing the cholesky decomposition of the scale parameter of the adapted matrix
  • l_pdf::AbstractFloat: the log posterior density of current state
  • rng::Random.AbstractRNG = Random.default_rng(): random number generator

Examples

For examples, please view the Tutorials section of the documentation.

References

N. Marco and S. T. Tokdar. Adaptive generalized elliptical slice sampling. arXiv preprint arXiv:2605.21659, 2026.

source
AdaptEllipticalSliceSampler.AGESS_single_step_1d!Function
AGESS_single_step_1d!(x, params, μ_adapt, Σ_chol_adapt, i)

Performs one iteration of adaptive generalized elliptical slice sampling in each dimension.

Performs an in-place update of the Markov chain using one-dimensional AGESS updates. This function should only be used for custom (advanced) sampling schemes (see AGESS for general use). The matrix x contains the Markov chain. params contains all the information of the Markov chain, including log pdf of target distribution. μ_adapt and Σ_chol_adapt contain information about the mean and scale parameters of the adapted distribution, while i contains the current state of the Markov chain. The current state of X should be populated with the last state of the Markov chain.

Arguments

  • x_current::AbstractVector{<:AbstractFloat}: a vector containing the current state of the Markov Chain
  • x_next::AbstractVector{<:AbstractFloat}: a vector which will contain the next state of the Markov Chain
  • log_posterior::Function: a function evaluating the log posterior pdf with a vector of parameters as the only input
  • t_dist::Bool: a Boolean containing whether to use the T-distribution to generate ellipses
  • ν::AbstractFloat: the user-specified degrees of freedom
  • μ_adapt::AbstractVector{<:AbstractFloat}: a vector containing the mean parameter of adapted distribution (dim = P)
  • Σ_chol_adapt::LowerTriangular{<:AbstractFloat, <:AbstractMatrix{<:AbstractFloat}}: a lower triangular matrix containing the cholesky decomposition of the scale parameter of the adapted matrix
  • l_pdf::AbstractFloat: the log posterior density of current state
  • perm::AbstractVector{<:Integer}: a vector containing a placeholder for the permutation of indices
  • rng::Random.AbstractRNG = Random.default_rng(): random number generator

Examples

For examples, please view the Tutorials section of the documentation.

References

N. Marco and S. T. Tokdar. Adaptive generalized elliptical slice sampling. arXiv preprint arXiv:2605.21659, 2026.

source
AdaptEllipticalSliceSampler.AGESSSamplerType
AGESSSampler(P, n_MCMC; μ_0, Σ_0, init_x, t_dist, ν, burnin, ϵ, single_step_prop, β)

An AbstractMCMC.AbstractSampler implementing adaptive generalized elliptical slice sampling (AGESS).

Arguments

  • P::Integer: the dimension of the target distribution
  • n_MCMC::Integer: the total number of iterations the sampler is planned to run for (used to schedule burn-in)

Keyword Arguments

  • μ_0::Union{AbstractVector{<:AbstractFloat}, AbstractFloat} = 0.0: a vector (or number which will be multiplied by the one vector) containing the initial (or prior) mean of adaptive distribution
  • Σ_0::Union{AbstractMatrix{<:AbstractFloat}, AbstractFloat} = 1.0: a matrix (or number which will be multiplied by I) containing the initial (or prior) scale of adaptive distribution
  • init_x::Union{AbstractVector{<:AbstractFloat}, AbstractFloat} = 0.0: a vector (or number which will be multiplied by the one vector) containing the initial starting location of the Markov chain
  • t_dist::Bool = true: a Boolean variable indicating whether to use a t-distribution (true) or normal distribution (false) for elliptical slice sampling (Note: should almost always use t-distribution)
  • ν::AbstractFloat = 6.0: the degrees of freedom of the t-distribution
  • burnin::AbstractFloat = 0.5: the proportion of chain used for burnin
  • ϵ::AbstractFloat = 0.05: the proportion of non-adaptive transitions
  • single_step_prop::AbstractFloat = 0.05: the proportion of transitions where we perform one-dimensional updates (P >= 10)
  • β::AbstractFloat = 0.5: the rate at which the adaptation diminishes
  • blocks::Union{Vector{AGESSBlock}, Nothing} = vector of AGESSBlocks used to speed up 1-D updates in warm-up and for singlestepprop iterations

References

N. Marco and S. T. Tokdar. Adaptive generalized elliptical slice sampling. arXiv preprint arXiv:2605.21659, 2026.

source
AdaptEllipticalSliceSampler.AGESSModelType
AGESSModel(log_posterior, P)

A lightweight AbstractMCMC.AbstractModel wrapping a log-posterior function directly, for users who do not want to depend on the LogDensityProblems interface. Also supported: AbstractMCMC.LogDensityModel wrapping any LogDensityProblems-compliant object, for interoperability with the wider Turing ecosystem.

Arguments

  • log_posterior::Function: a function evaluating the log posterior pdf with a vector of parameters as the only input
  • P::Integer: the dimension of the target distribution
source