That’ll run? OK I’ll try it, post code here and update.
But before that, can you explain what this code here is doing?
import pymc3 as pm
import theano.tensor as tt
import pandas as pd
import numpy as np
pred_arr = [[2,3,4],[5,1,9]]
data = [2,3]
with pm.Model() as model:
a_vec = pm.HalfNormal('la',sd=100,shape=(3))
prior = pm.Dirichlet('a',a = a_vec,shape=(3))
det = pm.Deterministic('truval',np.divide(prior,prior.sum()))
likelihood = pm.Normal('y',mu = tt.dot(np.array(pred_arr),det),sd = 0.1,observed = np.array(data).T)
abra = pm.find_MAP()
presumably this isn’t doing what I wrote in the first post, does it just find the alphas which max the probability of the values on the simplex which max the likelihood of the data?
Are there any other tools that you know of that could help solve this problem? Could I write a computational graph representation of it and do the maximisation?
Thank you,
Abhishek Cherath.