Inference with normal distrubuted erreor

I’m trying to do inverse modeling using PyMC3. I have a model M(a, theta) [essentially a function in python], and some measured data, x. I’d like to infer a and theta. The assumption is that the error, M(a, theta) - x is normal distributed.

Is ABC (pm.Simulator) the only alternative here? Or is it possible to define a custom distribution in this case?

Does M(a, theta) generate random data? In that case ABC would be the way to go. To do normal inference you need to be able to define the probability (up to a normalization constant) of your data, given (a, theta)

Thanks for the reply.

M(a, theta) is a deterministic model (finite element simulation).

Do you have an example I can look at where you define the probability?

Difficult to say without knowing a bit more about what this M(a, theta) look like.

M(a, theta) is a “complex” finite element simulation. It is not a mathematical function, but it can be implemented as a python function.