Best way to use posterior as a prior for another analysis?

Hello,

I am analyzing experimental data in a incremental way.
I’d like to use the posterior produced by one experimental data analysis as the prior for the next experiment. What is the best way to do in in Pymc3 ?

The posterior is under the form of the trace of a random variable. And I don’t (really) have any clue
about the type of law (It’s support is [0,+inf]), And I’m using low informative prior (in the form of a Potential) for the first experiment.

As far as I know Pymc3, I guess my options are :

  • DensityDist seems to be the solution but I’ll have to use some method to approximate the logp function from the trace. Any suggestions for the interpolation technique/compatible or density estimation library ?
  • Interpolated seems to also be a solution, and providing the interpolation… if a set of point is given as a base for the interpolation. Question : is a basic histogram (from numpy for instance), is enough?

Is there any other option, that I missed ?

Thanks for any information or hint you can share on the topic.

regards.
H.

1 Like

Have you seen this pymc example already? Updating priors — PyMC3 3.10.0 documentation

1 Like

No, It’s the first time I see that example.
It’s exactly what I needed, thanks a lot @ricardoV94.