mlr_pipeops_fda.scalerange {mlr3fda} | R Documentation |
Linearly Transform the Domain of Functional Data.
Description
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.
Parameters
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 to0
. -
uppper
::numeric(1)
Target value of greatest item of input data. Initialized to1
.
Super classes
mlr3pipelines::PipeOp
-> mlr3pipelines::PipeOpTaskPreproc
-> PipeOpFDAScaleRange
Methods
Public methods
Inherited methods
Method new()
Initializes a new instance of this Class.
Usage
PipeOpFDAScaleRange$new(id = "fda.scalerange", param_vals = list())
Arguments
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. Defaultlist()
.
Method clone()
The objects of this class are cloneable with this method.
Usage
PipeOpFDAScaleRange$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
task = tsk("fuel")
po_scale = po("fda.scalerange", lower = -1, upper = 1)
task_scale = po_scale$train(list(task))[[1L]]
task_scale$data()