Geometric Adstock Paramter Estimation in PyMC3 and Theano (using theano scan)

Ah found the problem :slight_smile: I knew it must have been a bug ! so basically, my implementation of the geometric adstock using theano.sca returns a list of theano variables. Only the first one is relevant and should be passed to the downstream Normal distribution. So basically the model should be constructed

with pm.Model() as model:
    alpha = pm.Beta('alpha', .5, .5)
    channel_adstock, _ = geometric_adstock_theano(original, alpha)

    likelyhood =pm.Normal('y',mu=channel_adstock[0],observed=transformed,sd=.001)

then the example works beautifully both in terms of MAP inference as well as Baysian sampling.

Thank you anyway!

1 Like