Description Usage Arguments Details 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | makeClassifTask(id = deparse(substitute(data)), data, target,
weights = NULL, blocking = NULL, spatial = FALSE,
positive = NA_character_, fixup.data = "warn", check.data = TRUE)
makeClusterTask(id = deparse(substitute(data)), data, weights = NULL,
blocking = NULL, spatial = FALSE, fixup.data = "warn",
check.data = TRUE)
makeCostSensTask(id = deparse(substitute(data)), data, costs,
blocking = NULL, spatial = FALSE, fixup.data = "warn",
check.data = TRUE)
makeMultilabelTask(id = deparse(substitute(data)), data, target,
weights = NULL, blocking = NULL, spatial = FALSE, fixup.data = "warn",
check.data = TRUE)
makeRegrTask(id = deparse(substitute(data)), data, target, weights = NULL,
blocking = NULL, spatial = FALSE, fixup.data = "warn",
check.data = TRUE)
makeSurvTask(id = deparse(substitute(data)), data, target, weights = NULL,
blocking = NULL, spatial = FALSE, fixup.data = "warn",
check.data = TRUE)
|
id |
[ |
data |
[ |
target |
[ |
weights |
[ |
blocking |
[ |
spatial |
[ |
positive |
[ |
fixup.data |
[ |
check.data |
[ |
costs |
[ |
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.
If spatial = TRUE and 'SpCV' or 'SpRepCV' are selected as
resampling method, variables named x and y will be used for spatial
partitioning of the data (kmeans clustering). They will not be
used as predictors during modeling. Be aware: If coordinates are not named
x and y they will be treated as normal predictors!
Functional data can be added to a task via matrix columns. For more information refer to
makeFunctionalData.
[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.