View source: R/Task_operators.R
getTaskData | R Documentation |
Useful in trainLearner when you add a learning machine to the package.
getTaskData(
task,
subset = NULL,
features,
target.extra = FALSE,
recode.target = "no",
functionals.as = "dfcols"
)
task |
(Task) |
subset |
(integer | logical | |
features |
(character | integer | logical) |
target.extra |
( |
recode.target |
( |
functionals.as |
( |
Either a data.frame or a list with data.frame data
and vector target
.
Other task:
getTaskClassLevels()
,
getTaskCosts()
,
getTaskDesc()
,
getTaskFeatureNames()
,
getTaskFormula()
,
getTaskId()
,
getTaskNFeats()
,
getTaskSize()
,
getTaskTargetNames()
,
getTaskTargets()
,
getTaskType()
,
subsetTask()
library("mlbench")
data(BreastCancer)
df = BreastCancer
df$Id = NULL
task = makeClassifTask(id = "BreastCancer", data = df, target = "Class", positive = "malignant")
head(getTaskData)
head(getTaskData(task, features = c("Cell.size", "Cell.shape"), recode.target = "-1+1"))
head(getTaskData(task, subset = 1:100, recode.target = "01"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.