How to create Bayesian data fusion in python with pymc3?

I have a repo of Kalman Filter implementations for PyMC here, perhaps it can be helpful for seeing how to implement the filter, but these are standard filters that assume normally distributed innovations. I see you’re using a non-normal distribution, so I think you would need some kind of extended filter.

To be honest I am having trouble following your code. The loop over the data should be inside the model (using an aesara/theano Scan Op), because the filter works by iteratively updating its belief about how much each sensor should be trusted. I see that you are fitting each data point then using the estimates to parameterize the priors of the next iteration, but this discards information about the higher order moments of your posterior estimates (skew etc). I also don’t see you calling your predict or correct functions anywhere in the loop, so where is the Kalman filtering happening?

I’d go through the Kalman and Bayesian Filters in Python book you linked. This is an excellent resource that I would have linked you had you not already. You will need to pay attention to the final chapters on non-gaussian filtering, since that seems to be your use case.