-
Notifications
You must be signed in to change notification settings - Fork 733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vasilis/local linear #13
Conversation
vasilismsr
commented
Mar 16, 2019
•
edited
Loading
edited
- Optimized computations in causal tree to reduce overall ortho forest computation by two orders of magnitude. Improvement in fitting time primarily came from replacing internal loop over candidate splits with numpy array calculations. Improvement in predict time came from removing parallelism, which was adding data copy overhead.
- Added local linear correction (as in Athey, Friedman, Wager) to both ortho forest classes for better local fits.
- Minor edits in the ortho forest and causal tree architecture and default parameters.
…emoved the second order parameters from the moment and gradient function so that node splitting only depends on the first order intercepts and not on the second order linear part
…parate moment and mean gradient for first and second stage. Changed local linear ortho forest so that sample splitting happens in the same way as continuous ortho forest (i.e. just based on intercepts), while final only final stage estimation has the local linear part.
…ss. Small changes to discrete treatment forest defaults
…nterval coverage.
…/EconML into vasilis/local-linear
…t classes. threading seems to be avoiding the data copying overhead.
… causal_tree class.
…ully and was raising error in MacOS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good to me, but would be good to have Miruna approve, too. I've made a few suggestions.
Co-Authored-By: vasilismsr <[email protected]>
Co-Authored-By: vasilismsr <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good! Went line by line and can't find any bugs/issues. I left some minor comments below.
econml/ortho_forest.py
Outdated
T_hat = _cross_fit(model_T, X_tilde, T, split_indices, sample_weight=sample_weight) | ||
Y_hat = _cross_fit(model_Y, X_tilde, Y, split_indices, sample_weight=sample_weight) | ||
else: | ||
T_hat = model_T.fit(X_tilde, T, sample_weight=sample_weight).predict(X_tilde) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The weights are never used in the first stage. I think we should omit passing them in here so the user doesn't have to pass in a weighted model for model_T
and model_Y
. This will potentially avoid some issues in the future. Same for the DiscreteTreatmentOrthoForest
nuisance estimator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check out if I did it correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moprescu Looks like I need to dismiss this review to enable checkin - I assume that's okay with you.
Vasilis has addressed the requested changes