basismfd {ReMFPCA} | R Documentation |
Define a Set of Multidimensional Functional Basis
Description
The 'basismfd' class represents a set of multidimensional basis functions. This class utilizes basis objects from the 'fda' package, such as B-splines and Fourier bases.
Constructor for 'basismfd' objects (same as Basismfd(...) )
Usage
Basismfd(...)
Basismfd(...)
Arguments
... |
A list of 'basisfd' objects |
Active bindings
basis
A list of basis objects from the 'fda' package.
dimSupp
The dimension of the support domain of the 'basismfd' object.
supp
The matrix representing the ranges of the dimensions.
gram
The Gram matrix.
nbasis
A numeric vector containing the number of bases.
Methods
Public methods
Method new()
The constructor function for objects of the class 'basismfd' (same as Basismfd(...) )
Usage
basismfd$new(...)
Arguments
...
A list of 'basisfd' objects
Method eval()
Evaluate the 'basismfd' object at given argument values
Usage
basismfd$eval(evalarg)
Arguments
evalarg
A list of numeric vectors of argument values at which the 'basismfd' is to be evaluated
Returns
A list of evaluated values
Method print()
Print method for 'basismfd' objects
Usage
basismfd$print(...)
Arguments
...
Additional arguments to be passed to 'print' Getter and setter for 'basis' field Getter and setter for 'dimSupp' field Getter and setter for 'nbasis' field Getter and setter for 'supp' field Getter and setter for 'gram' field
Method clone()
The objects of this class are cloneable with this method.
Usage
basismfd$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
require(fda)
bs1 <- create.fourier.basis(c(0, 2 * pi), 5)
bs2 <- create.bspline.basis(c(0, 1), 7)
bs3 <- create.exponential.basis(c(0, 2), 3)
# 1-D Basis ######## (similar to the fd features)
mdbs1 <- Basismfd(bs1)
mdbs1$basis
mdbs1$dimSupp
mdbs1$nbasis
mdbs1$supp
mdbs1$gram
mdbs1$eval(1:7 / 10)
image(as.matrix(mdbs1$gram))
####### 2-D Basis ######## (fd cannot handle this)
mdbs2 <- Basismfd(bs1, bs2)
mdbs2$basis
mdbs2$dimSupp
mdbs2$nbasis
mdbs2$supp
dim(mdbs2$gram)
arg_mdbs <- list(1:10, 1:9 / 10)
mdbs2$eval(arg_mdbs)
image(as.matrix(mdbs2$gram))