mlr_pipeops_fda.scalerange {mlr3fda} | R Documentation |
Linearly transform the domain of functional data so they are between lower
and upper
.
The formula for this is x' = offset + x * scale
,
where scale
is (upper - lower) / (max(x) - min(x))
and
offset
is -min(x) * scale + lower
. The same transformation is applied during training and prediction.
The parameters are the parameters inherited from PipeOpTaskPreproc
,
as well as the following parameters:
lower
:: numeric(1)
Target value of smallest item of input data. Initialized to 0
.
uppper
:: numeric(1)
Target value of greatest item of input data. Initialized to 1
.
mlr3pipelines::PipeOp
-> mlr3pipelines::PipeOpTaskPreproc
-> PipeOpFDAScaleRange
new()
Initializes a new instance of this Class.
PipeOpFDAScaleRange$new(id = "fda.scalerange", param_vals = list())
id
(character(1)
)
Identifier of resulting object, default "fda.scalerange"
.
param_vals
(named list
)
List of hyperparameter settings, overwriting the hyperparameter settings that would
otherwise be set during construction. Default list()
.
clone()
The objects of this class are cloneable with this method.
PipeOpFDAScaleRange$clone(deep = FALSE)
deep
Whether to make a deep clone.
task = tsk("fuel")
po_scale = po("fda.scalerange", lower = -1, upper = 1)
task_scale = po_scale$train(list(task))[[1L]]
task_scale$data()