Skip to content

Commit

Permalink
- chore: rename task cookfarm to cookfarm_mlr3
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-s committed Jun 3, 2022
1 parent 1f7978b commit 1c06d3c
Show file tree
Hide file tree
Showing 27 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion R/ResamplingRepeatedSptCVCluto.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/ResamplingRepeatedSptCVCstf.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
#'
Expand Down
2 changes: 1 addition & 1 deletion R/ResamplingSptCVCluto.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/ResamplingSptCVCstf.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
#'
Expand Down
2 changes: 1 addition & 1 deletion R/TaskClassifST.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/TaskRegrST.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions R/Task_regr_cookfarm_profiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @section Usage:
#' ```
#' mlr_tasks$get("cookfarm")
#' tsk("cookfarm")
#' tsk("cookfarm_mlr3")
#' ```
#'
#' @description
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion R/as_task_regr_st.R
Original file line number Diff line number Diff line change
Expand Up @@ -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, ...) {
Expand Down
2 changes: 1 addition & 1 deletion R/autoplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
#'
Expand Down
2 changes: 1 addition & 1 deletion R/autoplot_spcv_cstf.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion doc/mlr3spatiotempcv.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion doc/spatiotemp-viz.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
#
Expand Down
2 changes: 1 addition & 1 deletion doc/spatiotemp-viz.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion man/TaskClassifST.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/TaskRegrST.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/as_task_regr_st.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/autoplot.ResamplingSptCVCluto.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/autoplot.ResamplingSptCVCstf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/mlr_resamplings_repeated_sptcv_cluto.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/mlr_resamplings_repeated_sptcv_cstf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/mlr_resamplings_sptcv_cluto.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/mlr_resamplings_sptcv_cstf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/mlr_tasks_cookfarm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/testthat/test-1-autoplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-as_task.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-datasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 1c06d3c

Please sign in to comment.