Public Module Reference

CATE Estimators

Double Machine Learning (DML)

econml.dml.DML(*, model_y, model_t, model_final)

The base class for parametric Double ML estimators.

econml.dml.LinearDML(*[, model_y, model_t, ...])

The Double ML Estimator with a low-dimensional linear final stage implemented as a statsmodel regression.

econml.dml.SparseLinearDML(*[, model_y, ...])

A specialized version of the Double ML estimator for the sparse linear case.

econml.dml.CausalForestDML(*[, model_y, ...])

A Causal Forest [cfdml1] combined with double machine learning based residualization of the treatment and outcome variables.

econml.dml.NonParamDML(*, model_y, model_t, ...)

The base class for non-parametric Double ML estimators, that can have arbitrary final ML models of the CATE.

econml.dml.KernelDML([model_y, model_t, ...])

A specialized version of the linear Double ML Estimator that uses random fourier features.

Doubly Robust (DR)

econml.dr.DRLearner(*[, model_propensity, ...])

CATE estimator that uses doubly-robust correction techniques to account for covariate shift (selection bias) between the treatment arms.

econml.dr.LinearDRLearner(*[, ...])

Special case of the DRLearner where the final stage is a Linear Regression on a low dimensional set of features.

econml.dr.SparseLinearDRLearner(*[, ...])

Special case of the DRLearner where the final stage is a Debiased Lasso Regression.

econml.dr.ForestDRLearner(*[, ...])

Instance of DRLearner with a RegressionForest as a final model, so as to enable non-parametric inference.

Meta-Learners

econml.metalearners.XLearner(*, models[, ...])

Meta-algorithm proposed by Kunzel et al. that performs best in settings

econml.metalearners.TLearner(*, models[, ...])

Conditional mean regression estimator.

econml.metalearners.SLearner(*, overall_model)

Conditional mean regression estimator where the treatment assignment is taken as a feature in the ML model.

econml.metalearners.DomainAdaptationLearner(*, ...)

Meta-algorithm that uses domain adaptation techniques to account for

Orthogonal Random Forest (ORF)

econml.orf.DMLOrthoForest(*[, n_trees, ...])

OrthoForest for continuous or discrete treatments using the DML residual on residual moment function.

econml.orf.DROrthoForest(*[, n_trees, ...])

OrthoForest for discrete treatments using the doubly robust moment function.

Instrumental Variable CATE Estimators

Double Machine Learning (DML) IV

econml.iv.dml.OrthoIV(*[, model_y_xw, ...])

Implementation of the orthogonal/double ml method for CATE estimation with IV as described in section 4.2:

econml.iv.dml.DMLIV(*[, model_y_xw, ...])

The base class for parametric DMLIV estimators to estimate a CATE.

econml.iv.dml.NonParamDMLIV(*[, model_y_xw, ...])

The base class for non-parametric DMLIV that allows for an arbitrary square loss based ML method in the final stage of the DMLIV algorithm.

Doubly Robust (DR) IV

econml.iv.dr.DRIV(*[, model_y_xw, ...])

The DRIV algorithm for estimating CATE with IVs.

econml.iv.dr.LinearDRIV(*[, model_y_xw, ...])

Special case of the DRIV where the final stage is a Linear Regression.

econml.iv.dr.SparseLinearDRIV(*[, ...])

Special case of the DRIV where the final stage is a Debiased Lasso Regression.

econml.iv.dr.ForestDRIV(*[, model_y_xw, ...])

Instance of DRIV with a RegressionForest as a final model, so as to enable non-parametric inference.

econml.iv.dr.IntentToTreatDRIV(*[, ...])

Implements the DRIV algorithm for the intent-to-treat A/B test setting

econml.iv.dr.LinearIntentToTreatDRIV(*[, ...])

Implements the DRIV algorithm for the Linear Intent-to-Treat A/B test setting

DeepIV

econml.iv.nnet.DeepIV(*, n_components, m, h, ...)

The Deep IV Estimator (see http://proceedings.mlr.press/v70/hartford17a/hartford17a.pdf).

Sieve Methods

econml.iv.sieve.SieveTSLS(*, t_featurizer, ...)

Non-parametric instrumental variables estimator.

econml.iv.sieve.HermiteFeatures(degree[, ...])

Featurizer that returns(unscaled) Hermite function evaluations.

econml.iv.sieve.DPolynomialFeatures([...])

Featurizer that returns the derivatives of PolynomialFeatures features in a way that's compatible with the expectations of SieveTSLS's dt_featurizer parameter.

Estimators for Panel Data

Dynamic Double Machine Learning

econml.panel.dml.DynamicDML(*[, model_y, ...])

CATE estimator for dynamic treatment effect estimation.

Policy Learning

econml.policy.DRPolicyForest(*[, ...])

Policy learner that uses doubly-robust correction techniques to account for covariate shift (selection bias) between the treatment arms.

econml.policy.DRPolicyTree(*[, ...])

Policy learner that uses doubly-robust correction techniques to account for covariate shift (selection bias) between the treatment arms.

econml.policy.PolicyForest([n_estimators, ...])

Welfare maximization policy forest.

econml.policy.PolicyTree(*[, criterion, ...])

Welfare maximization policy tree.

CATE Interpreters

econml.cate_interpreter.SingleTreeCateInterpreter(*)

An interpreter for the effect estimated by a CATE estimator

econml.cate_interpreter.SingleTreePolicyInterpreter(*)

An interpreter for a policy estimated based on a CATE estimation

CATE Scorers

econml.score.RScorer(*, model_y, model_t[, ...])

Scorer based on the RLearner loss. Fits residual models at fit time and calculates residuals of the evaluation data in a cross-fitting manner::.

econml.score.EnsembleCateEstimator(*, ...)

A CATE estimator that represents a weighted ensemble of many CATE estimators.

Generalized Random Forests

econml.grf.CausalForest([n_estimators, ...])

A Causal Forest [cf1].

econml.grf.CausalIVForest([n_estimators, ...])

A Causal IV Forest [cfiv1].

econml.grf.RegressionForest([n_estimators, ...])

An implementation of a subsampled honest random forest regressor on top of an sklearn regression tree.

econml.grf.MultiOutputGRF(estimator)

Simple wrapper estimator that enables multiple outcome labels for all the grf estimators that only accept a single outcome.

econml.grf.LinearMomentGRFCriterion

A criterion class that estimates local parameters defined via linear moment equations of the form.

econml.grf.LinearMomentGRFCriterionMSE

econml.grf._base_grf.BaseGRF([n_estimators, ...])

Base class for Genearlized Random Forests for solving linear moment equations of the form.

econml.grf._base_grftree.GRFTree(*[, ...])

A tree of a Generalized Random Forest [grftree1]. This method should be used primarily through the BaseGRF forest class and its derivatives and not as a standalone estimator. It fits a tree that solves the local moment equation problem::.

Scikit-Learn Extensions

Linear Model Extensions

econml.sklearn_extensions.linear_model.DebiasedLasso([...])

Debiased Lasso model.

econml.sklearn_extensions.linear_model.MultiOutputDebiasedLasso([...])

Debiased MultiOutputLasso model.

econml.sklearn_extensions.linear_model.SelectiveRegularization(...)

Estimator of a linear model where regularization is applied to only a subset of the coefficients.

econml.sklearn_extensions.linear_model.StatsModelsLinearRegression([...])

Class which mimics weighted linear regression from the statsmodels package.

econml.sklearn_extensions.linear_model.StatsModelsRLM([...])

Class which mimics robust linear regression from the statsmodels package.

econml.sklearn_extensions.linear_model.WeightedLasso([...])

Version of sklearn Lasso that accepts weights.

econml.sklearn_extensions.linear_model.WeightedLassoCV([...])

Version of sklearn LassoCV that accepts weights.

econml.sklearn_extensions.linear_model.WeightedMultiTaskLassoCV([...])

Version of sklearn MultiTaskLassoCV that accepts weights.

econml.sklearn_extensions.linear_model.WeightedLassoCVWrapper(...)

Helper class to wrap either WeightedLassoCV or WeightedMultiTaskLassoCV depending on the shape of the target.

Model Selection Extensions

econml.sklearn_extensions.model_selection.GridSearchCVList(...)

An extension of GridSearchCV that allows for passing a list of estimators each with their own parameter grid and returns the best among all estimators in the list and hyperparameter in their corresponding grid.

econml.sklearn_extensions.model_selection.WeightedKFold([...])

K-Folds cross-validator for weighted data.

econml.sklearn_extensions.model_selection.WeightedStratifiedKFold([...])

Stratified K-Folds cross-validator for weighted data.

Inference

Inference Results

econml.inference.NormalInferenceResults(d_t, ...)

Results class for inference assuming a normal distribution.

econml.inference.EmpiricalInferenceResults(...)

Results class for inference with an empirical set of samples.

econml.inference.PopulationSummaryResults(...)

Population summary results class for inferences.

Inference Methods

econml.inference.BootstrapInference([...])

Inference instance to perform bootstrapping.

econml.inference.GenericModelFinalInference()

Inference based on predict_interval of the model_final model.

econml.inference.GenericSingleTreatmentModelFinalInference()

Inference based on predict_interval of the model_final model.

econml.inference.LinearModelFinalInference()

Inference based on predict_interval of the model_final model.

econml.inference.StatsModelsInference([cov_type])

Stores statsmodels covariance options.

econml.inference.GenericModelFinalInferenceDiscrete()

Assumes estimator is fitted on categorical treatment and a separate generic model_final is used to fit the CATE associated with each treatment.

econml.inference.LinearModelFinalInferenceDiscrete()

Inference method for estimators with categorical treatments, where a linear in X model is used for the CATE associated with each treatment.

econml.inference.StatsModelsInferenceDiscrete([...])

Special case where final model is a StatsModelsLinearRegression

Federated Estimation

econml.federated_learning.FederatedEstimator(...)

A class for federated learning using LinearDML, LinearDRIV, and LinearDRLearner estimators.

Solutions

Causal Analysis

econml.solutions.causal_analysis.CausalAnalysis(...)

Note: this class is experimental and the API may evolve over our next few releases.

Integration with DoWhy

econml.dowhy.DoWhyWrapper(cate_estimator)

A wrapper class to allow user call other methods from dowhy package through EconML.

Utilities

econml.utilities

Utility methods.

Private Module Reference

econml._ortho_learner

Orthogonal Machine Learning is a general approach to estimating causal models by formulating them as minimizers of some loss function that depends on auxiliary regression models that also need to be estimated from data.

econml._cate_estimator

Base classes for all CATE estimators.

econml.dml._rlearner

The R Learner is an approach for estimating flexible non-parametric models of conditional average treatment effects in the setting with no unobserved confounders.

econml.inference._bootstrap

Bootstrap sampling.