Skip to contents

Convert object to a Measure or a list of Measure.

Usage

as_measure(x, ...)

# S3 method for class '`NULL`'
as_measure(x, task_type = NULL, ...)

# S3 method for class 'Measure'
as_measure(x, clone = FALSE, ...)

as_measures(x, ...)

# Default S3 method
as_measures(x, ...)

# S3 method for class '`NULL`'
as_measures(x, task_type = NULL, ...)

# S3 method for class 'list'
as_measures(x, ...)

Arguments

x

(any)
Object to convert.

...

(any)
Additional arguments.

task_type

(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.

clone

(logical(1))
If TRUE, ensures that the returned object is not the same as the input x.

Value

Measure.