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 handling of duplicate entries to FunctionLogger. #1

Closed Solosneros closed 3 years ago

Solosneros commented 3 years ago

This PR just adds the logic for handling duplicate entries to the FunctionLogger. This is equivalent to the lines 220 - 247 of the funlogger_vbmc.m in MATLAB.

I had to modify the init() as np.empty() sometimes was equal to 0, np.full([cache_size, 1], np.nan) works better.