MCMCSpec#
- class liesel.goose.MCMCSpec(kernel, kernel_kwargs=<factory>, kernel_group=None, jitter_dist=None, jitter_method='additive')[source]#
Bases:
objectSpecification for the MCMC kernel and optional jitter distribution associated with a model variable.
- Parameters:
kernel (
KernelFactory) – A KernelFactory that returns aKernelinstance when provided with position keys and keyword arguments.kernel_kwargs (
dict[str,Any]) – Additional keyword arguments to be passed to the kernel callable. (default:<factory>)kernel_group (
str|None) – Name of the kernel group this variable belongs to. Variables in the same group must share the same kernel type and arguments. (default:None)jitter_dist (
Distribution|None) – A TensorFlow Probability distribution used to apply random jitter to the initial value of the variable. (default:None)jitter_method (
Literal['additive','multiplicative','replacement']) – The type of jitter to be applied. This can be one of the following: - none: No jitter is applied. - additive: Additive jitter is applied. - multiplicative: Multiplicative jitter is applied. - replacement: Value is replaced when jitter is applied. (default:'additive')
Methods
apply_jitter(seed, value)Apply random jitter to a given value using the specified jitter distribution.
Attributes