Task: Basic Tasks

Description Usage Format Value Fields See Also Examples

Description

This is the abstract base class for task objects. Use TaskClassif() or TaskRegr() to construct tasks instead of this class.

Usage

1

Format

R6Class() object

Value

Task().

Fields

id

(character(1))
Identifier of the task.

backend

(Backend)
Internal abstraction for data access. Leave this alone unless you know exactly what you are doing.

get

(function(rows = NULL, cols = NULL))
Get (a subset of) the task data. Rows must be specified by row ids (defaulting to integers if not specified otherwise), columns must be addressed by name.

head

(function(n = 6L))
Fetches the first n rows of the data and returns a data.table.

features

character
Names of the features.

formula

character
Formula describing the learning task.

subset

(function(rows = NULL, cols = NULL))
Subset this task to contain only the specified rows and columns.

nrow

(integer(1))
Number of rows in the current view of the task.

ncol

(integer(1))
Number of columns in the current view of the task.

col.types

(named character)
Column class information.

missing.values

(named integer)
Number of missing values per column.

target

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

truth

(function(rows = NULL)
Returns data.table with the true outcome for specified rows.

See Also

Other Tasks: TaskClassif, TaskRegr

Examples

1
2
task = Task$new("iris", data = iris)
task$formula

mlr-org/mlrng documentation built on May 4, 2019, 4:22 p.m.