Skip to content

Commit

Permalink
fix spacing in docs example
Browse files Browse the repository at this point in the history
  • Loading branch information
Red-Portal committed Nov 16, 2023
1 parent 85d4a26 commit 7d5ab66
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/src/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct Gibbs end
function step(rng::Random.AbstractRNG, model::Model, ::Gibbs, θ)
y = model.y
σ = model.σ
σ = model.σ
rand(rng, MvNormal([y]/2, σ))
end
nothing
Expand All @@ -45,7 +45,7 @@ struct RWMH
end
function step(rng::Random.AbstractRNG, model::Model, kernel::RWMH, θ)
σ = kernel.σ
σ = kernel.σ
θ′ = rand(rng, MvNormal(θ, σ))
ℓπ = logdensity(model, θ)
ℓπ′ = logdensity(model, θ′)
Expand All @@ -66,7 +66,7 @@ This is done by as follows:
using MCMCTesting
function MCMCTesting.sample_joint(rng::Random.AbstractRNG, model::Model)
σ = model.σ
σ = model.σ
θ = rand(rng, Normal(0, σ))
y = rand(rng, Normal(θ, σ))
[θ], [y]
Expand All @@ -82,7 +82,7 @@ using Accessors
function MCMCTesting.markovchain_transition(
rng::Random.AbstractRNG, model::Model, kernel, θ, y
)
model′ = @set model.y = only(y)
model′ = @set model.y = only(y)
step(rng, model′, kernel, θ)
end
nothing
Expand All @@ -104,15 +104,15 @@ struct GibbsWrongMean end
function step(rng::Random.AbstractRNG, model::Model, ::GibbsWrongMean, θ)
y = model.y
σ = model.σ
σ = model.σ
rand(rng, MvNormal([y], σ/2))
end
struct GibbsWrongVar end
function step(rng::Random.AbstractRNG, model::Model, ::GibbsWrongVar, θ)
y = model.y
σ = model.σ
σ = model.σ
rand(rng, MvNormal([y/2], 2*σ))
end
nothing
Expand Down

0 comments on commit 7d5ab66

Please sign in to comment.