You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering if there is an error in the conditional check on line 900 of engine.py in the predict function? Currently, the code checks:
if n_max > n_samples and neff > neff_min:
However, I would think the intended logic should be to trigger additional simulations only when the effective sample size is below the minimum threshold. In that case, the condition is:
if n_max > n_samples and neff < neff_min:
In a separate but closely related issue - it would be nice to ensure that there are n_samples returned for the event of no importance sampling. I.e. in line 880:
ys = self._draw_params(x, n_samples)
one could generate more samples in the event that samples outside the prior are removed in line 1245:
params = params[~np.isinf(logprior)].
For example, a hacky way of doing this is to replace line 880 with:
I'm wondering if there is an error in the conditional check on line 900 of engine.py in the
predict
function? Currently, the code checks:if n_max > n_samples and neff > neff_min:
However, I would think the intended logic should be to trigger additional simulations only when the effective sample size is below the minimum threshold. In that case, the condition is:
if n_max > n_samples and neff < neff_min:
In a separate but closely related issue - it would be nice to ensure that there are
n_samples
returned for the event of no importance sampling. I.e. in line 880:ys = self._draw_params(x, n_samples)
one could generate more samples in the event that samples outside the prior are removed in line 1245:
params = params[~np.isinf(logprior)]
.For example, a hacky way of doing this is to replace line 880 with:
Thanks a lot
The text was updated successfully, but these errors were encountered: