To run them serially, you can use a similar approach to your PyMC 2 example. The main difference is that each call to sample returns a multi-chain trace instance (containing just a single chain in this case). merge_traces will take a list of multi-chain instances and create a single instance...

I think this is related to pymc3 setting theano.config.compute_test_value = 'raise': https://github.com/pymc-devs/pymc3/blob/master/pymc3/model.py#L395 You can explicitly set it back to ignore to get rid of the error....

Yes, its possible to make something with a complex or arbitrary likelihood. Though that doesn't seem like what you're doing here. It looks like you have a complex transformation of one variable into another, the integration step. Your particular exception is that integrate.quad is expecting a numpy array, not a...

bayesian,pymc,multi-level,pymc3

The error means the optimization algorithm finished but returned values that don't make any sense. Usually this is because the maximum isn't well defined. However, this actually worked fine for me. What versions do you have? I have python 2.7, latest pymc3, theano 0.7.0, scipy 0.13...

Yes, determinstic transformations need to be theano expressions in pymc3. So instead of using np.exp you'd use theano.tensor.exp: import theano.tensor as T import pymc3 as pm with Model(): ... regression = pm.Deterministic('regression', T.exp(intercept + atts[away_team] + defs[home_team])) ... ...

Here is my translation of your PyMC2 model: model = pm.Model() with pm.Model() as model: # global model parameters home = pm.Normal('home', 0, .0001) tau_att = pm.Gamma('tau_att', .1, .1) tau_def = pm.Gamma('tau_def', .1, .1) intercept = pm.Normal('intercept', 0, .0001) # team-specific model parameters atts_star = pm.Normal("atts_star", mu =0, tau =tau_att,...

python,parallel-processing,pymc,pymc3

It looks like you are using PyMC2, and as far as I know, you must use some Python approach to parallel computation, like IPython.parallel. There are many ways to do this, but all the ones I know are a little bit complicated. Here is an example of one, which uses...

You need to understand how to vectorise your code. For example: Ui=np.zeros(dim) for k in range(m): Ui+=t.dot(I[i,k],W[k,:]) can be implemented as: Ui = I[None, i] * W Learn on numpy broadcasting. This is a really powerful way of thinking and it do computation faster and with less memory. This work...