-
Notifications
You must be signed in to change notification settings - Fork 723
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
Added blb
inference option to the OrthoForest
#214
Conversation
moprescu
commented
Jan 28, 2020
- Added Bootstrap of Little Bags inference to the ORF classes
- Added tests and updated notebook
- Fixed the marginal effect shape when T is a vector
- Fixed bugs and reorganized class functionality
Also addresses issue #188 |
* Added Bootstrap of Little Bags inference to the ORF classes * Added tests and updated notebook * Fixed the marginal effect shape when T is a vector * Fixed bugs and reorganized class functionality
bedba79
to
8229674
Compare
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, just a few minor comments.
@@ -363,8 +363,7 @@ and the `ForestLearners Jupyter notebook <https://github.com/microsoft/EconML/bl | |||
>>> est.fit(Y, T, W, W) | |||
<econml.ortho_forest.ContinuousTreatmentOrthoForest object at 0x...> | |||
>>> print(est.effect(W[:2])) | |||
[[1. ] | |||
[1.2]] | |||
[1.00... 1.19...] |
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.
If I understand correctly, the shape changing here is good because it was wrong before.
Should I be concerned that the values themselves have changed as well?
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.
Yes, the shape change is intentional. The values have changed because the trees are partitioned into segments ("little bags") that share data, so the same random seed gives slightly different results now.
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.
Hm, so the trees are partitioned even when fit
's inference
option is None
rather than 'blb'
?
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.
Yes, otherwise we'd have two ways of partitioning the tress and it would be hard to keep track of. It doesn't affect the estimate much since that's done using all of the 2*n_trees
leaves. The only difference is which data samples a particular tree uses, i.e. groups slice_len
trees subsample from the same n_samples/2
samples but which n_samples/2
are used differs from group to group.
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.
LGTM