Skip to content

Commit

Permalink
Do not evaluate failing mlr3::lrn chunk (#1111 hotfix)
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Sep 24, 2024
1 parent 77dd620 commit b402780
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 12-spatial-cv.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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)
```
Expand Down

0 comments on commit b402780

Please sign in to comment.