py-why / dowhy

DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions. DoWhy is based on a unified language for causal inference, combining causal graphical models and potential outcomes frameworks.
https://www.pywhy.org/dowhy
MIT License
6.88k stars 916 forks source link

how to use the function of estimate_effect of CausalModel class? #1128

Closed cyrilmyself closed 5 months ago

cyrilmyself commented 6 months ago

Ask your question I tried the example of dowhy_causal_discovery_example, when i use estimate_effect function to estimate the effect as below:

企业微信截图_aa2b1c2b-5edb-4201-a426-49b6d137ce6e

what is the meaning of control_value and treatment_value,in the above picture,does it mean if we lift the mpg from 0 to 1, how much will the weight lift? but in the data of auto-mpg,it does not have the sample whose mpg equals 0 or 1. So how does the function of estimate_effect work?

Expected behavior If applicable, a clear and concise description of what you expected to happen.

Version information:

Additional context Add any other context about the problem here.

cyrilmyself commented 5 months ago

Is there someone who can help me?

amit-sharma commented 5 months ago

if we lift the mpg from 0 to 1, how much will the weight lift?

@cyrilmyself your understanding is correct. Such a value may not be present in the dataset but it is still a valid causal question to ask. For this dataset though, it may make more sense to ask about change in mpg values closer to the dataset distribution.

cyrilmyself commented 5 months ago

@amit-sharma thank you very much,it helps me a lot

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 14 days with no activity.