Error in validate_ll(log_ratios) when caculating loo

Hello,

I got an error Error in validate_ll(log_ratios) : All input values must be finite. when calculating loo using matrix method loo(LLmat, r_eff = rel_n_eff, cores = cores, save_psis = FALSE). It seems related to the logarithm of the sum of two densities according to Fixed a numerical issue in split_moment_matching by topipa · Pull Request #153 · stan-dev/loo · GitHub and Error in loo(stanfit, moment_match=TRUE) · Issue #852 · stan-dev/rstan · GitHub. Howerver, I am not using moment matching. Is it possible that the modification in Fixed a numerical issue in split_moment_matching by topipa · Pull Request #153 · stan-dev/loo · GitHub should have been applied to all loo function? or I am just simply making another mistake? Thanks a lot

Have you checked that LLmat doesn’t have non-finite values? Can you provide that matrix and rel_n_eff, so I can test?

Sure, honestly I didn’t save the csv file of this model fit. I looped 100 times the model fitting and loo for almost 8h so far, until now there is no error :( However, when I tested the code yesterday, this error happened around 3 times. Maybe there were some silly mistakes in my code. I will keep testing and save LLmat next time I see this error and send it here. Thanks

1 Like