S3 generics and methods to coerce to (lists of) Task, Learner, Resampling, and Measure.
as_task(x, clone = FALSE)# S3 method for Task
as_task(x, clone = FALSE)
as_tasks(x, clone = FALSE)
# S3 method for list
as_tasks(x, clone = FALSE)
# S3 method for Task
as_tasks(x, clone = FALSE)
as_learner(x, clone = FALSE)
# S3 method for Learner
as_learner(x, clone = FALSE)
as_learners(x, clone = FALSE)
# S3 method for list
as_learners(x, clone = FALSE)
# S3 method for Learner
as_learners(x, clone = FALSE)
as_resampling(x, clone = FALSE)
# S3 method for Resampling
as_resampling(x, clone = FALSE)
as_resamplings(x, clone = FALSE)
# S3 method for list
as_resamplings(x, clone = FALSE)
# S3 method for Resampling
as_resamplings(x, clone = FALSE)
as_measure(x, task_type = NULL, clone = FALSE)
# S3 method for `NULL`
as_measure(x, task_type = NULL, clone = FALSE)
# S3 method for Measure
as_measure(x, task_type = NULL, clone = FALSE)
as_measures(x, task_type = NULL, clone = FALSE)
# S3 method for `NULL`
as_measures(x, task_type = NULL, clone = FALSE)
# S3 method for list
as_measures(x, task_type = NULL, clone = FALSE)
# S3 method for Measure
as_measures(x, task_type = NULL, clone = FALSE)
(any
)
Object to coerce.
(logical(1)
)
If TRUE
, ensures that the returned object is not the same as the input x
, e.g.
by cloning it or constructing it from a dictionary such as mlr_learners.
(character(1)
)
Used if x
is NULL
to construct a default measure for the respective task type.
The default measures are stored in mlr_reflections$default_measures
.
Coerced object. The default method will return the object as-is. Failed coercions have to be handled by on of the assertions in mlr_assertions.
# NOT RUN {
# convert single measure to list of measures
measure = msr("classif.ce")
as_measures(measure)
# }
Run the code above in your browser using DataLab