diff --git a/R/ResamplingRepeatedSptCVCluto.R b/R/ResamplingRepeatedSptCVCluto.R index 285ecb44d..4d8c9dd2e 100644 --- a/R/ResamplingRepeatedSptCVCluto.R +++ b/R/ResamplingRepeatedSptCVCluto.R @@ -12,7 +12,7 @@ #' if (mlr3misc::require_namespaces("skmeans", quietly = TRUE)) { #' library(mlr3) #' library(mlr3spatiotempcv) -#' task = tsk("cookfarm") +#' task = tsk("cookfarm_mlr3") #' task$set_col_roles("Date", "time") #' #' # Instantiate Resampling diff --git a/R/ResamplingRepeatedSptCVCstf.R b/R/ResamplingRepeatedSptCVCstf.R index a005f08fc..8a0c4060b 100644 --- a/R/ResamplingRepeatedSptCVCstf.R +++ b/R/ResamplingRepeatedSptCVCstf.R @@ -14,7 +14,7 @@ #' @export #' @examples #' library(mlr3) -#' task = tsk("cookfarm") +#' task = tsk("cookfarm_mlr3") #' task$set_col_roles("SOURCEID", roles = "space") #' task$set_col_roles("Date", roles = "time") #' diff --git a/R/ResamplingSptCVCluto.R b/R/ResamplingSptCVCluto.R index 412146d90..f4fcae831 100644 --- a/R/ResamplingSptCVCluto.R +++ b/R/ResamplingSptCVCluto.R @@ -12,7 +12,7 @@ #' if (mlr3misc::require_namespaces("skmeans", quietly = TRUE)) { #' library(mlr3) #' library(mlr3spatiotempcv) -#' task = tsk("cookfarm") +#' task = tsk("cookfarm_mlr3") #' task$set_col_roles("Date", "time") #' #' # Instantiate Resampling diff --git a/R/ResamplingSptCVCstf.R b/R/ResamplingSptCVCstf.R index 97f32d3cb..ddde73860 100644 --- a/R/ResamplingSptCVCstf.R +++ b/R/ResamplingSptCVCstf.R @@ -9,7 +9,7 @@ #' @export #' @examples #' library(mlr3) -#' task = tsk("cookfarm") +#' task = tsk("cookfarm_mlr3") #' task$set_col_roles("SOURCEID", roles = "space") #' task$set_col_roles("Date", roles = "time") #' diff --git a/R/TaskClassifST.R b/R/TaskClassifST.R index 560e2d2d7..ffea2bc4b 100644 --- a/R/TaskClassifST.R +++ b/R/TaskClassifST.R @@ -5,7 +5,7 @@ #' factor. The `task_type` is set to `"classif"` and `"spatiotemporal"`. #' #' A spatial example task is available via `tsk("ecuador")`, a spatiotemporal -#' one via `tsk("cookfarm")`. +#' one via `tsk("cookfarm_mlr3")`. #' #' The coordinate reference system passed during initialization must match the #' one which was used during data creation, otherwise offsets of multiple meters diff --git a/R/TaskRegrST.R b/R/TaskRegrST.R index 4b431d1fb..ed131fa58 100644 --- a/R/TaskRegrST.R +++ b/R/TaskRegrST.R @@ -5,7 +5,7 @@ #' classification problems. #' #' A spatial example task is available via `tsk("ecuador")`, a spatiotemporal -#' one via `tsk("cookfarm")`. +#' one via `tsk("cookfarm_mlr3")`. #' #' The coordinate reference system passed during initialization must match the #' one which was used during data creation, otherwise offsets of multiple meters diff --git a/R/Task_regr_cookfarm_profiles.R b/R/Task_regr_cookfarm_profiles.R index 50589b31b..171d15c16 100644 --- a/R/Task_regr_cookfarm_profiles.R +++ b/R/Task_regr_cookfarm_profiles.R @@ -8,7 +8,7 @@ #' @section Usage: #' ``` #' mlr_tasks$get("cookfarm") -#' tsk("cookfarm") +#' tsk("cookfarm_mlr3") #' ``` #' #' @description @@ -49,7 +49,7 @@ #' @template seealso_task "cookfarm_mlr3" -load_task_cookfarm = function(id = "cookfarm") { +load_task_cookfarm = function(id = "cookfarm_mlr3") { b = mlr3::as_data_backend(cookfarm_mlr3) b$hash = "_mlr3_tasks_cookfarm_" task = TaskRegrST$new( diff --git a/R/as_task_regr_st.R b/R/as_task_regr_st.R index 6407e5999..bd5ff4a94 100644 --- a/R/as_task_regr_st.R +++ b/R/as_task_regr_st.R @@ -36,7 +36,7 @@ #' as_task_regr_st(cookfarm_sf, target = "PHIHOX") #' #' # TaskRegrST -#' task = tsk("cookfarm") +#' task = tsk("cookfarm_mlr3") #' as_task_regr_st(task) #' } as_task_regr_st = function(x, ...) { diff --git a/R/autoplot.R b/R/autoplot.R index 81e3473b5..62a267121 100644 --- a/R/autoplot.R +++ b/R/autoplot.R @@ -381,7 +381,7 @@ plot.ResamplingRepeatedSpCVCoords = function(x, ...) { #' if (mlr3misc::require_namespaces(c("sf", "skmeans", "plotly"), quietly = TRUE)) { #' library(mlr3) #' library(mlr3spatiotempcv) -#' task_st = tsk("cookfarm") +#' task_st = tsk("cookfarm_mlr3") #' resampling = rsmp("sptcv_cluto", folds = 5) #' resampling$instantiate(task_st) #' diff --git a/R/autoplot_spcv_cstf.R b/R/autoplot_spcv_cstf.R index f849e5500..8a26bc866 100644 --- a/R/autoplot_spcv_cstf.R +++ b/R/autoplot_spcv_cstf.R @@ -69,7 +69,7 @@ #' if (mlr3misc::require_namespaces(c("sf", "plotly"), quietly = TRUE)) { #' library(mlr3) #' library(mlr3spatiotempcv) -#' task_st = tsk("cookfarm") +#' task_st = tsk("cookfarm_mlr3") #' task_st$set_col_roles("SOURCEID", "space") #' task_st$set_col_roles("Date", "time") #' resampling = rsmp("sptcv_cstf", folds = 5) diff --git a/R/zzz.R b/R/zzz.R index a6a8ef1e2..d08f4381d 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -78,7 +78,7 @@ register_mlr3 = function() { # nocov start mlr_tasks$add("ecuador", load_task_ecuador) mlr_tasks$add("diplodia", load_task_diplodia) - mlr_tasks$add("cookfarm", load_task_cookfarm) + mlr_tasks$add("cookfarm_mlr3", load_task_cookfarm) # resampling methods --------------------------------------------------------- diff --git a/doc/mlr3spatiotempcv.Rmd b/doc/mlr3spatiotempcv.Rmd index 1b49453ea..97dc12e41 100644 --- a/doc/mlr3spatiotempcv.Rmd +++ b/doc/mlr3spatiotempcv.Rmd @@ -81,7 +81,7 @@ as.data.table(mlr_resamplings) Additional example tasks: - `tsk("ecuador")` (spatial, classif) -- `tsk("cookfarm")` (spatiotemp, regr) +- `tsk("cookfarm_mlr3")` (spatiotemp, regr) # Upstream Packages and Scientific References diff --git a/doc/spatiotemp-viz.R b/doc/spatiotemp-viz.R index 108eb64ed..119e8c2d3 100644 --- a/doc/spatiotemp-viz.R +++ b/doc/spatiotemp-viz.R @@ -16,7 +16,7 @@ pkgdown = Sys.getenv("IN_PKGDOWN") != "" ## ---- fig.align='center', eval=os&&!is_cran&&pkgdown, fig.width=8, fig.height=9---- # library(mlr3) # library(mlr3spatiotempcv) -# task_st = tsk("cookfarm") +# task_st = tsk("cookfarm_mlr3") # resampling = rsmp("sptcv_cluto", folds = 5, time_var = "Date") # resampling$instantiate(task_st) # diff --git a/doc/spatiotemp-viz.Rmd b/doc/spatiotemp-viz.Rmd index cb31b4b1a..ccd58a7ca 100644 --- a/doc/spatiotemp-viz.Rmd +++ b/doc/spatiotemp-viz.Rmd @@ -38,7 +38,7 @@ It makes use of the returned 3D plotly objects which are returned in a list by ` ```{r, fig.align='center', eval=os&&!is_cran&&pkgdown, fig.width=8, fig.height=9} library(mlr3) library(mlr3spatiotempcv) -task_st = tsk("cookfarm") +task_st = tsk("cookfarm_mlr3") resampling = rsmp("sptcv_cluto", folds = 5) resampling$instantiate(task_st) diff --git a/man/TaskClassifST.Rd b/man/TaskClassifST.Rd index 72e031a1b..81878cff4 100644 --- a/man/TaskClassifST.Rd +++ b/man/TaskClassifST.Rd @@ -9,7 +9,7 @@ spatiotemporal classification problems. The target column is assumed to be a factor. The \code{task_type} is set to \code{"classif"} and \code{"spatiotemporal"}. A spatial example task is available via \code{tsk("ecuador")}, a spatiotemporal -one via \code{tsk("cookfarm")}. +one via \code{tsk("cookfarm_mlr3")}. The coordinate reference system passed during initialization must match the one which was used during data creation, otherwise offsets of multiple meters diff --git a/man/TaskRegrST.Rd b/man/TaskRegrST.Rd index b6bc856c4..5566e662b 100644 --- a/man/TaskRegrST.Rd +++ b/man/TaskRegrST.Rd @@ -8,7 +8,7 @@ This task specializes \link{Task} and \link{TaskSupervised} for spatiotemporal classification problems. A spatial example task is available via \code{tsk("ecuador")}, a spatiotemporal -one via \code{tsk("cookfarm")}. +one via \code{tsk("cookfarm_mlr3")}. The coordinate reference system passed during initialization must match the one which was used during data creation, otherwise offsets of multiple meters diff --git a/man/as_task_regr_st.Rd b/man/as_task_regr_st.Rd index 3e28b354d..8fcb55df8 100644 --- a/man/as_task_regr_st.Rd +++ b/man/as_task_regr_st.Rd @@ -96,7 +96,7 @@ if (mlr3misc::require_namespaces(c("sf"), quietly = TRUE)) { as_task_regr_st(cookfarm_sf, target = "PHIHOX") # TaskRegrST - task = tsk("cookfarm") + task = tsk("cookfarm_mlr3") as_task_regr_st(task) } } diff --git a/man/autoplot.ResamplingSptCVCluto.Rd b/man/autoplot.ResamplingSptCVCluto.Rd index 2bd41502f..1e1bcf900 100644 --- a/man/autoplot.ResamplingSptCVCluto.Rd +++ b/man/autoplot.ResamplingSptCVCluto.Rd @@ -93,7 +93,7 @@ visualize mlr3 spatiotemporal resampling objects. if (mlr3misc::require_namespaces(c("sf", "skmeans", "plotly"), quietly = TRUE)) { library(mlr3) library(mlr3spatiotempcv) - task_st = tsk("cookfarm") + task_st = tsk("cookfarm_mlr3") resampling = rsmp("sptcv_cluto", folds = 5) resampling$instantiate(task_st) diff --git a/man/autoplot.ResamplingSptCVCstf.Rd b/man/autoplot.ResamplingSptCVCstf.Rd index 441699bb2..b98dc4cf0 100644 --- a/man/autoplot.ResamplingSptCVCstf.Rd +++ b/man/autoplot.ResamplingSptCVCstf.Rd @@ -137,7 +137,7 @@ mode. if (mlr3misc::require_namespaces(c("sf", "plotly"), quietly = TRUE)) { library(mlr3) library(mlr3spatiotempcv) - task_st = tsk("cookfarm") + task_st = tsk("cookfarm_mlr3") task_st$set_col_roles("SOURCEID", "space") task_st$set_col_roles("Date", "time") resampling = rsmp("sptcv_cstf", folds = 5) diff --git a/man/mlr_resamplings_repeated_sptcv_cluto.Rd b/man/mlr_resamplings_repeated_sptcv_cluto.Rd index d8f60d570..8031d7f0b 100644 --- a/man/mlr_resamplings_repeated_sptcv_cluto.Rd +++ b/man/mlr_resamplings_repeated_sptcv_cluto.Rd @@ -55,7 +55,7 @@ change at any time without prior notice. if (mlr3misc::require_namespaces("skmeans", quietly = TRUE)) { library(mlr3) library(mlr3spatiotempcv) - task = tsk("cookfarm") + task = tsk("cookfarm_mlr3") task$set_col_roles("Date", "time") # Instantiate Resampling diff --git a/man/mlr_resamplings_repeated_sptcv_cstf.Rd b/man/mlr_resamplings_repeated_sptcv_cstf.Rd index bca9b3c30..27c2fbda4 100644 --- a/man/mlr_resamplings_repeated_sptcv_cstf.Rd +++ b/man/mlr_resamplings_repeated_sptcv_cstf.Rd @@ -42,7 +42,7 @@ Number of repeats. \examples{ library(mlr3) -task = tsk("cookfarm") +task = tsk("cookfarm_mlr3") task$set_col_roles("SOURCEID", roles = "space") task$set_col_roles("Date", roles = "time") diff --git a/man/mlr_resamplings_sptcv_cluto.Rd b/man/mlr_resamplings_sptcv_cluto.Rd index 202242fb0..8c2679024 100644 --- a/man/mlr_resamplings_sptcv_cluto.Rd +++ b/man/mlr_resamplings_sptcv_cluto.Rd @@ -55,7 +55,7 @@ change at any time without prior notice. if (mlr3misc::require_namespaces("skmeans", quietly = TRUE)) { library(mlr3) library(mlr3spatiotempcv) - task = tsk("cookfarm") + task = tsk("cookfarm_mlr3") task$set_col_roles("Date", "time") # Instantiate Resampling diff --git a/man/mlr_resamplings_sptcv_cstf.Rd b/man/mlr_resamplings_sptcv_cstf.Rd index e239947fd..b90dbf0c2 100644 --- a/man/mlr_resamplings_sptcv_cstf.Rd +++ b/man/mlr_resamplings_sptcv_cstf.Rd @@ -36,7 +36,7 @@ If \code{TRUE}, stratify on the target column. \examples{ library(mlr3) -task = tsk("cookfarm") +task = tsk("cookfarm_mlr3") task$set_col_roles("SOURCEID", roles = "space") task$set_col_roles("Date", roles = "time") diff --git a/man/mlr_tasks_cookfarm.Rd b/man/mlr_tasks_cookfarm.Rd index f5c65c719..d412fa2ec 100644 --- a/man/mlr_tasks_cookfarm.Rd +++ b/man/mlr_tasks_cookfarm.Rd @@ -28,7 +28,7 @@ CRAN in 2021-03. \if{html}{\out{
}}\preformatted{mlr_tasks$get("cookfarm") -tsk("cookfarm") +tsk("cookfarm_mlr3") }\if{html}{\out{
}} } diff --git a/tests/testthat/test-1-autoplot.R b/tests/testthat/test-1-autoplot.R index 894991bfe..aab3ae5d3 100644 --- a/tests/testthat/test-1-autoplot.R +++ b/tests/testthat/test-1-autoplot.R @@ -339,7 +339,7 @@ test_that("plot() works for 'sptcv_cstf' 2D - time_var", { set.seed(42) - task = tsk("cookfarm") + task = tsk("cookfarm_mlr3") task$set_col_roles("Date", roles = "time") rsp = rsmp("sptcv_cstf", folds = 4) rsp$instantiate(task) @@ -372,7 +372,7 @@ test_that("plot() works for 'sptcv_cstf' 2D - space_var", { set.seed(42) - task = tsk("cookfarm") + task = tsk("cookfarm_mlr3") task$set_col_roles("SOURCEID", roles = "space") rsp = rsmp("sptcv_cstf", folds = 4) rsp$instantiate(task) @@ -403,7 +403,7 @@ test_that("plot() works for 'sptcv_cstf'", { skip_if_not_installed("vdiffr") set.seed(42) - task = tsk("cookfarm") + task = tsk("cookfarm_mlr3") task$set_col_roles("Date", roles = "time") rsp = rsmp("sptcv_cstf", folds = 4) rsp$instantiate(task) @@ -429,7 +429,7 @@ test_that("plot() works for 'repeated_spcv_cstf'", { skip_if_not_installed("vdiffr") set.seed(42) - task = tsk("cookfarm") + task = tsk("cookfarm_mlr3") task$set_col_roles("Date", roles = "time") rsp = rsmp("repeated_sptcv_cstf", folds = 4, repeats = 2) rsp$instantiate(task) diff --git a/tests/testthat/test-as_task.R b/tests/testthat/test-as_task.R index 9d1701db1..3a59f5b48 100644 --- a/tests/testthat/test-as_task.R +++ b/tests/testthat/test-as_task.R @@ -31,7 +31,7 @@ test_that("as_task_classif_st.sf works", { # regr ------------------------------------------------------------------------- test_that("as_task_regr_st.TaskRegrST works", { - task = tsk("cookfarm") + task = tsk("cookfarm_mlr3") new_task = as_task_regr_st(task) expect_equal(task, new_task) @@ -69,7 +69,7 @@ test_that("as_task_classif.TaskClassifST works", { }) test_that("as_task_regr.TaskRegrST works", { - task = tsk("cookfarm") + task = tsk("cookfarm_mlr3") new_task = as_task_regr(task) expect_class(new_task, "TaskRegr") diff --git a/tests/testthat/test-datasets.R b/tests/testthat/test-datasets.R index 1bcd71226..1c4b094a2 100644 --- a/tests/testthat/test-datasets.R +++ b/tests/testthat/test-datasets.R @@ -15,7 +15,7 @@ test_that("check that ecuador example task works", { }) test_that("check that cookfarm example task works", { - task = tsk("cookfarm") + task = tsk("cookfarm_mlr3") rsp = rsmp("spcv_coords", folds = 2) rsp$instantiate(task)