cleverly.datasets.navigation_data#
- cleverly.datasets.navigation_data(n: int = 1000, *, seed: int | Generator | None = None, backend: Literal['pandas', 'polars'] | str | None = None) → tuple[Any, dict[str, float]][source]#
Draw the point-treatment program data, with the columns under the program’s names.
- Parameters:
- Returns:
dataframeThe draw of
make_nonlinear_bounded()with each column renamed. The values and the column order are unchanged.- truth
dictofstrtofloat Exact causal parameters for the data-generating process.
See also
cleverly.datasets.make_nonlinear_boundedThe generator this function renames.
cleverly.datasets.navigation_protocolThe protocol of the program these data describe.
Notes
The same seed gives the same rows as
make_nonlinear_bounded(). Only the names change.The transition score is a share of the maximum score, so every value lies in
(0, 1). A cross-fitted fit of it declaresq_bounds=(0.0, 1.0).Each patient’s true probability of navigation lies in
[0.05, 0.95], as innonlinear_dgp(). This bound gives strong positivity, so the ATE has a finite efficiency bound.generator
program
Ytransition_scoreAtransition_navigationW1discharge_riskW2prior_utilizationW3medication_burdenW4ageExamples
>>> from cleverly.datasets import navigation_data >>> frame, truth = navigation_data(n=500, seed=21) >>> print(*frame.columns, sep="\n") transition_score transition_navigation discharge_risk prior_utilization medication_burden age >>> frame.shape (500, 6) >>> round(truth["ate"], 3) 0.163