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

Pylint: Module causal_testing.testing.causal_test_case #159

Open
jmafoster1 opened this issue Mar 9, 2023 · 0 comments
Open

Pylint: Module causal_testing.testing.causal_test_case #159

jmafoster1 opened this issue Mar 9, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@jmafoster1
Copy link
Contributor

causal_testing/testing/causal_test_case.py:12:0: R0902: Too many instance attributes (9/7) (too-many-instance-attributes)
Currently, we have

        self.base_test_case = base_test_case
        self.control_value = control_value
        self.expected_causal_effect = expected_causal_effect
        self.outcome_variable = base_test_case.outcome_variable
        self.treatment_variable = base_test_case.treatment_variable
        self.treatment_value = treatment_value
        self.estimate_type = estimate_type
        self.effect = base_test_case.effect
        self.effect_modifier_configuration = {}

Perhaps we might want to reconsider the purpose of expected_causal_effect (implemented in CausalTestOutcome') and see if we can rework some aspects of this into there. I think it'd be quite reasonable to have a class to represent "we expect the outcome Y to Increase according to the ATE effect measure". That would cut three variables (outcome_variable, estimate_type, and effect) down to 1. As with AbstractCausalTestCase, we could also pass the effect modifiers directly into the estimator, as we do with the adjustment set. We should also stop unpacking the data class in the init` method!

causal_testing/testing/causal_test_case.py:24:4: R0913: Too many arguments (7/5) (too-many-arguments)
This would be solved by refactoring the above.

@f-allian f-allian added the enhancement New feature or request label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants