Skip to content

Commit

Permalink
put back unnecessarily removed weights back in kfold
Browse files Browse the repository at this point in the history
  • Loading branch information
avehtari committed Apr 10, 2024
1 parent bba6adf commit 781e331
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/cv_varsel.R
Original file line number Diff line number Diff line change
Expand Up @@ -1099,9 +1099,10 @@ loo_varsel <- function(refmodel, method, nterms_max, ndraws,

# Submodel predictive performance:
summ_sub <- lapply(seq_len(prv_len_rk + 1L), function(k) {
summ_k <- list(lppd = loo_sub[[k]], mu = mu_sub[[k]])
summ_k <- list(lppd = loo_sub[[k]], mu = mu_sub[[k]], wcv = validset$wcv)
if (refmodel$family$for_latent) {
summ_k$oscale <- list(lppd = loo_sub_oscale[[k]], mu = mu_sub_oscale[[k]])
summ_k$oscale <- list(lppd = loo_sub_oscale[[k]], mu = mu_sub_oscale[[k]],
wcv = validset$wcv)
}
return(summ_k)
})
Expand Down

0 comments on commit 781e331

Please sign in to comment.