faultSwitch: Induce the Specified Fault on NOC Observations

Description Usage Arguments Details Value See Also Examples

View source: R/faultSwitch.R

Description

Infect the input data frame with a specific fault, then return the infected data frame.

Usage

1
2
faultSwitch(df, fault, period = 7 * 24 * 60, faultStartIndex = round(0.8433
  * period), shift = 2, postStateSplit = FALSE)

Arguments

df

A data frame returned by the processNOCdata() function.

fault

A character string. Options are "NOC", "A1", "B1", "C1", "A2", "B2", "C2", "A3", "B3", or "C3". See "details" of mspProcessData() for more information.

period

The observation cycle length. Defaults to one week's worth of minute-level observations (10,080 observations).

faultStartIndex

An integer specifying the index at which the faults will start. Defaults to roughly 85 percent through the cycle.

shift

The fault parameter for faults "A1" and "B1" corresponding to the positive shock value added to features. Defaults to 2. See "details" of mspProcessData() for more information.

postStateSplit

Should we induce faults before or after state-splitting? Defaults to FALSE. Make this argument TRUE for faults 1C, 2C, 3C.

Details

The faults return data frames as follows:

Value

A data frame with the same structure as df, but with faults induced across all observations. The mspProcessData() function then subsets the observations necessary to corrupt the normal data frame, and binds them together by row. This function is called by mspProcessData(). See ?mspProcessData for more details.

See Also

Called by: mspProcessData.

Examples

1
2
nrml <- processNOCdata()
faultSwitch(nrml, fault = "NOC")

mvMonitoring documentation built on Nov. 17, 2017, 6:31 a.m.