From b40278062824f078fc2b2cb34e92d817123a2060 Mon Sep 17 00:00:00 2001 From: robinlovelace Date: Tue, 24 Sep 2024 07:52:11 +0100 Subject: [PATCH] Do not evaluate failing mlr3::lrn chunk (#1111 hotfix) --- 12-spatial-cv.Rmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/12-spatial-cv.Rmd b/12-spatial-cv.Rmd index e1eae0b97..13e5c7f44 100644 --- a/12-spatial-cv.Rmd +++ b/12-spatial-cv.Rmd @@ -499,7 +499,7 @@ To allow for non-linear relationships, we use the popular radial basis function Setting the `type` argument to `"C-svc"` makes sure that `ksvm()` is solving a classification task. To make sure that the tuning does not stop because of one failing model, we additionally define a fallback learner (for more information please refer to https://mlr3book.mlr-org.com/chapters/chapter10/advanced_technical_aspects_of_mlr3.html#sec-fallback). -```{r 12-spatial-cv-24} +```{r 12-spatial-cv-24, eval=FALSE} lrn_ksvm = mlr3::lrn("classif.ksvm", predict_type = "prob", kernel = "rbfdot", type = "C-svc") lrn_ksvm$fallback = lrn("classif.featureless", predict_type = "prob") @@ -508,7 +508,7 @@ lrn_ksvm$fallback = lrn("classif.featureless", predict_type = "prob") The next stage is to specify a resampling strategy. Again we will use a 100-repeated 5-fold spatial CV\index{cross-validation!spatial CV}. -```{r 12-spatial-cv-25} +```{r 12-spatial-cv-25, eval=FALSE} # performance estimation level perf_level = mlr3::rsmp("repeated_spcv_coords", folds = 5, repeats = 100) ```