cleverly.interventions.SupportBoundary#

class cleverly.interventions.SupportBoundary(learner: Any, q: float, features: tuple[str, ...] = (), bandwidth: Literal['silverman', 'undersmoothed'] = 'silverman')[source]#

The cap at a learned conditional quantile of the dose: c(h).

The learner is LinearQuantileRegression or an unfitted scikit-learn regressor that estimates the level-q conditional quantile, for example GradientBoostingRegressor(loss="quantile", alpha=q). The fit clones it and fits it on the units at risk. Only LinearQuantileRegression has a finite-dimensional parameter, so a different learner supports target="fold_average" only.

Parameters:
learnerLinearQuantileRegression or estimator

The boundary learner.

qfloat

The quantile level, in (0, 1).

featurestuple of str

The policy-frame columns a learner other than LinearQuantileRegression reads. Empty for LinearQuantileRegression, which names its own.

bandwidth{“silverman”, “undersmoothed”}

The bandwidth rule of the derivative and of \(J\).

Attributes:
feature_namestuple of str

The policy-frame columns the boundary reads.

finite_dimensionalbool

Whether the boundary is indexed by a finite vector that solves an estimating equation.

Methods#

Attributes#

SupportBoundary.bandwidth: Literal['silverman', 'undersmoothed'] = 'silverman'#
SupportBoundary.feature_names#

The policy-frame columns the boundary reads.

SupportBoundary.features: tuple[str, ...] = ()#
SupportBoundary.finite_dimensional#

Whether the boundary is indexed by a finite vector that solves an estimating equation.

SupportBoundary.learner: Any#
SupportBoundary.q: float#