dflemin3 / approxposterior

A Python package for approximate Bayesian inference and optimization using Gaussian processes
https://dflemin3.github.io/approxposterior/
MIT License
41 stars 9 forks source link

Adding simple convergence check #58

Closed dflemin3 closed 4 years ago

dflemin3 commented 4 years ago

This PR adds a simple method to check whether or not an approxposterior run has converged. If the user sets convergenceCheck = True, then if all medians of the approximate marginal posterior distribution change by less than some tolerance, eps, for kmax consecutive iterations, the run is considered converged and terminates. I require a "converged" state for kmax iterations because there are many sources of randomness within approxposterior that can cause the solution to bounce around a bit.