TaskClassif: Classification Tasks

Description Usage Format Value Fields See Also Examples

Description

A R6::R6Class() to construct classification tasks.

Usage

1

Format

R6Class() object

Value

TaskClassif().

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.

positive

(character(1))
Only for binary classification: Level of the positive class (NA otherwise).

classes

character()
Levels of class labels.

nclasses

(integer(1))
Number of levels of class labels.

See Also

Other Tasks: TaskRegr, Task

Examples

1
2
task = TaskClassif$new("iris", data = iris, target = "Species")
task$formula

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