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

estimate_effect() got an unexpected keyword argument 'num_quantiles_to_discretize_cont_cols' #1035

Open
fraseriainlewis opened this issue Sep 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@fraseriainlewis
Copy link

Hi, I am trying to set num_quantiles_to_discretize_cont_cols and am getting the error below. This option appears in the docs but does not seem recognized? It looks like the default value = 5 from the source. I can manually categorize the continuous variables but will the method then re-allocate them into 5 quantiles regardless? thanks.

estimate_effect() got an unexpected keyword argument 'num_quantiles_to_discretize_cont_cols'

causal_estimate_reg = model.estimate_effect(identified_estimand, method_name="backdoor.generalized_linear_model", method_params={'glm_family':sm.families.Binomial(link=sm.families.links.Logit())}, test_significance=False, confidence_intervals=False, num_quantiles_to_discretize_cont_cols=10)

Version information:

  • DoWhy version 0.10.1

Additional context
I am also getting similar error with other arguments passed to this method, e.g. sample_size_fraction.

@fraseriainlewis fraseriainlewis added the bug Something isn't working label Sep 18, 2023
@MichaelMarien
Copy link
Contributor

Hi, just wondering if the parameters you refer to should not be part of the method_params, i.e:

causal_estimate_reg = model.estimate_effect(identified_estimand, method_name="backdoor.generalized_linear_model", method_params={'glm_family':sm.families.Binomial(link=sm.families.links.Logit()), 'test_significance':False, 'confidence_intervals':False, "num_quantiles_to_discretize_cont_cols":10})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants