Functional Principal Component Analysis¶
These functions are for computing functional principal component anlaysis (fPCA) on aligned data and generating random samples
fPCA Functions¶
-
vert_fPCA(fn, timet, qn; no=1)¶ Calculates vertical functional principal component analysis on aligned data
fnarray of shape (M,N) of N aligned functions with M samplestimetvector of size M describing the sample pointsqnarray of shape (M,N) of N aligned SRSF with M samplesnonumber of components to extract (default = 1)
Returns Dict containing:
q_pcasrsf principal directionsf_pcafunctional principal directionslatentlatent valuescoefcoefficientsUeigenvectors
-
horiz_fPCA(gam, timet; no=1)¶ Calculates horizontal functional principal component analysis on aligned data
gamarray of shape (M,N) of N warping functions with M samplestimetvector of size M describing the sample pointsnonumber of components to extract (default = 1)
Returns Dict containing:
gam_pcawarping principal directionspsi_pcasrsf functional principal directionslatentlatent valuesUeigenvectorsgam_mumean warping functionvec1shooting vectors
-
gauss_model(fn, timet, qn, gam; n=1, sort_samples=false)¶ Computes random samples of functions from aligned data using Gaussian model
fnaligned functions (M,N)timetvector (M) describing timeqnaligned srvfs (M,N)gamwarping functions (M,N)nnumber of samplessort_samplessort samples
Returns Dict containing:
fsrandom aligned functionsgamsrandom warping functionsftrandom functions