Thanks for your help.
Yes you understood my problem completely.
I gave a shot with Gaussian likelihood but it is throwing some error. I used this specific line:
y = pm.Normal('y', mu=simulated_results , sigma=0.2, observed=obs)
Here simulated_results is an array of length 7 and obs too is of length 7.
Code:
with pm.Model():
timeLeft = 7
ac = 0
calc_reach = []
maxi = 3400
while(timeLeft>0):
theta1 = pm.Beta('theta1', alpha=2, beta=3)
theta2 = pm.Beta('theta2', alpha=4, beta=20)
old = theta1 * ac
new = theta2 * maxi
res = old + new
ac = new
timeLeft = timeLeft-1
calc_reach.append(reach)
y = pm.Normal('y', mu=calc_reach , sigma = 0.2, observed=obs)
Error: Variable name theta1_logodds__ already exists.
I am not sure what it means. Further if I sample theta1 and 2 above the while loop. Like this:
with pm.Model():
timeLeft = 7
ac = 0
calc_reach = []
maxi = 3400
theta1 = pm.Beta('theta1', alpha=2, beta=3)
theta2 = pm.Beta('theta2', alpha=4, beta=20)
while(timeLeft>0):
old = theta1 * ac
new = theta2 * maxi
res = old + new
ac = new
timeLeft = timeLeft-1
calc_reach.append(reach)
y = pm.Normal('y', mu=calc_reach , tau = 0.2, observed=obs)
start = pm.find_MAP() # Find good starting point
step = pm.Slice() # Instantiate MCMC sampling algorithm
trace = pm.sample(10000, step, start=start, progressbar=False)
Error: Input 0 of the graph (indices start from 0), used to compute Elemwise{neg,no_inplace}(winning_logodds__), was not provided and not given a value. Use the Theano flag exception_verbosity='high', for more information on this error.
I think the core problem lies in the likelihood statement. Not sure though.