Get Started with pseudostate

This is a reproducible example that shows how to use pseudostate.

import polars as pl
from pseudostate import calculate_pseudostates

times_and_reals = pl.DataFrame({
        "times": [1, 2, 2, 3, 4, 5, 6],
        "reals": [1, 0, 2, 1, 0, 2, 1]
})

fixed_time_horizon = 5

calculate_pseudostates(times_and_reals, fixed_time_horizon)
shape: (7, 5)
times state_occupancy_probability_0 state_occupancy_probability_1 state_occupancy_probability_2 estimate_origin
i64 f64 f64 f64 enum
5 0.3125 0.208333 0.479167 "fixed_time_horizons"
5 0.25 0.333333 0.416667 "fixed_time_horizons"
5 0.3125 0.375 0.3125 "fixed_time_horizons"
5 0.333333 0.166667 0.5 "fixed_time_horizons"
5 0.222222 0.388889 0.388889 "fixed_time_horizons"
5 0.444444 0.388889 0.166667 "fixed_time_horizons"
5 0.0 0.388889 0.611111 "fixed_time_horizons"