WillianFuks / tfcausalimpact

Python Causal Impact Implementation Based on Google's R Package. Built using TensorFlow Probability.
Apache License 2.0
593 stars 70 forks source link

modifying alpha. #96

Open aazz7777 opened 2 months ago

aazz7777 commented 2 months ago

how can i modify alpha level?

WillianFuks commented 2 months ago

Hi @aazz7777 ,

By alpha you mean the prior level? See if this helps:

ci = CausalImpact(data, pre_period, post_period, model_args={'prior_level_sd':0.1})
aazz7777 commented 2 months ago

I meant the alpha that affect CI value. 0.05, 0.2 . I noticed that it is set to 0.05

WillianFuks commented 2 months ago

It sure is, simply run: ci = CausalImpact(data, pre_period, post_period, alpha=0.02) for alpha=0.02 for instance.