getTaskTargets(task, recode.target = "no")
Task
]
The task.character(1)
]
Should target classes be recoded? Only for binary classification.
Possible are “no” (do nothing), “01”, and “-1+1”.
In the two latter cases the target vector is converted into a numeric vector.
The positive class is coded as +1 and the negative class either as 0 or -1.
Default is “no”.factor
for classification or a numeric
for regression, a data.frame
of logical columns for multilabel.
getTaskClassLevels
,
getTaskCosts
, getTaskData
,
getTaskDescription
,
getTaskFeatureNames
,
getTaskFormula
, getTaskId
,
getTaskNFeats
, getTaskSize
,
getTaskTargetNames
,
getTaskType
, subsetTask
task = makeClassifTask(data = iris, target = "Species")
getTaskTargets(task)
Run the code above in your browser using DataLab