Learn R Programming

mlr3fda (version 0.2.0)

mlr_pipeops_fda.smooth: Smoothing Functional Columns

Description

Smoothes functional data using tf::tf_smooth(). This preprocessing operator is similar to PipeOpFDAInterpol, however it does not interpolate to unobserved x-values, but rather smooths the observed values.

Arguments

Parameters

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

  • method :: character(1)
    One of:

    • "lowess": locally weighted scatterplot smoothing (default)

    • "rollmean": rolling mean

    • "rollmedian": rolling meadian

    • "savgol": Savitzky-Golay filtering

    All methods but "lowess" ignore non-equidistant arg values.

  • args :: named list()
    List of named arguments that is passed to tf_smooth(). See the help page of tf_smooth() for default values.

  • verbose :: logical(1)
    Whether to print messages during the transformation. Is initialized to FALSE.

Super classes

mlr3pipelines::PipeOp -> mlr3pipelines::PipeOpTaskPreproc -> mlr3pipelines::PipeOpTaskPreprocSimple -> PipeOpFDASmooth

Methods

Inherited methods


Method new()

Initializes a new instance of this Class.

Usage

PipeOpFDASmooth$new(id = "fda.smooth", param_vals = list())

Arguments

id

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

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

PipeOpFDASmooth$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
task = tsk("fuel")
po_smooth = po("fda.smooth", method = "rollmean", args = list(k = 5))
task_smooth = po_smooth$train(list(task))[[1L]]
task_smooth
task_smooth$data(cols = c("NIR", "UVVIS"))

Run the code above in your browser using DataLab