-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent Pareto k-values for SIS? #227
Comments
Hmm yeah that inconsistency is unfortunate. I’m not sure what to do about it. Any ideas? One thought: in hindsight it would actually probably make more sense for the Pareto k values to be NA and not 0 or Inf in all cases when Pareto smoothing isn’t done. But doing that (or changing between 0 and Inf) at this point wouldn’t be backwards compatible for users who were extracting and using the stored k values in the psis object (that’s certainly a minority of users though). |
Yeah, the backwards compatibility is definitely an issue. Perhaps the new behavior could be implemented conditional on a global option which needs to be set to In any case, since I wouldn't want projpred to require the most recent loo version where that new behavior is optionally available, I will try to find some other solution for projpred (either catching the "small S" case manually or perhaps using |
For projpred, I guess checking whether all Pareto k-values are |
I think that would almost always be ok, but there could be annoying edge cases where that would be unsafe. |
Yes, I see. Thank you! |
(btw yesterday I added you to the r-packages team in the stan-dev GitHub organization. I should have done that a while ago!) |
Yeah that’s definitely a possibility. Another possibility is to just make the change (breaking backwards compatibility) and call it loo v3.0. I’d be more ok with that if we do a major version number increase. But usually a major version release has major new functionality or other big changes that we don’t really have at the moment. |
Yes, I saw that. Thank you very much!
Yes, I agree that this would not be worth a new major version (3.x.x). |
Btw, I just realized that the |
I don't understand how they can be different as the diagnostic is done before smoothing and thus whether smoothing is done or not should not affect the diagnostic values. |
I noticed that there might be an inconsistency in the Pareto k-values between different approaches for standard importance sampling (SIS):
The point is that calling
psis()
with a small number of draws will cause the Pareto smoothing not to take place. Instead, SIS is used, as demonstrated above. In that case, the Pareto k-values areInf
. When usingsis()
explicitly, the Pareto k-values are0
.Background: In projpred, it is possible (although not encouraged and in particular, this is not the default behavior) to use PSIS-LOO CV with the search being excluded from the CV (
validate_search = FALSE
) and a small number of thinned draws. In principle, projpred could usesis()
explicitly in such a case (and then either continue with the Pareto k-values which are all0
or even skip the Pareto k checks), but that requires to catch the "small S" case manually (which is not a problem, but if loo changes anything in its "small S" decision rule in the future, this would require adapting projpred's decision rule analogously). Usingpsis()
would be more straightforward, but then we have Pareto k-values which areInf
, which would trigger warnings in the Pareto k checks.The text was updated successfully, but these errors were encountered: