Hello,
PyMC Impute class is great for readability, but is a pain to sample from (no offence, it's great it's here!)...
dataset = np.ma.masked_array(dataset, fill_value=np.nan)
data = pm.Impute('data', pm.Gamma, alpha=3., beta=1.)
It seems it creates as many stochastic nodes as observations (ie `dataset.size`)... Resulting in the creation of more than 400 nodes in my case. My current model even results in more than 800 nodes since I have two quantities I'd like to impute... With a missing rate that is around 50% each.
I tried to group the observed and missing values in two stochastics with size=n_observed and n_missing, respectively; so that I get 2 nodes instead of `dataset.size`. This looks like this: