Linearly transforms numeric data columns so they are between
upper. The formula for this is
x' = offset + x * scale,
(upper - lower) / (max(x) - min(x)) and
-min(x) * scale + lower. The same transformation is applied during training and
R6Class object inheriting from
PipeOpScaleRange$new(id = "scalerange", 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 scaled numeric features.
$state is a named
list with the
$state elements inherited from
as well as the two transformation parameters
offset for each numeric
The parameters are the parameters inherited from
PipeOpTaskPreproc, as well as:
Target value of smallest item of input data. Initialized to 0.
Target value of greatest item of input data. Initialized to 1.
Only methods inherited from
library("mlr3") task = tsk("iris") pop = po("scalerange", param_vals = list(lower = -1, upper = 1)) task$data() pop$train(list(task))[]$data() pop$state
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.