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

find the respont and point.pred #89

Open aazz7777 opened 3 months ago

aazz7777 commented 3 months ago

I'm trying to find dw score and mape value

In R preperiod <- subset(impact$series, cum.effect == 0) Looks like impact$series ioutput return all the outout where cum.effect is 0.

I want to get the value that refer in R. what would be the python using inference? This respoinse and point.pred value preperiod$res <- preperiod$response - preperiod$point.pred

is it possible to know Which one is equivalent to point prediction ?

Thank you in advance!

WillianFuks commented 3 months ago

Hi @aazz7777 ,

Not sure if I understood correctly your question but if your looking for the equivalents of response and point.pred it think they would be ci.post_data[:, 0] and ci.complete_preds_means (where date < pre_period).

aazz7777 commented 3 months ago

thank you! yes I wanted to extract point.pred which is average prediction value! preperiod$response was just y value for preintervention period!