What is the most efficient way to calculate MAP estimates repeatedly in PyMC3 with updated input?
Details: I would like to calculate repeatedly MAP (max a posteriori) estimates. I need Bayesian sparse linear regression because I have too few data points for a regular regression to be stable.
However, repeated MAP calculations take too long in PyMC3. One thing I can usually do in such situations is precompile the function, like I can do in Theano, but PyMC3 doesn’t allow precompilation of the function without freezing the input as well, from what I can tell. In my use-case, I’m applying the regression on a gigantic rolling Pandas dataframe with updated input each time, so freezing the input is bad.
Thank you for any ideas/help.