| mlr_pipeops_fda.fpca {mlr3fda} | R Documentation |
Functional Principal Component Analysis
Description
This PipeOp applies a functional principal component analysis (FPCA) to functional columns and then
extracts the principal components as features. This is done using a (truncated) weighted SVD.
To apply this PipeOp to irregualr data, convert it to a regular grid first using PipeOpFDAInterpol.
For more details, see tf::tfb_fpc(), which is called internally.
Parameters
The parameters are the parameters inherited from PipeOpTaskPreproc,
as well as the following parameters:
-
pve::numeric(1)
The percentage of variance explained that should be retained. Default is0.995. -
n_components::integer(1)
The number of principal components to extract. This parameter is initialized toInf.
Naming
The new names generally append a _pc_{number} to the corresponding column name.
If a column was called "x" and the there are three principcal components, the corresponding
new columns will be called "x_pc_1", "x_pc_2", "x_pc_3".
Super classes
mlr3pipelines::PipeOp -> mlr3pipelines::PipeOpTaskPreproc -> PipeOpFPCA
Methods
Public methods
Inherited methods
Method new()
Initializes a new instance of this Class.
Usage
PipeOpFPCA$new(id = "fda.fpca", param_vals = list())
Arguments
id(
character(1))
Identifier of resulting object, default is"fda.fpca".param_vals(named
list)
List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction. Defaultlist().
Method clone()
The objects of this class are cloneable with this method.
Usage
PipeOpFPCA$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
task = tsk("fuel")
po_fpca = po("fda.fpca", n_components = 3L)
task_fpca = po_fpca$train(list(task))[[1L]]
task_fpca$data()