Closed drbenvincent closed 6 years ago
works with something like this
import matplotlib.pyplot as plt
n_params = len(model.prior) # note, psychopy errors if we as for len(model.θ)
fig, axes = plt.subplots(1, n_params, figsize=(9, 4), tight_layout=True)
for (axis, key) in zip(axes, model.θ.keys()):
axis.hist(model.θ[key], 50, normed=1, facecolor='green', alpha=0.75)
axis.set_xlabel(key)
plt.savefig(filename+'_parameter_plot.pdf')
this is now a method in the model class
I'm not sure if this will remain a feature or not, but in the mean time, it is useful to diagnose the various models in construction.
BUG: PsychoPy is throwing an error when we try to access the keys of
model.θ
ormodel.prior
. It seems to not like keys which are unicode characters. So either get to the bottom of this, or just use non-unicode for parameter names.