Description Usage Arguments Value See Also Examples
The task encapsulates the data and specifies - through its subclasses - the type of the task. It also contains a description object detailing further aspects of the data.
Useful operators are: getTaskFormula
,
getTaskFeatureNames
,
getTaskData
,
getTaskTargets
, and
subsetTask
.
Object members:
environment
]Environment where data for the task are stored.
Use getTaskData
in order to access it.
numeric
]See argument. NULL
if not present.
factor
]See argument. NULL
if not present.
TaskDesc
]Encapsulates further information about the task.
Notes:
For multilabel classification we assume that the presence of labels is encoded via logical
columns in data
. The name of the column specifies the name of the label. target
is then a char vector that points to these columns.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | makeClassifTask(id = deparse(substitute(data)), data, target,
weights = NULL, blocking = NULL, positive = NA_character_,
fixup.data = "warn", check.data = TRUE)
makeClusterTask(id = deparse(substitute(data)), data, weights = NULL,
blocking = NULL, fixup.data = "warn", check.data = TRUE)
makeCostSensTask(id = deparse(substitute(data)), data, costs,
blocking = NULL, fixup.data = "warn", check.data = TRUE)
makeMultilabelTask(id = deparse(substitute(data)), data, target,
weights = NULL, blocking = NULL, positive = NA_character_,
fixup.data = "warn", check.data = TRUE)
makeRegrTask(id = deparse(substitute(data)), data, target, weights = NULL,
blocking = NULL, fixup.data = "warn", check.data = TRUE)
makeSurvTask(id = deparse(substitute(data)), data, target,
censoring = "rcens", weights = NULL, blocking = NULL,
fixup.data = "warn", check.data = TRUE)
|
id |
[ |
data |
[ |
target |
[ |
weights |
[ |
blocking |
[ |
positive |
[ |
fixup.data |
[ |
check.data |
[ |
costs |
[ |
censoring |
[ |
[Task
].
Other costsens: makeCostSensClassifWrapper
,
makeCostSensRegrWrapper
,
makeCostSensWeightedPairsWrapper
1 2 3 4 5 6 7 8 9 10 11 12 13 | if (requireNamespace("mlbench")) {
library(mlbench)
data(BostonHousing)
data(Ionosphere)
makeClassifTask(data = iris, target = "Species")
makeRegrTask(data = BostonHousing, target = "medv")
# an example of a classification task with more than those standard arguments:
blocking = factor(c(rep(1, 51), rep(2, 300)))
makeClassifTask(id = "myIonosphere", data = Ionosphere, target = "Class",
positive = "good", blocking = blocking)
makeClusterTask(data = iris[, -5L])
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.