Description Usage Format Value Fields See Also Examples
A R6::R6Class()
to construct classification tasks.
1 |
R6Class()
object
TaskClassif()
.
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.
1 2 | task = TaskClassif$new("iris", data = iris, target = "Species")
task$formula
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.