cleverly.datasets.make_navigation_doses#
- cleverly.datasets.make_navigation_doses(n: int = 1000, *, seed: int | Generator | None = None, backend: Literal['pandas', 'polars'] | str | None = None) → tuple[Any, dict[str, float]][source]#
Draw discharges with two service doses and a binary transition success.
- Parameters:
- Returns:
dataframeOne row per discharge:
transition_success(1 or 0),navigator_hours,pharmacist_minutes,discharge_risk,ageandmedication_burden.- truth
dictofstrtofloat The exact values of
navigation_doses_truth().
See also
cleverly.datasets.navigation_doses_truthThe exact success share under each dose plan.
cleverly.datasets.navigation_protocolThe protocol of the program these data describe.
Notes
Patients with a higher
discharge_riskget more of both services and succeed less often, so a plain regression of success on the doses is confounded. The module docstring gives the law, andDOSE_PLANSthe plans.Examples
>>> from cleverly.datasets import make_navigation_doses >>> frame, truth = make_navigation_doses(n=500, seed=3) >>> frame.shape (500, 6) >>> sorted(truth)[:2] ['ate_policy[both vs current practice]', 'ate_policy[more navigator time vs current practice]']