@@ -81,23 +81,27 @@ The `MCMCSerial` algorithm allows users to sample serially, with no thread or pr
81
81
struct MCMCSerial <: AbstractMCMCEnsemble end
82
82
83
83
"""
84
- getparams(state[; kwargs... ])
84
+ getparams(state[, logdensity_function ])
85
85
86
86
Retrieve the values of parameters from the sampler's `state` as a `Vector{<:Real}`.
87
87
"""
88
88
function getparams end
89
89
90
90
"""
91
- setparams!!(state, params)
91
+ setparams!!(state, params[, logdensity_function] )
92
92
93
93
Set the values of parameters in the sampler's `state` from a `Vector{<:Real}`.
94
94
95
95
This function should follow the `BangBang` interface: mutate `state` in-place if possible and
96
96
return the mutated `state`. Otherwise, it should return a new `state` containing the updated parameters.
97
97
98
- Although not enforced, it should hold that `setparams!!(state, getparams(state)) == state`. In another
99
- word , the sampler should implement a consistent transformation between its internal representation
98
+ Although not enforced, it should hold that `setparams!!(state, getparams(state)) == state`. In other
99
+ words , the sampler should implement a consistent transformation between its internal representation
100
100
and the vector representation of the parameter values.
101
+
102
+ Sometimes, to maintain the consistency of the log density and parameter values, an optional
103
+ `logdensity_function` can be provided. This is useful for samplers that need to evaluate the
104
+ log density at the new parameter values.
101
105
"""
102
106
function setparams!! end
103
107
0 commit comments