-
Notifications
You must be signed in to change notification settings - Fork 99
LPLR model #365
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
base: main
Are you sure you want to change the base?
LPLR model #365
Conversation
Added test set-up
SvenKlaassen
left a comment
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.
Thanks. Looks already quite great.
Can you further add two test files test_model_defaults.py and test_return_types.py to the plm submodule similar to (https://github.com/DoubleML/doubleml-for-py/blob/main/doubleml/did/tests/test_return_types.py and https://github.com/DoubleML/doubleml-for-py/blob/main/doubleml/did/tests/test_model_defaults.py).
Only add the corresponding tests for DoubleMLLPLR and I can move the tests from the other classes from the tests directory later.
| """ | ||
| return self._learner | ||
|
|
||
| @property |
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 think it is a good idea to include a more obvious property for the name, but this should be identical to params_names right?
Especially how it is handled in evaluate_learners(). So do we need a extra list?
|
|
||
| # nuisance m | ||
| if m_external: | ||
| m_hat = {"preds": external_predictions["ml_m"], "targets": None, "models": None} |
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.
For the elements where it is possible can you add the targets to the external predicitons (as in
doubleml-for-py/doubleml/irm/apo.py
Line 261 in 99e4116
| "targets": _cond_targets(y, cond_sample=(treated == 1)), |
evaluate_learners() with external predicitons (available for all new methods).
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.
Added except for ml_t, which is fold specific
| def _nuisance_tuning( | ||
| self, smpls, param_grids, scoring_methods, n_folds_tune, n_jobs_cv, search_mode, n_iter_randomized_search | ||
| ): | ||
| if self._i_rep is None: |
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.
Especially since we would like to remove fold-specific hyperparameters.
Addition of logistic partially linear model.
Created PR to check for merging and review changes. Unit tests in work.