-
Notifications
You must be signed in to change notification settings - Fork 724
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
Hyperparameter tuning for CausalForestDML #390
Conversation
…ith sklearn logic for future easier extendibility.
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, but sample splitting may need some thought, and I added a few other comments.
econml/dml/causal_forest.py
Outdated
out of sample R-score. After the function is called, then all parameters of `self` have been | ||
set to the optimal hyperparameters found. |
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.
Maybe explicitly mention that although the parameters will have been updated, this estimator will not have been fit with this data.
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.
now only final stage params are tunable
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.
I still think it's worth mentioning that this estimator has not been fit with this data, so that the user knows that the they still have to call fit afterward.
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.
Or alternatively, in your notebooks I think you always use:
est.tune(...)
est.fit(...)
Are there times a user would not want to do that, or should calling fit just be folded into tune so that it saves the user the trouble?
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.
That's what I'm doing in the notebooks I think.
I think it's good to have separate. Maybe someone wants to tune on a subset of the data or some small chunk. Also the tune does not need to take other keyword args like inference, cache_values etc.
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.
I added the extra docstring comment that the returned self is not yet fitted.
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
No description provided.