Sometimes inv_metric
does not return one metric per chain, sometimes metrics are incomplete
#393
Labels
bug
Something isn't working
Describe the bug
The
inv_metric()
method sometimes does not return the inverse metric for each chain. For some chains it might be missing. Also, when using "dense_e" sometimes the inverse metric, which is returned byinv_metric
is just a vector for some of the chains.To Reproduce
Sometimes the inverse metric is missing for some chains. Note that these examples are all with "dense_e", but I first encountered the issue using the default "diag_e" (on a bigger model). The following "test" mostly runs fine with "diag_e".
The code above returned this for me:
The inverse metric of chain 4 is missing.
Also, sometimes only a vector is returned. This is probably only a problem with "dense_e". A slightly modified loop:
would return:
Note that for chain 3 it only returns the first row of the matrix (not the diagonal).
In combination this leads to either missing, or incomplete inverse metrics relatively frequently.
Expected behavior
I'd expect
inv_matrix
to always return an inverse metric for all the chains that were run. I'd also expect the resulting matrix to be a full matrix if a dense metric was used in fitting.Operating system
Ubuntu 18.04 (through WSL2 on Windows 10)
CmdStanR version number
The text was updated successfully, but these errors were encountered: