cleverly.interventions.Scale#
- class cleverly.interventions.Scale(factor: float, cap: float | DoseQuantile | SupportBoundary | None, name: str = '', target: Literal['population', 'fold_average'] | None = None)[source]#
Multiply everyone’s dose by
factor, up tocap.\(d(a) = c\,a\) where \(c\,a \le u\), and \(a\) elsewhere. The map is strictly increasing for \(c > 0\), its inverse is \(a / c\) and the derivative of the inverse is \(1 / c\), so the density ratio is
\[h(a, W) = \frac{g(a / c \mid W)}{c\, g(a \mid W)}\,\mathbb 1\{a \le u\} + \mathbb 1\{c\, a > u\}.\]- Parameters:
- factor
float The multiplier. It is positive;
1.0is the natural course.- cap
float,DoseQuantile,SupportBoundaryorNone The largest dose the policy assigns. A unit whose scaled dose would exceed it keeps its own, as for
Shift. A tuner reads it from the treatment law.- name
str The report label. Defaults to
"x1.25"style, with"natural course"forfactor=1.- target{“population”, “fold_average”}
orNone The parameter of a map whose cap is a tuner, as for
Shift.
- factor
Methods#
Attributes#
- Scale.cap: float | DoseQuantile | SupportBoundary | None#