jmstate.utils.build_buckets¶
- build_buckets(trajectories)[source]¶
Builds buckets from trajectories for user convenience.
The return 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.
- Parameters:
trajectories (list[Trajectory]) – The list of individual trajectories.
- Raises:
TypeError – If the default dtype is not float32 or float64.
- Returns:
Transition keys with values BucketData.
- Return type:
dict[tuple[Any, Any], BucketData]