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.
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.