Transforms columns using a given
formula using the
R6Class object inheriting from
PipeOpModelMatrix$new(id = "modelmatrix", 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 columns according to the used
$state is a named
list with the
$state elements inherited from
The parameters are the parameters inherited from
PipeOpTaskPreproc, as well as:
Formula to use. Higher order interactions can be created using constructs like
~. ^ 2.
By default, an
(Intercept) column of all
1s is created, which can be avoided by adding
0 + to the term.
Only methods inherited from
library("mlr3") task = tsk("iris") pop = po("modelmatrix", formula = ~ . ^ 2) task$data() pop$train(list(task))[]$data() pop$param_set$values$formula = ~ 0 + . ^ 2 pop$train(list(task))[]$data()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.