dowhy icon indicating copy to clipboard operation
dowhy copied to clipboard

How can i get a deterministic output/estimate?

Open zahs123 opened this issue 2 years ago • 1 comments

Hi,

I am running dowhy using the following:


causal_graph = """digraph {

}"""


#print(df_dowhy)
model = dowhy.CausalModel(data=df_dowhy,
                     graph=causal_graph.replace("\n", " "),
                     treatment="if_use_drug",
                     outcome="outcomel")
model.view_model()
from IPython.display import Image, display
display(Image(filename="causal_model.png"))

estimate = model.estimate_effect(identified_estimand, 
                                 method_name='backdoor.propensity_score_matching',
                                target_units="att")
print(estimate)

NOTE: i have removed the causal model but above is the main skeleton. Every time i run the above for same dataset i get a different estimate.. is there a seed i can set?

Where is the randomness coming from.

Thank you

zahs123 avatar Jul 19 '22 11:07 zahs123

This is related to #418. Working on a fix.

amit-sharma avatar Jul 19 '22 11:07 amit-sharma