diff --git a/README.rst b/README.rst index 1ffba32b1..693832add 100755 --- a/README.rst +++ b/README.rst @@ -41,6 +41,7 @@ For more example notebooks, see `here! `_ notebook. You can also use Conditional Average Treatment Effect (CATE) estimation methods from other libraries such as EconML and CausalML, as shown in the `Conditional Treatment Effects `_ notebook. +For a full code example, check out the `Getting Started with DoWhy `_ notebook. You can also use Conditional Average Treatment Effect (CATE) estimation methods from `EconML `_, as shown in the `Conditional Treatment Effects `_ notebook. Here's a code snippet. + +.. code:: python + + from sklearn.preprocessing import PolynomialFeatures + from sklearn.linear_model import LassoCV + from sklearn.ensemble import GradientBoostingRegressor + dml_estimate = model.estimate_effect(identified_estimand, method_name="backdoor.econml.dml.DML", + control_value = 0, + treatment_value = 1, + target_units = lambda df: df["X0"]>1, + confidence_intervals=False, + method_params={ + "init_params":{'model_y':GradientBoostingRegressor(), + 'model_t': GradientBoostingRegressor(), + 'model_final':LassoCV(), + 'featurizer':PolynomialFeatures(degree=1, include_bias=True)}, + "fit_params":{}} + ) + Example usage - Graphical causal model (GCM) based inference ------------------------------------------------------------