Computes the definite integral of functional features via tf::tf_integrate().
The integral summarizes each curve into a single scalar, namely the (signed) area under the curve over its domain.
By default the integral is taken over the full domain of each curve. The lower and upper parameters restrict
the integration to a window. The same operation is applied during training and prediction.
Parameters
The parameters are the parameters inherited from PipeOpTaskPreprocSimple,
as well as the following parameters:
lower::numeric(1)
The left boundary of the integration window. If not set, the domain start of each curve is used.upper::numeric(1)
The right boundary of the integration window. If not set, the domain end of each curve is used.
Naming
The new names generally append a _integral to the corresponding column name.
If a column was called "x", the corresponding new column will be called "x_integral".
Super classes
mlr3pipelines::PipeOp -> mlr3pipelines::PipeOpTaskPreproc -> mlr3pipelines::PipeOpTaskPreprocSimple -> PipeOpFDAIntegrate
Methods
PipeOpFDAIntegrate$new()
Initializes a new instance of this Class.
Usage
PipeOpFDAIntegrate$new(id = "fda.integrate", param_vals = list())Examples
task = tsk("fuel")
po_integrate = po("fda.integrate")
task_integrate = po_integrate$train(list(task))[[1L]]
task_integrate$data(cols = c("NIR_integral", "UVVIS_integral"))
#> NIR_integral UVVIS_integral
#> <num> <num>
#> 1: 114.935592 127.99948
#> 2: 97.984734 -106.18361
#> 3: 3.084564 -35.23032
#> 4: 4.677446 -61.23096
#> 5: 19.189222 -97.41908
#> ---
#> 125: 27.320455 -73.85921
#> 126: -56.876993 -124.84087
#> 127: -77.806418 -140.49484
#> 128: 34.483231 68.42104
#> 129: 29.168967 -78.78329