cleverly.sensitivity.ConfounderStrengthGrid#
- class cleverly.sensitivity.ConfounderStrengthGrid(treatment: tuple[float, ...] | tuple[tuple[str, tuple[float, ...]], ...], outcome: tuple[float, ...])[source]#
Declare treatment and outcome perturbation strengths.
- Parameters:
- treatment
tupleoffloat,ormappingofstrtotupleoffloat Treatment perturbation strengths. Continuous-treatment values are signed linear coefficients. Binary-treatment values are checked as flip probabilities from zero through 0.5 when the surface runs. A vector treatment takes a mapping from each component column to its strengths, read by that component’s law, and the surface evaluates every combination. The mapping is stored as
(column, strengths)pairs in the declared order.- outcome
tupleoffloat Outcome perturbation strengths. Gaussian strengths are signed. Binomial strengths are checked as flip probabilities when the surface runs.
- treatment
- Attributes:
componentstupleofstrThe component columns of a per-component grid, or
()for one axis.treatment_pointstupleEvery treatment strength the surface evaluates, in grid order.
See also
simulated_confoundingEvaluate the declared strength pairs.
Methods#
Attributes#
- ConfounderStrengthGrid.components#
The component columns of a per-component grid, or
()for one axis.
- ConfounderStrengthGrid.treatment_points#
Every treatment strength the surface evaluates, in grid order.
One float per value of a one-axis grid. A per-component grid gives one tuple per combination, in the order of
components.