Learn R Programming

mlr3proba (version 0.2.1)

TaskDens: Density Task

Description

This task specializes Task for density estimation problems. The target column is assumed to be numeric. The task_type is set to "density".

Predefined tasks are stored in the dictionary mlr_tasks.

Arguments

Super class

mlr3::Task -> TaskDens

Methods

Public methods

Method new()

Creates a new instance of this R6 class.

Usage

TaskDens$new(id, backend, target)

Arguments

id

(character(1)) Identifier for the new instance.

backend

(DataBackend) Either a DataBackend, or any object which is convertible to a DataBackend with as_data_backend(). E.g., a data.frame() will be converted to a DataBackendDataTable.

target

(character(1)) Name of the target column.

Method truth()

Returns the target column for specified row_ids, this is unsupervised so should not be thought of as a 'true' prediction. Defaults to all rows with role "use".

Usage

TaskDens$truth(rows = NULL)

Arguments

rows

integer() Row indices.

Returns

numeric().

Method clone()

The objects of this class are cloneable with this method.

Usage

TaskDens$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

See Also

Other Task: TaskSurv

Examples

Run this code
# NOT RUN {
task = TaskDens$new("precip", backend = data.frame(target = precip), target = "target")
task$task_type
task$truth()
# }

Run the code above in your browser using DataLab