Skip to contents

Calculates the cross-correlation between two functional vectors using tf::tf_crosscor(). Note that it only operates on regular data and that the cross-correlation assumes that each column has the same domain.

To apply this PipeOp to irregualr data, convert it to a regular grid first using PipeOpFDAInterpol. If you need to change the domain of the columns, use PipeOpFDAScaleRange.

Parameters

The parameters are the parameters inherited from PipeOpTaskPreprocSimple, as well as the following parameters:

  • arg :: numeric()
    Grid to use for the cross-correlation.

Methods

Inherited methods


Method new()

Initializes a new instance of this Class.

Usage

PipeOpFDACor$new(id = "fda.cor", param_vals = list())

Arguments

id

(character(1))
Identifier of resulting object, default "fda.cor".

param_vals

(named list)
List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction. Default list().


Method clone()

The objects of this class are cloneable with this method.

Usage

PipeOpFDACor$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

set.seed(1234L)
dt = data.table(y = 1:100, x1 = tf::tf_rgp(100L), x2 = tf::tf_rgp(100L))
task = as_task_regr(dt, target = "y")
po_cor = po("fda.cor")
task_cor = po_cor$train(list(task))[[1L]]
task_cor
#> <TaskRegr:dt> (100 x 2)
#> * Target: y
#> * Properties: -
#> * Features (1):
#>   - dbl (1): x1_x2_cor