curve_principal_directions: Curve PCA

View source: R/curve_principal_directions.R

curve_principal_directionsR Documentation

Curve PCA

Description

Calculate principal directions of a set of curves

Usage

curve_principal_directions(v, K, mu, len = NA, no = 3, N = 5, mode = "O")

Arguments

v

array (n,T,N1) of shooting vectors

K

array (nT,nT) covariance matrix

mu

array (n,T) of mean srvf

len

length of original curves (default NA)

no

number of components

N

number of samples on each side of mean

mode

Open ("O") or Closed ("C") curves

Value

Returns a list containing

s

singular values

U

singular vectors

coef

principal coefficients

pd

principal directions

References

Srivastava, A., Klassen, E., Joshi, S., Jermyn, I., (2011). Shape analysis of elastic curves in euclidean spaces. Pattern Analysis and Machine Intelligence, IEEE Transactions on 33 (7), 1415-1428.

Examples

out <- curve_karcher_mean(beta[, , 1, 1:2], maxit = 2)
# note: use more shapes, small for speed
K <- curve_karcher_cov(out$v)
out <- curve_principal_directions(out$v, K, out$mu)

fdasrvf documentation built on Nov. 19, 2023, 1:09 a.m.