Skip to content

Commit

Permalink
nlm optimisation for faster initialisation
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjclark committed Jun 17, 2024
1 parent b347e15 commit 9c3030b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions R/mvgam_setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ mvgam_setup <- function(formula,
suppressWarnings(mgcv::gam(formula(formula),
data = dat,
family = family,
control = list(maxit = maxit,
epsilon = 5,
newton = list(conv.tol = 5)),
optimizer = c('outer', 'nlm'),
control = list(maxit = 1,
epsilon = 1e20,
rank.tol = 1,
mgcv.tol = 1e20,
mgcv.half = 1,
nlm = list(iterlim = 1)),
drop.unused.levels = FALSE,
na.action = na.fail,
select = TRUE))
Expand All @@ -26,9 +30,13 @@ mvgam_setup <- function(formula,
data = dat,
family = family,
knots = knots,
control = list(maxit = maxit,
epsilon = 5,
newton = list(conv.tol = 5)),
optimizer = c('outer', 'nlm'),
control = list(maxit = 1,
epsilon = 1e20,
rank.tol = 1,
mgcv.tol = 1e20,
mgcv.half = 1,
nlm = list(iterlim = 1)),
drop.unused.levels = FALSE,
na.action = na.fail,
select = TRUE))
Expand Down
Binary file modified src/mvgam.dll
Binary file not shown.
Binary file modified tests/testthat/Rplots.pdf
Binary file not shown.

0 comments on commit 9c3030b

Please sign in to comment.