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
After encountering an odd problem with cv_MRF_diag with Poisson data, I found a simple solution (with the help of @hezibu). The problem I had was that NaNs were produced when dividing zero by zero while creating preds_log. Other numbers divided by zero were taken care of with is.infinite but NaNs weren't.
I used the same procedure already implemented in the function, to set infinite values to zero (when numbers were divided by 0), but with is.nan instead if is.infinite.
Here is my suggested fix [my additions in rows 299 and 324:
After encountering an odd problem with
cv_MRF_diag
with Poisson data, I found a simple solution (with the help of @hezibu). The problem I had was that NaNs were produced when dividing zero by zero while creatingpreds_log
. Other numbers divided by zero were taken care of withis.infinite
but NaNs weren't.I used the same procedure already implemented in the function, to set infinite values to zero (when numbers were divided by 0), but with
is.nan
instead ifis.infinite
.Here is my suggested fix [my additions in rows 299 and 324:
Does this look adequate?
The text was updated successfully, but these errors were encountered: