Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add init_params keyword argument #26

Merged
merged 10 commits into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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 src/abstractmcmc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function AbstractMCMC.step(
rng::Random.AbstractRNG, model::AbstractMCMC.AbstractModel, ::ESS; kwargs...
theogf marked this conversation as resolved.
Show resolved Hide resolved
)
# initial sample from the Gaussian prior
f = initial_sample(rng, model)
f = initial_sample(rng, model; kwargs...)
theogf marked this conversation as resolved.
Show resolved Hide resolved

# compute log-likelihood of the initial sample
loglikelihood = Distributions.loglikelihood(model, f)
Expand Down
2 changes: 1 addition & 1 deletion src/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Return the initial sample for the `model` using the random number generator `rng

By default, sample from [`prior(model)`](@ref).
"""
function initial_sample(rng::Random.AbstractRNG, model::AbstractMCMC.AbstractModel)
function initial_sample(rng::Random.AbstractRNG, model::AbstractMCMC.AbstractModel; kwargs...)
theogf marked this conversation as resolved.
Show resolved Hide resolved
return Random.rand(rng, prior(model))
end

Expand Down