Zoom in or out on functional features by restricting their domain to a specified window.
This operation extracts a subset of each function by defining new lower and upper boundaries,
effectively cropping the functional data to focus on a specific region of interest.
Calls tf::tf_zoom()
from package tf.
Parameters
The parameters are the parameters inherited from PipeOpTaskPreprocSimple
,
as well as the following parameters:
begin
::numeric()
The lower limit of the domain. Can be a single value applied to all functional columns, or a numeric of length equal to the number of observations. The window includes all values where argument >=begin
. If not specified, defaults to the lower limit of each function's domain.end
::numeric()
The upper limit of the domain.
Super classes
mlr3pipelines::PipeOp
-> mlr3pipelines::PipeOpTaskPreproc
-> mlr3pipelines::PipeOpTaskPreprocSimple
-> PipeOpFDAZoom
Methods
Method new()
Initializes a new instance of this Class.
Usage
PipeOpFDAZoom$new(id = "fda.zoom", param_vals = list())
Examples
task = tsk("fuel")
pop = po("fda.zoom", begin = 50, end = 100)
task_zoom = pop$train(list(task))[[1L]]
task_zoom$data()
#> heatan h20 NIR UVVIS
#> <num> <num> <tfd_reg> <tfd_reg>
#> 1: 26.7810 2.3000 ██████████████████████████ ▇▇▇▇▇▇▇▇▇▇▇███████████████
#> 2: 27.4720 3.0000 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇████ ▁▂▂▁▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▃
#> 3: 23.8400 2.0002 ▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
#> 4: 18.1680 1.8500 ▅▄▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅ ▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃
#> 5: 17.5170 2.3898 ▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅ ▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▃▂▃▃
#> ---
#> 125: 23.8340 2.1100 ▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅ ▃▃▃▃▂▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃
#> 126: 11.8050 1.6200 ▁▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▃ ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▂
#> 127: 8.8315 1.4200 ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▂▂▂▂▂▂▂ ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
#> 128: 11.3450 1.4800 ▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▆▅▆▆▆▆▆▆▆▆ ▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆
#> 129: 28.9940 2.5000 ▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆ ▂▂▂▂▂▂▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃