| predict.pca_mfd | R Documentation |
Computes either the scores of new observations on selected principal
components, or their reconstruction from the selected components,
given a PCA fitted by pca_mfd.
## S3 method for class 'pca_mfd'
predict(
object,
newdata = NULL,
components = seq_len(ncol(object$pcscores)),
type = c("scores", "reconstruction"),
...
)
object |
An object of class |
newdata |
An object of class |
components |
Integer vector specifying the indices of the principal components to use. Defaults to all available components. |
type |
Character string: either |
... |
Further arguments passed to or from other methods (not used). |
This function is an S3 method for objects of class "pca_mfd".
It is usually called via the generic predict function.
The new data are first centered and (optionally) scaled using the functional center and scale stored in the PCA object.
If type = "scores", inner products with the selected eigenfunctions
are computed and summed across basis functions.
If type = "reconstruction", the predicted functional data are
reconstructed from the scores and harmonics.
If type = "scores", a numeric matrix of dimension
nobs \times length(components).
If type = "reconstruction", an object of class "mfd".
pca_mfd, scale_mfd
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.