superstats.transition.stochastic.jump#

Jump-process transition models.

Classes

Jump([bounds, initial_prior, p_jump, ...])

Simple jump process: stay or jump to a proposal draw.

class superstats.transition.stochastic.jump.Jump(bounds=None, initial_prior=None, p_jump=1.0, proposal_prior=None)[source]#

Bases: StochasticTransition

Simple jump process: stay or jump to a proposal draw.

Parameters:
boundstuple or None, optional, default: None

Lower and upper bounds for the latent state.

initial_priorPrior or None, optional, default: None

Prior for the initial latent state.

p_jumpfloat or Prior, optional, default: 1.0

Probability of jumping at each step (or a Prior to infer per-batch).

proposal_priorPrior or None, optional, default: None

Prior from which to draw proposal values when a jump occurs. Falls back to a standard normal Prior if not provided.

Parameters:

Notes

At each step the process either stays at the previous value or jumps to an independent proposal sampled from proposal_prior.

sample(batch_size, num_steps)[source]#

Draw batch_size jump-process trajectories of length num_steps.

Parameters:
batch_sizeint

Number of independent trajectories to draw.

num_stepsint

Number of time steps per trajectory.

Returns:
resultdict - dictionary with keys local_params,

hyper_params, and fixed_params

Parameters:
  • batch_size (int)

  • num_steps (int)

Return type:

Dict[str, Any]

sample_one_step(x, params)[source]#

Take one step of the jump process.

Parameters:
xfloat

Previous latent state.

paramsdict

Expected key: p_jump.

Returns:
x_nextfloat - the next latent state
Parameters:
Return type:

float