Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ uuid = "80f14c24-f653-4e6a-9b94-39d6b0f70001"
keywords = ["markov chain monte carlo", "probabilistic programming"]
license = "MIT"
desc = "A lightweight interface for common MCMC methods."
version = "5.8.2"
version = "5.9.0"

[deps]
BangBang = "198e06fe-97b7-11e9-32a5-e1d131e6ad66"
Expand Down
16 changes: 15 additions & 1 deletion src/AbstractMCMC.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,14 @@ See also [`sample`](@ref).
struct MCMCSerial <: AbstractMCMCEnsemble end

"""
getparams([model::AbstractModel, ]state)
requires_unconstrained_space(sampler::AbstractSampler)::Bool

Return `true` if the given sampler must run in unconstrained space. Defaults to true.
"""
requires_unconstrained_space(::AbstractSampler) = true

"""
getparams([model::AbstractModel, ]state)::Vector{<:Real}

Retrieve the values of parameters from the sampler's `state` as a `Vector{<:Real}`.
"""
Expand All @@ -116,6 +123,13 @@ function getparams(model::AbstractModel, state)
return getparams(state)
end

"""
getstats(state)::NamedTuple

Retrieve sampler statistics from the sampler's `state` as a `NamedTuple`.
"""
function getstats end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd hope we have more specific guidelines on how samplers should implement or use this API.


"""
setparams!!([model::AbstractModel, ]state, params)

Expand Down
Loading