From c94ac229069ea902df02851b469b43f7f7760a87 Mon Sep 17 00:00:00 2001 From: Jouni Helske Date: Sun, 6 Oct 2024 11:40:23 +0300 Subject: [PATCH] more conservative tolerances --- R/fit_mnhmm.R | 4 ++-- R/fit_nhmm.R | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/fit_mnhmm.R b/R/fit_mnhmm.R index e0576272..81b07a42 100644 --- a/R/fit_mnhmm.R +++ b/R/fit_mnhmm.R @@ -202,8 +202,8 @@ fit_mnhmm <- function(model, inits, init_sd, restarts, threads, penalty, ...) { if (is.null(dots$print_level)) dots$print_level <- 0 if (is.null(dots$xtol_abs)) dots$xtol_abs <- 1e-2 if (is.null(dots$ftol_abs)) dots$ftol_abs <- 1e-2 - if (is.null(dots$xtol_rel)) dots$xtol_rel <- 1e-2 - if (is.null(dots$xtol_rel)) dots$ftol_rel <- 1e-4 + if (is.null(dots$xtol_rel)) dots$xtol_rel <- 1e-4 + if (is.null(dots$xtol_rel)) dots$ftol_rel <- 1e-8 if (is.null(dots$check_derivatives)) dots$check_derivatives <- FALSE out <- future.apply::future_lapply(seq_len(restarts), function(i) { init <- unlist(create_initial_values( diff --git a/R/fit_nhmm.R b/R/fit_nhmm.R index ef19da5d..c24519f1 100644 --- a/R/fit_nhmm.R +++ b/R/fit_nhmm.R @@ -157,8 +157,8 @@ fit_nhmm <- function(model, inits, init_sd, restarts, threads, penalty, ...) { if (is.null(dots$print_level)) dots$print_level <- 0 if (is.null(dots$xtol_abs)) dots$xtol_abs <- 1e-2 if (is.null(dots$ftol_abs)) dots$ftol_abs <- 1e-2 - if (is.null(dots$xtol_rel)) dots$xtol_rel <- 1e-2 - if (is.null(dots$xtol_rel)) dots$ftol_rel <- 1e-6 + if (is.null(dots$xtol_rel)) dots$xtol_rel <- 1e-4 + if (is.null(dots$xtol_rel)) dots$ftol_rel <- 1e-8 if (is.null(dots$check_derivatives)) dots$check_derivatives <- FALSE out <- future.apply::future_lapply(seq_len(restarts), function(i) { init <- unlist(create_initial_values(