Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
nefrathenrici committed Feb 23, 2024
1 parent a6a0f5e commit 1866639
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/emulate_sample.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,17 @@ The initial stepsize can be specified by `init_stepsize` with a default of 0.1,
and the number of initial samples to discard can be set by `discard_initial` with a default of 0.
Returns both the MCMC object and the samples in a NamedTuple.
"""
function sample(emulator, y_obs, prior, init_params; n_samples = 100_000, init_stepsize = 0.1, discard_initial = 0)
function sample(
emulator,
y_obs,
prior,
init_params;
n_samples = 100_000,
init_stepsize = 0.1,
discard_initial = 0,
)
mcmc = MCMCWrapper(RWMHSampling(), y_obs, prior, emulator; init_params)
new_step = optimize_stepsize(
mcmc;
init_stepsize,
N = 2000,
discard_initial,
)
new_step = optimize_stepsize(mcmc; init_stepsize, N = 2000, discard_initial)
chain = MarkovChainMonteCarlo.sample(
mcmc,
n_samples;
Expand Down

0 comments on commit 1866639

Please sign in to comment.