sibylhe/mmm_stan

how to get adstock

xsmile10000 opened this issue · 0 comments

Hello,thanks for your great work. I am learning this now.
About the adstock, I ran the following code:

data=pd.DataFrame({"x":[100,100,100,100,100,100,100,100,100,100,100,100,100,100,100]})
L=4
P=1
D=0.8
x_adstocked = apply_adstock(data['x'].values, L, P, D)

Got these numbers:

array([ 26.58160553, 59.80861244, 86.39021797, 100. ,
100. , 100. , 100. , 100. ,
100. , 100. , 100. , 100. ,
100. , 100. , 100. ])

My question is:
Do these numbers are right adstock? or Is there any part i am missing?
Thanks.