Learn R Programming

mlr (version 2.7)

getTaskTargets: Get target data of task.

Description

Get target data of task.

Usage

getTaskTargets(task, recode.target = "no")

Arguments

Value

A factor for classification or a numeric for regression, a data.frame of logical columns for multilabel.

See Also

Other task: getTaskClassLevels, getTaskCosts, getTaskData, getTaskDescription, getTaskFeatureNames, getTaskFormula, getTaskId, getTaskNFeats, getTaskSize, getTaskTargetNames, getTaskType, subsetTask

Examples

Run this code
task = makeClassifTask(data = iris, target = "Species")
getTaskTargets(task)

Run the code above in your browser using DataLab