Functional Principal Component Analysis

Vertical and Horizontal Functional Principal Component Analysis using SRSF

moduleauthor:: Derek Tucker <dtucker@stat.fsu.edu>

fPCA.horizfPCA(gam, time, no, showplot=True)[source]

This function calculates horizontal functional principal component analysis on aligned data

Parameters:
  • gam – numpy ndarray of shape (M,N) of M warping functions
  • time – vector of size N describing the sample points
  • no (int) – number of components to extract (default = 1)
  • showplot (bool) – Shows plots of results using matplotlib (default = T)
Return type:

tuple of numpy ndarray

Return q_pca:

srsf principal directions

Return f_pca:

functional principal directions

Return latent:

latent values

Return coef:

coefficients

Return U:

eigenvectors

fPCA.vertfPCA(fn, time, qn, no=1, showplot=True)[source]

This function calculates vertical functional principal component analysis on aligned data

Parameters:
  • fn – numpy ndarray of shape (M,N) of M aligned functions with N samples
  • time – vector of size N describing the sample points
  • qn – numpy ndarray of shape (M,N) of M aligned SRSF with N samples
  • no (int) – number of components to extract (default = 1)
  • showplot (bool) – Shows plots of results using matplotlib (default = T)
Return type:

tuple of numpy ndarray

Return q_pca:

srsf principal directions

Return f_pca:

functional principal directions

Return latent:

latent values

Return coef:

coefficients

Return U:

eigenvectors

Previous topic

Functional Alignment

Next topic

Utility Functions

This Page