Skip to content

Does cross validation (sdmTMB_cv) work with delta models? #111

Closed Answered by seananderson
ericward-noaa asked this question in Q&A
Discussion options

You must be logged in to vote

Cross validation is now working with delta models:

library(sdmTMB)
future::plan(future::multisession)
out_dg <- sdmTMB_cv(
  density ~ depth_scaled,
  data = pcod_2011, 
  mesh = make_mesh(pcod_2011, c("X", "Y"), cutoff = 10),
  family = delta_gamma(), 
  k_folds = 5
)
#> Running fits with `future.apply()`.
#> Set a parallel `future::plan()` to use parallel processing.
out_dg$fold_loglik
#> [1] -531.3995 -702.3048 -591.7539 -608.1418 -611.2388
out_dg$sum_loglik
#> [1] -3044.839

Replies: 4 comments

Comment options

ericward-noaa
Aug 8, 2022
Collaborator Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by seananderson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants