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

summer intern feedback and open issues #28

Closed Solosneros closed 1 year ago

Solosneros commented 3 years ago

I just copied his notes from a file on slack to discuss them here.

ToDo:

Remember to add logging for variational optimization when it is added to VBMC proper.

Pain points:

Things to investigate:

I was never able to replicate ADAM VP optimization result exactly when weight optimization was on. Is there some sort of bug

Ideas:

Notes:

If trying to get same floating point behaviour with MATLAB, remember that all random numbers that are generated must be exactly the same. This means fixing the random number seeds to be the same, but also replacing differing algorithms in both MATLAB and Python. To be specific, we have to replace the generation of normally distributed random numbers, generation of permutations and possibly more. The Python side for these is already in the library. Relatedly, commands such as "writematrix" and np.loadmatrix are your best friend, since they make it possible to compare the internal computations and find the spots where things go wrong. The tests and their data for VP optimization were generated in this way.

Beware of possible reference issues! Several bugs so far here and in gpyreg were caused by not making actual copies but copies to references.