Group-wise function alignment using SRSF framework and Dynamic Programming
moduleauthor:: Derek Tucker <dtucker@stat.fsu.edu>
aligns a collection of functions while extracting pincipal components. The functions are aligned to the principal components
| Parameters: |
|
|---|---|
| Return type: | tuple of numpy array |
| Return fn: | aligned functions - numpy ndarray of shape (M,N) of M functions with N samples |
| Return qn: | aligned srvfs - similar structure to fn |
| Return q0: | original srvf - similar structure to fn |
| Return mqn: | srvf mean or median - vector of length N |
| Return gam: | warping functions - similar structure to fn |
| Return q_pca: | srsf principal directions |
| Return f_pca: | functional principal directions |
| Return latent: | latent values |
| Return coef: | coefficients |
| Return U: | eigenvectors |
This function aligns a collection of functions using the elastic square-root slope (srsf) framework.
| Parameters: |
|
|---|---|
| Return type: | tuple of numpy array |
| Return fn: | aligned functions - numpy ndarray of shape (M,N) of M functions with N samples |
| Return qn: | aligned srvfs - similar structure to fn |
| Return q0: | original srvf - similar structure to fn |
| Return fmean: | function mean or median - vector of length N |
| Return mqn: | srvf mean or median - vector of length N |
| Return gam: | warping functions - similar structure to fn |
| Return orig_var: | |
Original Variance of Functions |
|
| Return amp_var: | Amplitude Variance |
| Return phase_var: | |
Phase Variance |
|
>>> import tables
>>> fun=tables.open_file("../Data/simu_data.h5")
>>> f = fun.root.f[:]
>>> f = f.transpose()
>>> time = fun.root.time[:]
>>> out = srsf_align(f,time)