acerbilab / pyvbmc

PyVBMC: Variational Bayesian Monte Carlo algorithm for posterior and model inference in Python
https://acerbilab.github.io/pyvbmc/
BSD 3-Clause "New" or "Revised" License
114 stars 6 forks source link

feat: add active sample initial sample design (provided or random box) #21

Closed Solosneros closed 3 years ago

Solosneros commented 3 years ago

I added the logic of active sample for the branch where gp is None and then the samples come from the cache or random box. This is equivalent to initdesign_vbmc.m in MATLAB.

The difference to MATLAB is that we choose just choose the first N points from the cache when there are more provided points than points to return. In MATLAB KMeans was used for it, but @lacerbi said that it might be changed relatively soon.

I added the documentation to Sphinx and tested all branches of the function. The coverage is 100%.