minaskar / pocomc

pocoMC: A Python implementation of Preconditioned Monte Carlo for accelerated Bayesian Computation
https://pocomc.readthedocs.io
GNU General Public License v3.0
80 stars 9 forks source link

Paramters EXCEED BOUND #4

Closed LAujust closed 2 years ago

LAujust commented 2 years ago

Thanks for your sampler and I am excited to use it. But sometime particles could walk exceed prior bounds then rising an error. It seems like the issue of transformation between parameters.

C:\Users\Loyal.Aujust\AppData\Local\Programs\Python\Python38\lib\site-packages\pocomc\scaler.py:386: RuntimeWarning: invalid value encountered in logaddexp p = np.exp(-np.logaddexp(0, -u[:, self.mask_both])) C:\Users\Loyal.Aujust\AppData\Local\Programs\Python\Python38\lib\site-packages\numpy\linalg\linalg.py:2099: RuntimeWarning: invalid value encountered in slogdet sign, logdet = _umath_linalg.slogdet(a, signature=signature)

What is the possible reason for this issue? thanks for helping!

johannesulf commented 2 years ago

I can confirm that I'm encountering the same issue from time to time. Haven't had time yet to investigate this further.

davidnabergoj commented 2 years ago

Thanks for letting us know! We found that some values were not being clipped, which could sometimes result in a division by zero. This has been fixed in https://github.com/minaskar/pocomc/commit/ec4ae470a6578ae945f464618efc9ce52bd05236 and works in the latest version of pocoMC.