MCMCSpec.apply_jitter()

MCMCSpec.apply_jitter()#

MCMCSpec.apply_jitter(seed, value)[source]#

Apply random jitter to a given value using the specified jitter distribution.

If a jitter distribution is set, a random sample from the distribution is added to the original value. If no jitter distribution is set, the original value is returned unchanged.

Parameters:
  • seed (Any) – A PRNG key used for random sampling.

  • value (Any) – The value to which jitter should be applied.

Return type:

Any

Returns:

The jittered value with the same shape as the input.