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 irregular data, convert it to a regular grid first using PipeOpFDAInterpol. If you need to change the domain of the columns, use PipeOpFDAScaleRange.

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:

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

Methods

Inherited methods


PipeOpFDACor$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().


PipeOpFDACor$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> (100x2) ──────────────────────────────────────────────────────────
#> • Target: y
#> • Properties: -
#> • Features (1):
#>   • dbl (1): x1_x2_cor