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, regular curves are integrated over their domain and irregular curves over their observed range.
Set lower and upper to integrate over a common window.
Curves not observed over the whole window get NA.
The same operation is applied during training and prediction.
State
The $state is a named list with the $state elements inherited from
PipeOpTaskPreproc.
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 is used for regular curves and the first observed argument for irregular curves.upper::numeric(1)
The right boundary of the integration window. If not set, the domain end is used for regular curves and the last observed argument for irregular curves.
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