R/helper_DataBackend.R

Defines functions assert_spatial_task

Documented in assert_spatial_task

#' Check spatial task
#' @description
#'   Assertion helper for spatial mlr3 tasks.
#' @inheritParams mlr3::assert_task
#' @keywords internal
assert_spatial_task = function(task) {
  if (!checkmate::test_multi_class(task, c("TaskClassifST", "TaskRegrST"))) {
    stopf("Assertion on 'task' failed: Must inherit from class 'TaskClassifST' or 'TaskRegrST'.") # nolint
  }
}

Try the mlr3spatiotempcv package in your browser

Any scripts or data that you put into this service are public.

mlr3spatiotempcv documentation built on Oct. 24, 2023, 5:07 p.m.