From 2f9b1facf4ddd38e03b360b5af29a35d592fa88b Mon Sep 17 00:00:00 2001 From: Christos Adam Date: Tue, 31 Mar 2026 07:27:25 +0300 Subject: [PATCH 1/3] ", (" to " (" --- vignettes/stgam_intro_chaco.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/stgam_intro_chaco.Rmd b/vignettes/stgam_intro_chaco.Rmd index 517c86f..00b7f0a 100644 --- a/vignettes/stgam_intro_chaco.Rmd +++ b/vignettes/stgam_intro_chaco.Rmd @@ -191,7 +191,7 @@ ggplot() + theme_bw() ``` -Thus, this diversion into smooths and splines illustrates how they model different relationships (slopes) with `y` at different locations within the variable feature space, (the `x` axis in the above example). In this way, spline smooth curves can be used to capture non-linear relationships in attribute-space (here the relationship of `x` with `y`). +Thus, this diversion into smooths and splines illustrates how they model different relationships (slopes) with `y` at different locations within the variable feature space (the `x` axis in the above example). In this way, spline smooth curves can be used to capture non-linear relationships in attribute-space (here the relationship of `x` with `y`). Importantly, in the context of space-time varying coefficient modelling with `stgam` (see the accompanying vignette in this package), the smooth can be used to model how relationships between `x` and `y` varies with respect to time or location, if the smooth is also parameterised with those. That is moving from attribute-space to temporal- or geographical-space, respectively. From 221790d4a8f778508b74e85ec76ea20d81b13dd8 Mon Sep 17 00:00:00 2001 From: Christos Adam Date: Wed, 1 Apr 2026 17:55:23 +0300 Subject: [PATCH 2/3] family to model_family --- vignettes/stgam_vc_models_chaco.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/stgam_vc_models_chaco.Rmd b/vignettes/stgam_vc_models_chaco.Rmd index 6f02a07..200ff2c 100644 --- a/vignettes/stgam_vc_models_chaco.Rmd +++ b/vignettes/stgam_vc_models_chaco.Rmd @@ -590,7 +590,7 @@ t1 <- Sys.time() stvc_mods <- evaluate_models( input_data = chaco |> st_drop_geometry(), target_var = "ndvi", - family = "gaussian()", + model_family = "gaussian()", vars = c("tmax", "pr"), coords_x = "X", coords_y = "Y", From 0d0ea93fe88c47f2da768fa3fd912d3b10b32a0a Mon Sep 17 00:00:00 2001 From: Christos Adam Date: Wed, 1 Apr 2026 19:17:35 +0300 Subject: [PATCH 3/3] stopCluster inside on.exit for safety --- R/evaluate_models.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/evaluate_models.R b/R/evaluate_models.R index 236ed04..57ee210 100644 --- a/R/evaluate_models.R +++ b/R/evaluate_models.R @@ -413,7 +413,8 @@ evaluate_models <- function(input_data, } else { cl <- parallel::makeCluster(ncores) doParallel::registerDoParallel(cl) - + on.exit(parallel::stopCluster(cl)) + vc_res_gam <- foreach::foreach( i = 1:nrow(terms_grid), .combine = "rbind", @@ -423,7 +424,6 @@ evaluate_models <- function(input_data, vars, coords_x, coords_y, time_var, spatial_k, temporal_k) } - parallel::stopCluster(cl) } return(vc_res_gam)