This is a very simple yet powerful implementation of the Metropolis Hastings algorithm. The function works a bit like Matlab's 'fmincon', but produces samples from the posterior distribution over parameters.
The algorithm assumes the following:
- Gaussian additive noise (variance is integrated out)
- Uniform priors over all parameters (this can easily be changed in the code)