Documentation for AdaptEllipticalSliceSampler.jl
AdaptEllipticalSliceSampler.AGESS — FunctionAGESS(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 inputn_MCMC::Integer: the number of iterations to run the Markov chain forP::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 distributioninit_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 chaint_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-distributionburnin::AbstractFloat = 0.25: the proportion of chain used for burninϵ::AbstractFloat = 0.05: the proportion of non-adaptive transitionssingle_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
Returns
output: a struct containing the following:
samps::AbstractMatrix{<:AbstractFloat}: a matrix containing the states of the Markov chain (n_MCMC x P)l_pdf::AbstractVector{<:AbstractFloat}: a vector containing the posterior log pdf evaluated at each state of the Markov chainparams::struct: a struct containing the following:log_posterior::Function: the user-specified functionμ_0::AbstractVector{<:AbstractFloat}: the user-specified initial meanΣ_0::AbstractMatrix{<:AbstractFloat}: the user-specified initial scalet_dist::Bool: the user-specified valueν::AbstractFloat: the user-specified degrees of freedomβ::AbstractFloat: the user-specified βsingle_step_prop::AbstractFloat: the user-specified valueburnin::AbstractFloat: the user-specified valueϵ::AbstractFloat: the user-specified valuen_MCMC::Integer: the user-specified number of iterationsP::Integer: the user-specified dimension of target distribution
adapted_Σ::AbstractMatrix{<:AbstractFloat}: the adapted (learned) scale matrixadapted_μ::AbstractVector{<:AbstractFloat}: the adapted (learned) mean vector
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.
AdaptEllipticalSliceSampler.AGESS_MCMC_params — TypeAGESS_MCMC_params(log_posterior, μ_0, Σ_0, t_dist, ν, β, single_step_prop, burnin, ϵ, n_MCMC, P)A struct containing user-specified values.
Arguments
log_posterior::Function: the user-specified functionμ_0::AbstractVector{<:AbstractFloat}: the user-specified initial meanΣ_0::AbstractMatrix{<:AbstractFloat}: the user-specified initial scalet_dist::Bool: the user-specified valueν::AbstractFloat: the user-specified degrees of freedomβ::AbstractFloat: the user-specified βsingle_step_prop::AbstractFloat: the user-specified valueburnin::AbstractFloat: the user-specified valueϵ::AbstractFloat: the user-specified valuen_MCMC::Integer: the user-specified number of iterationsP::Integer: the user-specified dimension of target distribution
AdaptEllipticalSliceSampler.AGESS_single_step! — FunctionAGESS_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::AbstractMatrix{<:AbstractFloat}: a matrix containing the Markov chain (n_MCMC x P)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 inputt_dist::Bool: a Boolean containing whether to use the T-distribution to generate ellipsesν::AbstractFloat: the user-specified degrees of freedomP::Integer: the dimension of the target distributionph::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 matrixl_pdf::AbstractFloat: the log posterior density of current statei::Integer: the iteration of the Markov 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.
AdaptEllipticalSliceSampler.AGESS_single_step_1d! — FunctionAGESS_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::AbstractMatrix{<:AbstractFloat}: a matrix containing the Markov chain (n_MCMC x P)log_posterior::Function: a function evaluating the log posterior pdf with a vector of parameters as the only inputt_dist::Bool: a Boolean containing whether to use the T-distribution to generate ellipsesν::AbstractFloat: the user-specified degrees of freedomP::Integer: the dimension of the target distributionμ_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 matrixl_pdf::AbstractFloat: the log posterior density of current stateperm::AbstractVector{<:Integer}: a vector containing a placeholder for the permutation of indicesi::Integer: the iteration of the Markov 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.