-
Notifications
You must be signed in to change notification settings - Fork 727
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/orf speed #316
Merged
Merged
Vasilis/orf speed #316
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rs in discrete ORF and passed directly the one hot encoding as T. Removed cross-fitting for Y_hat in the first stage from discrete ORF, which was there by mistake. Removed the creation of split_indices if split_indices is None, but we are in the first stage, since we are not doing cross fitting. Removed the use of np.insert, as it was slower than setting a slice to a constant.
…lynomialfeatures(degree=1, include_bias=True) with np.hstack
… ortho forest. This now replicates exactly the grf functionality. Added some missing tests regarding shape of output of orf and fixed some bad shapes according to API for column y or column t. Added tests for the global residualization. Replaced polynomial fit trasnform in second stage param func with hstack.
… with global_res=True in forest basic examples notebook.
…tion option of continuoustreatment orf. Added all tests and notebook examples
…forests have effect_inference.
kbattocchi
requested changes
Nov 16, 2020
kbattocchi
approved these changes
Nov 16, 2020
…old names with warning. Made Regwrapper private
… both in local and global residualization. Also adding check that all treatments are represented in nuisance estimator, similar to the drorthoforest.
moprescu
approved these changes
Nov 17, 2020
kbattocchi
reviewed
Nov 17, 2020
kbattocchi
reviewed
Nov 17, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Speed up example
For instance, here is a code example with 1000 trees and 1000 prediction points:
Here is the running time of the new code:
and here is the running time of the current master code:
Moreover, now there is a big benefit for parallelism as with 8 cores we get around 5x speed-up, compared to non-parallel.