cleverly.interventions.check_support#
- cleverly.interventions.check_support(regimes: RegimeSet, treatment: ndarray[tuple[Any, ...], dtype[float64]], propensity: ndarray[tuple[Any, ...], dtype[float64]], *, thresholds: tuple[float, ...] = (0.01, 0.025, 0.05), backend: str | None = None, absolute_score_weights: ndarray[tuple[Any, ...], dtype[float64]] | None = None, equations: tuple[str, ...] = (), n_repeats: int = 1) SupportReport[source]#
Overlap diagnostics for each regime, from the untruncated mechanism.
propensityis the(n, K)mechanism as estimated, before truncation: the question this answers is what the data supports, and a bound chosen to control variance would answer it by construction.backendnames the dataframe library the fit’s data arrived in, so thatSupportReport.to_frame()returns it – which is what this function’s caller already promised in prose and did not deliver. This takes arrays rather than a container, so it has to be told.- Parameters:
- regimes
RegimeSet The evaluated regimes to report on.
- treatment
ndarray (n,)observed treatment, in arm codes.- propensity
ndarray (n, K)mechanism as estimated, before truncation.- thresholds
tupleoffloat Propensity levels the tail mass is reported at.
- backend
strorNone Dataframe backend the fit’s data arrived in, for
SupportReport.to_frame().- absolute_score_weights
ndarrayorNone Fitted
abs(w_i * H_ij)columns, in regime order.Nonerecords an omission instead of rebuilding a possibly different equation.- equations
tupleofstr Fitted score-equation names, in regime order.
- n_repeats
int Number of stored cross-fitting draws. The retained weights describe draw 1.
- regimes
- Returns:
SupportReportOne record per regime, plus the worst case across them.