Description Usage Arguments Details Value References See Also Examples

Constructor for the ChangepointDetector S3 class

1 2 3 4 |

`dim` |
Data dimension, all new data must be of this dimension |

`method` |
Four methods are implemented: |

`thresh` |
A numeric vector or the character string 'MC'. If 'MC' is
specified then the correct threshold will be computed by Monte Carlo
simulation (the |

`patience` |
Required patience (average run length without change) of the online changepoint procedure. This is optional if the thresholds for detection are manually specified, but is required if Monte Carlo thresholds are used. |

`MC_reps` |
Number of Monte Carlo repetitions to use to estimate the
thresholds. Only used when |

`beta` |
lower bound on the l_2 norm of the vector of mean change to be
detected. This argument is used by the |

`sparsity` |
Parameter used by the |

`b` |
Lower bound on the per-coordinate magnitude of mean change be
detected. This argument is used by the 'Mei' method. If |

`p0` |
A real number between 0 and 1. Sparsity parameter used by |

`w` |
Window size parameter used by |

`lambda` |
A tuning parameter used by the |

This function is a wrapper. The `new_OCD`

,
`new_Mei`

, `new_XS`

and `new_Chan`

carry
out the actual constructor implementation.

An object of S3 class 'ChangepointDetector'. Depending on the
`method`

argument specified, the object also belongs to a subclass
'OCD', 'Mei', 'XS' or 'Chan' corresponding to `method='ocd'`

. It
contains the following attributes:

class - S3 class and subclass

data_dim - data dimension

method - method used for changepoint detection

param - a list of parameters used in the specific method:

`beta`

and`sparsity`

for method`ocd`

;`b`

for method`Mei`

;`p0`

and`w`

for method`XS`

;`p0`

,`w`

and`lambda`

for method`Chan`

.threshold - a named vector of thresholds used for detection (see the

`thresh`

argument)n_obs - number of observations, initialised to 0

baseline_mean - vector of pre-change mean, initialised to a vector of 0, can be estimated by setting the changepoint detector into baseline mean and standard deviation estimating status, see

`setStatus`

, or set directly using`setBaselineMean`

.baseline_sd - vector of standard deviation, initialised to a vector of 1, can be estimated by setting the changepoint detector into baseline mean and standard deviation estimating status, see

`setStatus`

, or set directly using`setBaselineSD`

.tracked - a list of information tracked online by the changepoint detector: matrices

`A`

and`tail`

for method`ocd`

; vector`R`

for method`Mei`

; matrices`X_recent`

and`CUSUM`

for methods`XS`

and`Chan`

.statistics - a named vector of test statistics for changepoint detection: statistics with names

`diag`

,`off_d`

and`off_s`

for method`ocd`

(note if`sparsity`

is`'dense'`

or`'sparse'`

, then only (S^diag, S^off,d) and (S^diag, S^off,s) are included in`stat`

respectively.); statistics with names`max`

and`sum`

for method`Mei`

; a single numeric value for methods`XS`

and`Chan`

.status - one of the following: 'estimating' (the detector is estimating the baseline mean and standard deviation with new data points), 'monitoring' (the detector is detecting changes from the baseline mean from new data points) and an integer recording the time of declaration of changepoint.

Chen, Y., Wang, T. and Samworth, R. J. (2020) High-dimensional multiscale online changepoint detection

*Preprint*. arxiv:2003.03668.Mei, Y. (2010) Efficient scalable schemes for monitoring a large number of data streams.

*Biometrika*,**97**, 419–433.Xie, Y. and Siegmund, D. (2013) Sequential multi-sensor change-point detection.

*Ann. Statist.*,**41**, 670–692.Chan, H. P. (2017) Optimal sequential detection in multi-stream data.

*Ann. Statist.*,**45**, 2736–2763.

accessor functions such as `data_dim`

, the main function
for processing a new data point `getData`

, other methods for the
ChangepointDetector class including `reset`

,
`setBaselineMean`

, `setBaselineSD`

,
`setStatus`

, `normalisedStatistics`

and
`checkChange`

.

1 2 3 4 5 6 | ```
detector_ocd <- ChangepointDetector(dim=100, method='ocd',
thresh=c(11.6, 179.5, 54.9), beta=1)
detector_Mei <- ChangepointDetector(dim=100, method='Mei',
thresh=c(8.6, 125.1), b=0.1)
detector_XS <- ChangepointDetector(dim=100, method='XS', thresh=55.1)
detector_Chan <- ChangepointDetector(dim=100, method='Chan', thresh=8.7)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.