getTaskFormula: Get formula of a task.

View source: R/Task_operators.R

getTaskFormulaR Documentation

Get formula of a task.

Description

This is usually simply ⁠<target> ~ ⁠. For multilabel it is ⁠<target_1> + ... + <target_k> ~⁠.

Usage

getTaskFormula(
  x,
  target = getTaskTargetNames(x),
  explicit.features = FALSE,
  env = parent.frame()
)

Arguments

x

(Task | TaskDesc)
Task or its description object.

target

(character(1))
Left hand side of the formula. Default is defined by task x.

explicit.features

(logical(1))
Should the features (right hand side of the formula) be explicitly listed? Default is FALSE, i.e., they will be represented as ".".

env

(environment)
Environment of the formula. Default is parent.frame().

Value

(formula).

See Also

Other task: getTaskClassLevels(), getTaskCosts(), getTaskData(), getTaskDesc(), getTaskFeatureNames(), getTaskId(), getTaskNFeats(), getTaskSize(), getTaskTargetNames(), getTaskTargets(), getTaskType(), subsetTask()


berndbischl/mlr documentation built on Aug. 15, 2024, 4:20 p.m.