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

Refactor GComputation, SLearner, DoubleMachineLearner, and RLearner #45

Closed
dscolby opened this issue Jun 10, 2024 · 4 comments
Closed
Assignees
Labels
design Changing design patterns for maintainability

Comments

@dscolby
Copy link
Owner

dscolby commented Jun 10, 2024

S-learning does almost the same things as G-computation and R-learning is almost the same as double machine learning. Instead of having GComputation and DoubmleMachineLearner encapsulated within SLearner and RLearner and reusing the estimate_causal_effect! method for GComputation and DoubleMachineLearner, we should create AbstractSingleModelLearner and AbstractDoubleMachineLearner types. Then we can get rid of the encapsulation and having separate methods for them in inference.jl and overloading Base.getproperty and Base.setproperty! to get the Y vectors and just have estimate_causal_effect! methods for the abstract classes. The methods would then just do slightly different things for CATE vs ATE estimation.

@dscolby dscolby added the design Changing design patterns for maintainability label Jun 10, 2024
@dscolby dscolby self-assigned this Jun 10, 2024
@dscolby
Copy link
Owner Author

dscolby commented Jun 10, 2024

This should probably get a v0.6.1 release.

@dscolby
Copy link
Owner Author

dscolby commented Jun 10, 2024

This might need to be v0.6 instead because it requires making so many getproperty and setproperty! methods to make it work without refactoring!

@dscolby
Copy link
Owner Author

dscolby commented Jun 11, 2024

Related to #44

@dscolby
Copy link
Owner Author

dscolby commented Jun 17, 2024

Implemented in commit 3c04f9c.

@dscolby dscolby closed this as completed Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Changing design patterns for maintainability
Projects
None yet
Development

No branches or pull requests

1 participant