util.slice_time()
Slice an elementwise distribution along the time axis -2.
Usage
util.slice_time(
noise_dist,
index,
)The default implementation handles distributions with empty event_shape whose batch_shape ends with (time, obs) (e.g. Normal, StudentT) by slicing each broadcast parameter.
Parameters
noise_dist: dist.Distribution-
The distribution to slice.
index: slice-
A
sliceapplied to the time axis-2of the batch shape.
Returns
dist.Distribution- The same distribution family restricted to the selected time steps.
Raises
NotImplementedError- If the distribution has a non-empty event shape.