Learn R Programming

mlr3fda (version 0.3.0)

mlr_pipeops_fda.random_effect: Extracts Random Effects from Functional Columns

Description

This is the class that extracts random effects, specifically random intercepts and random slopes, from functional columns. This PipeOp fits a linear mixed model, specifically a random intercept and random slope model, using the lme4::lmer() function. The target variable is the value of the functional feature which is regressed on the functional feature's argument while subject id determines the grouping structure. After model estimation, the random effects are extracted and assigned to the correct id.

Arguments

Parameters

The parameters are the parameters inherited from PipeOpTaskPreprocSimple.

Naming

The new names append _random_intercept and _random_slope to the corresponding column name of the functional feature.

Super classes

mlr3pipelines::PipeOp -> mlr3pipelines::PipeOpTaskPreproc -> mlr3pipelines::PipeOpTaskPreprocSimple -> PipeOpFDARandomEffect

Methods

Inherited methods


Method new()

Initializes a new instance of this Class

Usage

PipeOpFDARandomEffect$new(id = "fda.random_effect", param_vals = list())

Arguments

id

(character(1)) Identifier of the operator, default is "fda.random_effect".

param_vals

(named list()) List of hyperparameter settings, overwriting default settings set during construction.


Method clone()

The objects of this class are cloneable with this method.

Usage

PipeOpFDARandomEffect$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
task = tsk("dti")
po_fre = po("fda.random_effect")
task_fre = po_fre$train(list(task))[[1L]]

Run the code above in your browser using DataLab