cleverly.validation.LogisticHazardOutcome#
- class cleverly.validation.LogisticHazardOutcome(intercept: float = -2.0, effect: float = 0.5, adjustment_scale: float = 1.0, history_effect: float = 0.0)[source]#
Declare a discrete-time event hazard for a survival fit.
At node
ta unit still at risk has the event with probabilityexpit(intercept + f(W) + effect * d_t + history_effect * h_t).fis the standardized covariate sum ofGaussianAdjustmentOutcome, andd_tis the number of treated decision nodes up tot. Witheffect,adjustment_scaleandhistory_effectat 0 the hazard reads nothing, and that declaration is the independent process ofdummy_outcome.- Parameters:
- intercept
float Log-odds of the hazard at
f(W) = 0andd_t = 0.- effect
float Log-odds change per treated decision node.
- adjustment_scale
float Multiplier on the standardized covariate sum.
- history_effect
float Log-odds change per unit of
h_t, the root-count normalized standardized sum of the time-varying columns of nodes 1 tot. Only the longitudinal plasmode reads it, because it draws the history from frozen models and so knows its law under a regimen.
- intercept
Methods#
- LogisticHazardOutcome.probabilities(adjustment: Any, dose: Any) ndarray[source]#
Return the event probability of each unit at one node.
- Parameters:
- adjustmentarray_like
f(W)for each unit.- dosearray_like
Treated decision nodes up to this node, for each unit.
- Returns:
ndarray(n, 1)probabilities of the one cause.
Attributes#
- LogisticHazardOutcome.causes#
Return the number of absorbing causes: one.
- LogisticHazardOutcome.independent#
Return whether the hazard reads neither the covariates nor the treatment.