cleverly.datasets.make_recovery_score#
- cleverly.datasets.make_recovery_score(n: int = 4000, *, seed: int | Generator | None = None, backend: Literal['pandas', 'polars'] | str | None = None) tuple[Any, dict[str, float]][source]#
Draw the three-decision navigation program with a 30-day recovery score.
- Parameters:
- Returns:
- frame
dataframe One row per patient, with the columns
lives_alone,discharge_risk,offer_discharge,symptoms_day10,offer_day10,symptoms_day20,offer_day20andrecovery_day30in time order.- truth
dictofstrtofloat ey_regimen[always],ey_regimen[never]andate_regimen[always vs never], and the blip coefficients under the names a fit reports them by: an intercept at each offer, and alives_alonecoefficient at the first two.
- frame
See also
cleverly.datasets.recovery_score_truthThe exact mean score under one plan.
cleverly.datasets.recovery_score_protocolThe study description of the program.
Examples
>>> from cleverly.datasets import make_recovery_score >>> frame, truth = make_recovery_score(10, seed=0) >>> frame.shape (10, 8) >>> round(truth["ate_regimen[always vs never]"], 4) 11.215