I am using a MatrixNormal distribution in my model:
obs=pm.MatrixNormal('obs',mu=mean,rowchol=R_chol,colchol=cross_chol,observed=df,shape=df.shape)
The dataframe df
contains incomplete data, as a lot of its entries are None
. As suggested by https://nbviewer.jupyter.org/github/fonnesbeck/scipy2014_tutorial/blob/master/3_Introduction-to-PyMC.ipynb, the model ignores the missing obseravtions and performs inference. However, when I use pm.traceplot(trace)
, I get the following error:
log_likelihood_vals_point log_like_val = log_like_val[~var.observations.mask] IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
This happens even if I define the var_names
of the traceplot and exclude obs_missing
.
Any ideas on how to fix this and plot the trace?