GibbsKernel#
- class liesel.goose.GibbsKernel(position_keys, transition_fn)[source]#
Bases:
ModelMixin
,Kernel
[Any
,DefaultTransitionInfo
,DefaultTuningInfo
]A Gibbs kernel implementing the
Kernel
protocol.Methods
end_epoch
(prng_key, kernel_state, ...)Currently does nothing.
end_warmup
(prng_key, kernel_state, ...)Currently does nothing.
Whether the model interface is set.
init_state
(prng_key, model_state)Initializes an (empty) kernel state.
log_prob_fn
(model_state)Returns the log-probability function with the position as the only argument.
position
(model_state)Extracts the position from a model state.
set_model
(model)Sets the model interface.
start_epoch
(prng_key, kernel_state, ...)Currently does nothing.
transition
(prng_key, kernel_state, ...)Performs an MCMC transition.
tune
(prng_key, kernel_state, model_state, epoch)Currently does nothing.
Attributes
Maps error codes to error messages.
An identifier for the kernel object that is set by the EngineBuilder if it is an empty string.
Returns the model interface if it is set.
Is set to true if the kernel expects the history for tuning.
Keys for which the kernel handles the transition.