Skip to content

Commit 12356c1

Browse files
committed
added documentation to is_symmetric_proposal
1 parent 82e0542 commit 12356c1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/mh-core.jl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,15 @@ function AbstractMCMC.step(
192192
end
193193

194194
"""
195-
is_symmetric_proposal(proposal)
196-
195+
is_symmetric_proposal(proposal)::Bool
196+
197+
Implementing this for a custom proposal will allow `AbstractMCMC.step` to avoid
198+
computing the "Hastings" part of the Metropolis-Hasting log acceptance
199+
probability (if the proposal is indeed symmetric). By default,
200+
`is_symmetric_proposal(proposal)` returns `false`. The user is responsible for
201+
determining whether a custom proposal distribution is indeed symmetric. As
202+
noted in `MetropolisHastings`, `proposal` is a `Proposal`, `NamedTuple` of
203+
`Proposal`, or `Array{Proposal}` in the shape of your data.
197204
"""
198205
is_symmetric_proposal(proposal) = false
199206

0 commit comments

Comments
 (0)