Functions and options
Use CalibratedDML in Python or calibrated_dml() in R for binary and multi-arm treatment effects.
| Task | Python | R |
|---|---|---|
| Fit from data | CalibratedDML(...).fit(X, A, y) | calibrated_dml(data, outcome, treatment, covariates, ...) |
| Supply predictions | fit.fit_from_nuisances(A, y, mu_mat, pi_mat, ...) | calibrated_dml_from_nuisances(A, Y, mu_mat, pi_mat, ...) |
| Summarize | fit.summary() | summary(fit) |
| Get intervals | fit.confint() | confint(fit) |
Common options
| Option | Default | Purpose |
|---|---|---|
control_level | Python: 0; R: required | Control arm for treatment contrasts. |
outcome_model | "lasso" | Learner for the conditional outcome mean. |
treatment_model | "lasso" | Learner for treatment probabilities. |
n_folds | 5 | Number of cross-fitting folds. |
calibration_method | "auto" | Calibration method. |
inference | "jackknife" | Confidence interval method. |
conf_level | 0.95 | Confidence level. |
jackknife_folds | 10 | Number V of jackknife deletion groups; independent of nuisance cross-fitting. |
bootstrap_reps | 200 | Number of bootstrap replicates. |
Calibration
calibration_method accepts "auto", "isotonic", "smooth_isotonic", or "none". Use "none" to fit the estimator without calibration.
Inference
inference accepts "jackknife", "bootstrap", or "wald". See confidence intervals for the role of each method.
Language guides
Python · R · Adaptive binary-treatment estimators
General linear functionals
calibrated_linear_functional() in R and Python estimates targets of the form
Specify the coefficients directly or provide a row-wise linear function of prediction columns. For example, subtracting two columns defines a treatment contrast; a weighted sum defines a treatment-policy value.
| Input | Contents |
|---|---|
regression, riesz | Cross-fitted predictions at the observed inputs; vectors of length n. |
regression_evaluations | Regression predictions at each input used by the functional; an n-by-k matrix. |
riesz_evaluations | Riesz predictions at those same inputs, in the same column order. |
functional | A function mapping an n-by-k prediction matrix to n contributions, a length-k coefficient vector, or an n-by-k coefficient matrix. |
The evaluation matrices default to the observed predictions as one column. Isotonic calibration uses PAVA for both squared-error and quadratic Riesz losses, including signed representers. Set calibration_method="none" for the uncalibrated one-step estimator. Inference defaults to the V-fold jackknife with V = 10.