Change point model



Dear Stan Forum,

I have some two-dimensional data of size (5-20) that requires me to fit a change point model with two straight lines.

An MCMC simulation will take 2-10 seconds to fit each model. I have about 20,000 such data sets to fit and I would like them to finish within hours not two days. Currently, I am using a MAP approach, i.e. finding the mode of the posterior. The difficulty of solving such an optimisation problem is that the model is not differentiable with respect to the change point location.

The result from STAN is good, but two seconds per model are too slow. I am wondering whether STAN could give me any point estimates without doing the full simulation? Maybe through Variational-Bayes or EM?

If someone could paste some reading material to start with, that would be great.




You could always try VB and check it against MCMC, but if these are all independent fits you could just run them in parallel

edit: I’m not saying it’s a bad idea to make this run faster but most recommendations about optimization/algorithms have to be given in context of the problem and I don’t see enough in the text above. With the timings and data sizes you mention the bottleneck might not be the model but the interface.