Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
[![PyPI wheel](https://img.shields.io/pypi/wheel/econml.svg)](https://pypi.org/project/econml/)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/econml.svg)](https://pypi.org/project/econml/)



<h1>
<a href="https://econml.azurewebsites.net/">
<img src="doc/econml-logo-icon.png" width="80px" align="left" style="margin-right: 10px;", alt="econml-logo">
Expand Down Expand Up @@ -691,6 +689,8 @@ We use GitHub Actions to build and publish the package and documentation. To cr

# Blogs and Publications

* May 2021: [Be Careful When Interpreting Predictive Models in Search of Causal Insights](https://towardsdatascience.com/be-careful-when-interpreting-predictive-models-in-search-of-causal-insights-e68626e664b6)

* June 2019: [Treatment Effects with Instruments paper](https://arxiv.org/pdf/1905.10176.pdf)

* May 2019: [Open Data Science Conference Workshop](https://odsc.com/speakers/machine-learning-estimation-of-heterogeneous-treatment-effect-the-microsoft-econml-library/)
Expand Down
3 changes: 2 additions & 1 deletion econml/policy/_drlearner.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,8 @@ def _gen_drpolicy_learner(self):
cv=self.cv,
mc_iters=self.mc_iters,
mc_agg=self.mc_agg,
model_final=PolicyForest(max_depth=self.max_depth,
model_final=PolicyForest(n_estimators=self.n_estimators,
max_depth=self.max_depth,
min_samples_split=self.min_samples_split,
min_samples_leaf=self.min_samples_leaf,
min_weight_fraction_leaf=self.min_weight_fraction_leaf,
Expand Down
4 changes: 2 additions & 2 deletions econml/tests/test_policy_forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ def test_non_standard_input(self,):
model_propensity=DummyClassifier(strategy='uniform'),
featurizer=PolynomialFeatures(degree=1, include_bias=False),
cv=GroupKFold(n_splits=2),
n_estimators=20, n_jobs=1, random_state=123).fit(y, T, X=X,
groups=groups)
n_estimators=100, n_jobs=1, random_state=123).fit(y, T, X=X,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this for test stability?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because n_estimators was never passed correctly to DRPolicyForest in the past, this has always effectively run with n_estimators=100 (the default value), and the tests don't pass if we actually pass 20 through instead.

groups=groups)
mask = np.abs(Xraw[:, 0]) > .1
np.testing.assert_allclose(pred[mask], forest.predict(Xraw[mask]))
np.testing.assert_allclose(pred_val[mask, 1] - pred_val[mask, 0],
Expand Down