InterruptedTimeSeries.fit#

InterruptedTimeSeries.fit(**kwargs)#

Run the posterior phase and populate result.

Builds the graph (idempotent), samples NUTS plus posterior predictive draws, then — when the backend supports a prior phase and no prior state exists yet — fills the prior groups and prior_result so idata is as complete as the historical eager fit produced. The posterior runs FIRST because forward-sampling machinery conditions through the graph’s mutable data nodes; re-arming them for every sampling call keeps each phase’s draws computed from the right design. Standalone prior checks stay cheap: call sample_prior_predictive() directly before fit(). Re-running overwrites posterior state only and warns; prior state is preserved.

Returns:

The same experiment, for chaining. This turns every pre-1.0 call site into a one-token migration: cp.InterruptedTimeSeries(...).fit().

Return type:

Self

Parameters:

**kwargs (Any) – Forwarded to the posterior sampler (pymc.sample() for PyMC backends), overriding the model’s stored sample_kwargs for this call only.