Conversation
In the EXX terms, X and X' should two IID copies from posterior predictions, not two predictions conditional on the SAME theta. (Think about paired t test ) I add this random shuffle to decouple x1 and x2. In essence, EXX is a double expectations, and requires PSIS of the products.
|
Some math: CRPS scoreThe CRPS for forecast CDF Using these predictive draws Fast LOO approximationFor each draw Fix a data point We estimate the pointwise crps score by The second term needs to run PSIS on the product ratios. Jensen inequalityThese two schemes are different: I did RHS in my newer pull request. |
|
Thanks @yao-yl! I compared the |
|
@LeeviLindgren I might have misunderstood the shape in your original code: But now I realize that you allow y to be a vector. So the correct shuffle should be Re bias: the bias will be very small if the bayesian posterior is concentrated (in the big n limit). The bias is bigger is posterior variance of parameters is bigger. Try this example on pointwise CRPS |
|
Yeah, I see your point, I should have noticed that! The code should be more explicit about the dimensions. I will modify the methods a bit so that the function works in both of the following cases:
|
|
@LeeviLindgren the separation for the matrix and vector looks good. Would it be a good idea to add this permutation times as the function input (at this moment it is 1): computing EXX multiple times and taking the average in crps and loo_crps. It is a further research topic to how to choose the reasonable number of permutations to balance the variance of Exx and Exy. |
Did these questions/suggestions from @yao-yl ever get resolved? Trying to figure out if this is ready or if we're still waiting on some changes. |
|
I'm finally getting ready to prepare another loo release in order to fix a test failure for CRAN, but we can also include this PR. @LeeviLindgren the changes look good to me, thanks! I have a few small changes to suggest for the documentation, but I can do those after merging this. @avehtari Are you good with this? If so, I think we're ready to merge it. |
Also @LeeviLindgren could you add me as a collaborator in your fork of the loo repository? I thought it would let me push to this PR but it's not letting me. I guess you might need to add me as a collaborator in your repository settings. |
|
As far as I know, this is ok |
|
@jgabry you should be now a collaborator on my fork. |
|
Great, thanks! I might make a few small changes before merging, but in general this PR looks good. Thanks again @LeeviLindgren. I will also add you to the package DESCRIPTION file as a contributor to the package. |
Codecov Report
@@ Coverage Diff @@
## master #203 +/- ##
==========================================
- Coverage 93.48% 93.40% -0.09%
==========================================
Files 29 30 +1
Lines 2715 2773 +58
==========================================
+ Hits 2538 2590 +52
- Misses 177 183 +6
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
* move `...` position to between arguments with no default and arguments with defaults * don't use return() when not necessary: this is just to keep code style consistent with the rest of the package * add `cores` argument passed to psis

Addresses #136. Adds functions to compute
crpsandscrpsand theirlooversions. Happy to hear feedback!