Skip to content
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

[Feature Request]: Classification Learner for ml_l #185

Open
simonschoe opened this issue Jun 3, 2023 · 4 comments
Open

[Feature Request]: Classification Learner for ml_l #185

simonschoe opened this issue Jun 3, 2023 · 4 comments
Labels
enhancement extension of existing feature new feature new feature

Comments

@simonschoe
Copy link

simonschoe commented Jun 3, 2023

Describe the feature you want to propose or implement

Currently, ml_m allows for a classfication learner while ml_l does not. What is the rationale behind this choice? It could easily be the case that both the treatment D and the outcome Y are binary variables in which case it is desirable to use classification learners on both stages.

Propose a possible solution or implementation

No response

Did you consider alternatives to the proposed solution. If yes, please describe

No response

Comments, context or references

No response

@simonschoe simonschoe added enhancement extension of existing feature new feature new feature labels Jun 3, 2023
@PhilippBach
Copy link
Member

Hello @simonschoe ,

thanks for opening this issue and apologies for the late response. To which of the causal models does your feature request apply? Could you maybe give a brief example?

@simonschoe
Copy link
Author

Sorry, there was a typo in the initial issue description. Essentially, I was trying to implement a generalized linear model (logit/poisson) on the first and second stage. What I realized is: ml_l (second stage) only allows for a LearnerRegr and not for a LearnerClassif while ml_m allows for both.

Say my treatment $D$ is binary and my outcome $Y$ is also a binary variable. In such a setting, I would like to use LearnerClassif for both ml_m and ml_l.

@PhilippBach
Copy link
Member

Thank you! Indeed, there is a paper (and code) available for logistic regression with Double Machine Learning. However, we haven't had time to implement it yet: https://arxiv.org/abs/2009.14461

We have the model on the list of our planned extensions, but it's hard to say when this will be implemented. In case you want to contribute it, feel free to have a look at https://github.com/DoubleML/doubleml-for-r/blob/main/CONTRIBUTING.md

Otherwise I think we only have the regression learner for the outcome variable right now. I'm not sure, if the PLR would work with a classifier for the main regression, but maybe you could test it in some simulation... Technically, I think it would be only necessary to adjust this line of code to also accept classifiers for ml_l

ml_l = private$assert_learner(ml_l, "ml_l", Regr = TRUE, Classif = FALSE)

@PhilippBach PhilippBach changed the title [Feature Request]: Classification Learner for l_lm [Feature Request]: Classification Learner for l_l Oct 6, 2023
@PhilippBach PhilippBach changed the title [Feature Request]: Classification Learner for l_l [Feature Request]: Classification Learner for ml_l Oct 6, 2023
@PhilippBach
Copy link
Member

In case $Y$ and $D$ are both binary, you could also consider an IRM model, which works with classifiers for both

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement extension of existing feature new feature new feature
Projects
None yet
Development

No branches or pull requests

2 participants