Skip to content

Commit f2a3f85

Browse files
committed
Update double_ml_cvar.py
1 parent adb4c5e commit f2a3f85

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doubleml/double_ml_cvar.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,16 @@ class DoubleMLCVAR(LinearScoreMixin, DoubleML):
7979
>>> import numpy as np
8080
>>> import doubleml as dml
8181
>>> from doubleml.datasets import make_irm_data
82-
>>> from sklearn.ensemble import RandomForestClassifier
82+
>>> from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
8383
>>> np.random.seed(3141)
84-
>>> ml_g = RandomForestClassifier(n_estimators=100, max_features=20, max_depth=10, min_samples_leaf=2)
84+
>>> ml_g = RandomForestRegressor(n_estimators=100, max_features=20, max_depth=10, min_samples_leaf=2)
8585
>>> ml_m = RandomForestClassifier(n_estimators=100, max_features=20, max_depth=10, min_samples_leaf=2)
8686
>>> data = make_irm_data(theta=0.5, n_obs=500, dim_x=20, return_type='DataFrame')
8787
>>> obj_dml_data = dml.DoubleMLData(data, 'y', 'd')
8888
>>> dml_cvar_obj = dml.DoubleMLCVAR(obj_dml_data, ml_g, ml_m, treatment=1, quantile=0.5)
8989
>>> dml_cvar_obj.fit().summary
90-
coef std err t P>|t| 2.5 % 97.5 %
91-
d 1.462533 0.075714 19.316536 3.899567e-83 1.314136 1.61093
90+
coef std err t P>|t| 2.5 % 97.5 %
91+
d 1.591441 0.095781 16.615498 5.382582e-62 1.403715 1.779167
9292
"""
9393

9494
def __init__(self,

0 commit comments

Comments
 (0)