jmstate.types.BucketData¶
- class BucketData(idxs, t0, t1)[source]¶
NamedTuple representing a set of transitions for visualization purposes.
This structure stores the transition times of individuals grouped together, typically used to visualize the trajectories per transition type in multistate models. Each entry corresponds to a single transition for a specific individual.
- Variables:
idxs (torch.Tensor) – Indices of individuals corresponding to the transitions in this bucket, shape \((k,)\), where \(k\) is the number of transitions in the bucket.
t0 (torch.Tensor) – Column vector of previous transition times, shape \((k, 1)\). Represents the start time of each transition.
t1 (torch.Tensor) – Column vector of next transition times, shape \((k, 1)\). Represents the end time of each transition.
- Parameters:
idxs (Tensor)
t0 (Tensor)
t1 (Tensor)
Notes
Each tensor is aligned such that t0[i] and t1[i] correspond to the transition of individual idxs[i]. This alignment facilitates plotting or analyzing transitions per type across individuals.
- __init__()¶
- idxs: Tensor¶
Alias for field number 0
- t0: Tensor¶
Alias for field number 1
- t1: Tensor¶
Alias for field number 2