Learn R Programming

mlr (version 2.0)

makeClassifTask: Create a classification, regression, survival or cost-sensitive classification task.

Description

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, getTaskFormulaAsString, getTaskFeatureNames, getTaskData, getTaskTargets, subsetTask.

Object members: [object Object],[object Object],[object Object],[object Object]

Usage

makeClassifTask(id, data, target, weights = NULL, blocking = NULL, positive,
  fixup.data = "warn", check.data = TRUE)

makeCostSensTask(id, data, costs, blocking = NULL, fixup.data = "warn", check.data = TRUE)

makeRegrTask(id, data, target, weights = NULL, blocking = NULL, fixup.data = "warn", check.data = TRUE)

makeSurvTask(id, data, target, surv.type = "right", weights = NULL, blocking = NULL, fixup.data = "warn", check.data = TRUE)

Arguments

Value

[SupervisedTask].

Examples

Run this code
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)

Run the code above in your browser using DataLab