mlr_pipeops_fda.extract {mlr3fda}R Documentation

Extracts Simple Features from Functional Columns

Description

This is the class that extracts simple features from functional columns. Note that it only operates on values that were actually observed and does not interpolate.

Parameters

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

Naming

The new names generally append a ⁠_{feature}⁠ to the corresponding column name. However this can lead to name clashes with existing columns. This is solved as follows: If a column was called "x" and the feature is "mean", the corresponding new column will be called "x_mean". In case of duplicates, unique names are obtained using make.unique() and a warning is given.

Super classes

mlr3pipelines::PipeOp -> mlr3pipelines::PipeOpTaskPreproc -> mlr3pipelines::PipeOpTaskPreprocSimple -> PipeOpFDAExtract

Methods

Public methods

Inherited methods

Method new()

Initializes a new instance of this Class.

Usage
PipeOpFDAExtract$new(id = "fda.extract", param_vals = list())
Arguments
id

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

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
PipeOpFDAExtract$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

library(mlr3pipelines)

task = tsk("fuel")
po_fmean = po("fda.extract", features = "mean")
task_fmean = po_fmean$train(list(task))[[1L]]

# add more than one feature
pop = po("fda.extract", features = c("mean", "median", "var"))
task_features = pop$train(list(task))[[1L]]

# add a custom feature
po_custom = po("fda.extract",
  features = list(mean = function(arg, value) mean(value, na.rm = TRUE))
)
task_custom = po_custom$train(list(task))[[1L]]
task_custom

[Package mlr3fda version 0.1.1 Index]