Skip to content
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

subsampling LOO estimates with diff-est-srs-wor start #496

Open
wants to merge 128 commits into
base: master
Choose a base branch
from

Conversation

avehtari
Copy link
Collaborator

@avehtari avehtari commented Apr 10, 2024

Work in progress.

Tested with

  • family="normal" and stats %in% c("elpd", "mlpd", "gmpd", "mse", "rmse")
  • family="bernoulli" and stats %in% c("acc","pctcorr")
  • family="poisson" usings trad and latent approaches
  • tests pass expect some plot tests fail with svglite: ... Graphics API version mismatch

Notes

  • n_loo matters only if validate_search = TRUE (with FALSE there is no speed advantage)
  • in cv_varsel if nloo<n and fast PSIS-LOO result is not yet available, fast PSIS-LOO result is computed
  • in cv_varsel if nloo<n, fast PSIS-LOO result is stored in slot $summaries_fast
  • the subsampling indices are stored in slot $loo_inds
  • the actual subsampling estimating happens in summary_funs.R get_stat()
  • removed some NA checking and need to recheck if those need to put back
  • improved quantiles for "mse" if the value is close to 0 (can't get negative lq)
  • "auc" is not supported (complicated)

Next

  • add support for incrementally increasing nloo?

tagging @n-kall

@avehtari avehtari requested a review from fweber144 April 12, 2024 13:03
@avehtari
Copy link
Collaborator Author

avehtari commented Apr 15, 2024

I wanted to use R2, and as I had rewrote summary stats anyway, added R2 and made all mse, rmse, and R2 to use only normal approximation with as much shared computation as possible

With the added R2 support, this PR will close also #483

@n-kall
Copy link
Collaborator

n-kall commented Apr 16, 2024

I can take a look

@n-kall n-kall self-assigned this Apr 16, 2024
@avehtari avehtari requested a review from n-kall April 16, 2024 13:25
@avehtari avehtari assigned avehtari and unassigned n-kall Apr 16, 2024
R/cv_varsel.R Outdated Show resolved Hide resolved
R/cv_varsel.R Outdated Show resolved Hide resolved
R/cv_varsel.R Outdated Show resolved Hide resolved
R/cv_varsel.R Outdated Show resolved Hide resolved
R/cv_varsel.R Outdated Show resolved Hide resolved
R/glmfun.R Outdated Show resolved Hide resolved
R/misc.R Outdated Show resolved Hide resolved
@fweber144
Copy link
Collaborator

fweber144 commented Apr 21, 2024

I have added some comments, but I'm not done with the review yet.

Besides, I think documentation needs to be updated (at least re-roxygenized, but also progressr should be mentioned), the vignettes perhaps as well, and I haven't run R CMD check (including the unit tests) yet. The NEWS file would also need to be updated.

@fweber144 fweber144 mentioned this pull request Apr 21, 2024
fweber144 added a commit that referenced this pull request Jan 8, 2025
fweber144 added a commit that referenced this pull request Jan 8, 2025
fweber144 added a commit that referenced this pull request Jan 8, 2025
fweber144 added a commit that referenced this pull request Jan 8, 2025
fweber144 added a commit that referenced this pull request Jan 8, 2025
fweber144 added a commit that referenced this pull request Jan 8, 2025
@avehtari
Copy link
Collaborator Author

avehtari commented Jan 8, 2025

I checked 5 comments in which you asked me to check something, and all others are good, but I replied to one

@avehtari
Copy link
Collaborator Author

avehtari commented Jan 8, 2025

Noticed 6th comment which is also ok.

@avehtari
Copy link
Collaborator Author

avehtari commented Jan 9, 2025

A comment for commit de1cf4d (you may need to click a few times "Show more")

@fweber144
Copy link
Collaborator

So that would be #496 (comment), but I cannot see a reply from you there :/ Am I looking at the wrong place?

@avehtari
Copy link
Collaborator Author

I clicked the link in your last comment, and I can see the discussion with my comment. I'm copying my comment here

I would drop "exact", or at least drop quotes, as quotes imply it's not really exact which is confusing

@fweber144
Copy link
Collaborator

That's strange, I still cannot see any comment from you when clicking that link. But thanks for copying, I just pushed commit 7e61368 which drops the quotes.

fweber144 added a commit to fweber144/projpred that referenced this pull request Jan 12, 2025
for RMSE in the case `!is.null(summaries_baseline)`, see
<stan-dev#496 (comment)>
also take into account that `stat = "rmse"` does not need a PRNG seed anymore
(and should produce a point estimate between the CI bounds)
to a value of zero; this was necessary due to a failing `stat = "R2"` test for
`datafit`s where such negative squared standard errors numerically equal to zero
occurred
for RMSE in the case `!is.null(summaries_baseline)`, see
<#496 (comment)>
fweber144 added a commit that referenced this pull request Jan 16, 2025
for RMSE in the case `!is.null(summaries_baseline)`, see
<#496 (comment)>
fweber144 added a commit that referenced this pull request Jan 16, 2025
for RMSE in the case `!is.null(summaries_baseline)`, see
<#496 (comment)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants