The function that you specified above would be incorporated into a PyMC model as a Deterministic node, where it is calculated based on some (presumably) stochastic parent nodes (your parameters). This node would then be connected downstream to a likelihood (observed stochastic node) that provides the information for fitting the parameters. For example, you might have some parametric distribution that describes the distribution of the error corresponding to the metric output by process_and_compare
.
The PyMC wiki has several model examples from a range of domains for PyMC 2. There are PyMC 3 examples in the pymc/examples
folder in the master branch.
As far as Theano goes, the motivation behind using it as a dependency for PyMC is due the fact that the current state-of-the-art in MCMC involves using gradient information, so we needed the ability to calculate gradients for arbitrary models. We hope to eventually benefit from its GPU capabilities, but for now its just for the gradients. All PyMC's objects are Theano tensors in version 3, so if you have other plans for Theano in the context of building Bayesian models, then chances are it can be made to work. For example, we might eventually want to implement probabilistic graphical models in PyMC, so Theano will probably facilitate that as well.