Ah thank you, it’s good to get a confirmation that I’m not missing something obvious. I have a related question about dealing with variables here, namely:
In the current version I am using testmodel.datalogpt.eval, and therefore I can pass a dictionary containing the untransformed variables as keys and their values at the point of interest as arguments (in the test model above there’s no transformed variable but there are some in the model I want to use this for). Therefore, I can
- Get the trace with
trace_ = pm.util.dataset_to_point_dict(testtrace.posterior) - Convert the keys from variable names to actual variables. For each point index i run:
{testmodel.named_vars[key]: value for key, value in trace_[i].items()} - Feed each point to
testmodel.datalogpt.eval.
However, if I use testmodel.fastfn(testmodel.datalogpt), the resulting function needs a dictionary with the transformed variable names as keys and the transformed values for the point of interest as arguments. I was wondering if there is a nice simple way / already implemented function to transform a dictionary with untransformed variables and their values to the corresponding transformed variables and values.
Thank you again for all the help!