Changes the column roles of the input
Task according to
R6Class object inheriting from
PipeOpColRoles$new(id = "colroles", param_vals = list())
Identifier of resulting object, default
param_vals :: named
List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction. Default
Input and output channels are inherited from
The output is the input
Task with transformed column roles according to
$state is a named
list with the
$state elements inherited from
The parameters are the parameters inherited from
PipeOpTaskPreproc, as well as:
Named list of new column roles. The names must match the column names of the input task that will later be trained/predicted on. Each entry of the list must contain a character vector with possible values of
mlr_reflections$task_col_roles. If the value is
character(), the column will be dropped from the input task. Changing the role of a
column results in this column loosing its previous role(s). Setting a new target variable or
changing the role of an existing target variable is not supported.
Only methods inherited from
library("mlr3") task = tsk("boston_housing") pop = po("colroles", param_vals = list( new_role = list(cmedv = "order") )) pop$train(list(task))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.