train_fd: Train methods

View source: R/train.R

train_fdR Documentation

Train methods

Description

Trains and applies a model based fault detection method for detecting the changes in a multivariate time series. Can train a GRU, MRF, or VAR model to pair with either an MCUSUM or MEWMA control chart. Can also apply a centered and scaled Hotelling's T^2 test.

Usage

train_fd(
  data,
  method = "gruMEWMA",
  data_exog = NULL,
  lags = 1,
  k = 1.1,
  r = 0.3,
  center_scale = TRUE
)

Arguments

data

A multivariate time series in dataframe or matrix form.

method

An indicator of which model and fault detection method to use. Options include gruMEWMA, mrfMCUSUM, varMEWMA, or htsquare.

data_exog

Any exogenous variables to be considered in model training. Must be a dataframe or matrix with the same number of rows as data.

lags

The number of lags of each variable to be included in the design matrix.

k

A tuning parameter for the MCUSUM, large k results in shorter memory.

r

A tuning parameter for MEWMA, large r results in shorter memory.

center_scale

A logical, whether or not to center and scale data before modeling.

Value

A named list including the plotting statistic, trained model, residuals, and constants.


dpweix/mlmcusum documentation built on July 31, 2023, 10:13 a.m.