Elastic Functional Changepoint#
Elastic functional change point detection
moduleauthor:: J. Derek Tucker <jdtuck@sandia.gov>
- class elastic_changepoint.elastic_amp_change_ff(f, time, smooth_data=False, sparam=25, use_warp_data=False, warp_data=None, parallel=False)[source]#
” This class provides elastic changepoint using elastic FDA. It is fully-functional and an extension of the methodology of Aue et al.
Usage: obj = elastic_amp_change_ff(f,time)
- Parameters:
f – (M,N) % matrix defining N functions of M samples
time – time vector of length M
warp_data – aligned data (default: None)
Sn – test statistic values
Tn – max of test statistic
p – p-value
k_star – change point
values – values of computed Brownian Bridges
dat_a – data before changepoint
dat_b – data after changepoint
warp_a – warping functions before changepoint
warp_b – warping functions after changepoint
mean_a – mean function before changepoint
mean_b – mean function after changepoint
warp_mean_a – mean warping function before changepoint
warp_mean_b – mean warping function after changepoint
Author : J. Derek Tucker <jdtuck AT sandia.gov> and Drew Yarger <anyarge AT sandia.gov> Date : 24-Aug-2022
- compute(d=1000, h=0, M_approx=365, compute_epidemic=False)[source]#
Compute elastic change detection :param d: number of monte carlo iterations to compute p-value :param h: index of window type to compute long run covariance :param M_approx: number of time points to compute p-value :param compute_epidemic: compute epidemic changepoint model (default: False)
- class elastic_changepoint.elastic_change(f, time, BBridges=None, use_BBridges=False, smooth_data=False, warp_data=None, use_warp_data=False, parallel=False, sparam=25)[source]#
” This class provides elastic changepoint using elastic fpca
Usage: obj = elastic_change(f,time)
- Parameters:
f – (M,N) % matrix defining N functions of M samples
time – time vector of length M
BBridges – precomputed Brownian Bridges (default: None)
use_BBridges – use precomputed Brownian Bridges (default: False)
warp_data – aligned data (default: None)
Sn – test statistic values
Tn – max of test statistic
p – p-value
k_star – change point
values – values of computed Brownian Bridges
dat_a – data before changepoint
dat_b – data after changepoint
warp_a – warping functions before changepoint
warp_b – warping functions after changepoint
mean_a – mean function before changepoint
mean_b – mean function after changepoint
warp_mean_a – mean warping function before changepoint
warp_mean_b – mean warping function after changepoin
Author : J. D. Tucker (JDT) <jdtuck AT sandia.gov> Date : 27-Apr-2022
- compute(pca_method='vert', pc=0.95, d=1000, compute_epidemic=False, n_pcs=5, preset_pcs=False)[source]#
Compute elastic change detection
- Parameters:
pca_method – string specifying pca method (options = “combined”,”vert”, or “horiz”, default = “combined”)
pc – percentage of cumulative variance to use (default: 0.95)
compute_epidemic – compute epidemic changepoint model (default: False)
n_pcs – scalar specify number of principal components (default: 5)
preset_pcs – use all PCs (default: False)
- class elastic_changepoint.elastic_ph_change_ff(f, time, smooth_data=False, sparam=25, use_warp_data=False, warp_data=None, parallel=False)[source]#
” This class provides elastic changepoint using elastic FDA on warping functions. It is fully-functional and an extension of the methodology of Aue et al.
Usage: obj = elastic_ph_change_ff(f,time)
- Parameters:
f – (M,N) % matrix defining N functions of M samples
time – time vector of length M
warp_data – aligned data (default: None)
Sn – test statistic values
Tn – max of test statistic
p – p-value
k_star – change point
values – values of computed Brownian Bridges
dat_a – data before changepoint
dat_b – data after changepoint
warp_a – warping functions before changepoint
warp_b – warping functions after changepoint
mean_a – mean function before changepoint
mean_b – mean function after changepoint
warp_mean_a – mean warping function before changepoint
warp_mean_b – mean warping function after changepoint
Author : J. Derek Tucker <jdtuck AT sandia.gov> Date : 17-Nov-2022