Generate a sequence of latent states and corresponding multivariate Gaussian observations for process monitoring. The process has three possible states:
state 1: in-control (IC),
state 2: out-of-control (OC),
state 3: out-of-control (OC).
simulate_stream(
d = 10,
TT = 500,
T0 = 100,
T_min_IC = 60,
T_max_IC = 85,
T_OC = 5,
mean = NULL,
covariance = NULL
)A list with elements:
Integer vector of latent states of length T0 + TT.
Matrix of simulated multivariate observations with T0 + TT
rows and d columns.
Integer. Number of variables (dimension of the multivariate observations). Default is 10.
Integer. Length of the sequence after the initial IC portion. Default is 500.
Integer. Length of the initial IC sequence known to belong to state 1. Default is 100.
Integers. Minimum and maximum length of consecutive IC observations before switching to an OC state.
Integer. Fixed length of each OC state sequence.
List of three numeric vectors of length d, representing
the mean vectors of states 1 (IC), 2 (OC), and 3 (OC). If NULL
(default), simple default values are used.
List of three d x d covariance matrices, one for each
state. If NULL (default), pre-defined (equal) covariance matrices are used.
The first T0 observations are fixed in state 1 (IC). Then, in the
following TT observations, only state 2 appears in the first half, and
only state 3 appears in the second half. Within each half, runs of state 1
(IC) of random length between T_min_IC and T_max_IC alternate
with fixed-length runs of the corresponding OC state of length T_OC.
library(ActiveLearning4SPM)
sim <- simulate_stream()
table(sim$x)
Run the code above in your browser using DataLab