par.FDTW: Setting open-end/open-begin functional dynamic time warping...

View source: R/FRTM.R

par.FDTWR Documentation

Setting open-end/open-begin functional dynamic time warping (OEB-FDTW) defaults

Description

This is an internal function of package FRTM which allows controlling the parameters to implement the OEB-FDTW in the FRTM method.

Usage

par.FDTW(
  N = 100,
  M = 50,
  smin = NULL,
  smax = NULL,
  alpha_vec = c(0, 0.5, 1),
  frac_oeob = 0.1,
  eta = 0.5,
  iter = 3,
  template = "Procrustes",
  grid_tem = NULL,
  index_tem = NULL,
  iter_tem = 2,
  lambda = c(0, 10^seq(-8, -2, by = 0.25), 10^5),
  threshold = 0.01,
  seq_t = seq(0.01, 1, length.out = 100)
)

Arguments

N

The number N_{t} of evenly spaced values along the template domain \mathcal{D}_{Y}.

M

The number M_{x} of evenly spaced values along the functional observation domain \mathcal{D}_{X_i}.

smin

The minimum values allowed for the first derivative of the warping function h_i. If NULL, in FRTM_PhaseI, it is set as 0.001 multiplied by the ratio between the size of the monitoring and template domains.

smax

The maximum values allowed for the first derivative of the warping function h_i. If NULL, in FRTM_PhaseI, it is set as 100 multiplied by the ratio between the size of the monitoring and template domains.

alpha_vec

Grid of values to find the optimal value of \alpha_i.

frac_oeob

Fraction of \mathcal{D}_{Y} and \mathcal{D}_{X_i} to obtain \delta_{t,s}, \delta_{t,e},\delta_{x,s} and \delta_{x,e}.

eta

Fraction \eta for updating the constraint bounds to reduce the error associated to the discretization (Deriso and Boyd, 2022).

iter

Number of iteration in the iterative refinement to reduce the error associated to the discretization (Deriso and Boyd, 2022).

template

If "Procrustes", the Procrustes fitting process is used to select the template function. If numeric, the discrete observations of the template function.

grid_tem

If template is numeric, a vector of time points where the discrete observations of the template function are sampled.

index_tem

If NULL and template="Procrustes", the function in the training set, whose domain length is nearest the median domain length, is chosen as initial estimate of the template function. If an integer and template="Procrustes", the index_tem function in the training set is chosen as initial estimate of the template function. If template is numeric, this parameter is not used.

iter_tem

Number of iterations in the Procrustes fitting process.

lambda

Grid of smoothing parameters to evaluate the average curve distance (ACD).

threshold

The fraction \delta of the difference between the maximum and the minimum distance in the selection of the smoothing parameter via the ACD.

seq_t

Discretized sequence in the template domain \mathcal{D}_{Y}.

Author(s)

F. Centofanti

References

Deriso, D. and S. Boyd (2022). A general optimization framework for dynamic time warping. Optimization and Engineering, 1-22.

See Also

FRTM_PhaseI

Examples

library(funcharts)
par.FDTW()

funcharts documentation built on April 3, 2025, 7:47 p.m.