I’m trying to sample a multivariate categorical variable whose values are different than simple 0…N. Is it possible to add “values” to
More specifically, I’m have a RV that take the values [-1,0,1] with probabilities [0.2,0.5,0.3]. At the moment I’m doing:
tmp = pm.Categorical('tmp',p=[0.2,0.5,0.3]) X = pm.Deterministic('X',tmp-1)
I’ve tried using
tt.switch in order to map the 0…N values to the desired values, but it doesn’t seem to work (perhaps it fails somewhere between PyMC’s RVs and theano tensors?). Is there an easier way to do this?