sol.not {breakfast}R Documentation

Solution path generation via the Narrowest-Over-Threshold method

Description

This function arranges all possible features (e.g. change in the mean, change in the slope, etc) of the input vector in the order of importance, via the Narrowest-Over-Threshold (NOT) method.

Usage

sol.not(x, type = "const", M = 10000, systematic.intervals = TRUE, seed = NULL)

Arguments

x

A numeric vector containing the data to be processed

type

The model type considered. type = "const" means the signals are the piecewise constant, type = "lin.cont" means the signals are the piecewise linear and continuous, and type = "lin.discont" means the signals are the piecewise linear but not necessarily continuous. If not given, the default is type = "const"

M

The maximum number of all data sub-samples at the beginning of the algorithm. The default is M = 10000

systematic.intervals

When drawing the sub-intervals, whether to use a systematic (and fixed) or random scheme. The default is systematic.intervals = TRUE

seed

If a random scheme is used, a random seed can be provided so that every time the same sets of random sub-intervals would be drawn. The default is seed = NULL, which means that this option is not taken

Details

The Narrowest-Over-Threshold method and its algorithm is described in "Narrowest-over-threshold detection of multiple change points and change-point-like features", R. Baranowski, Y. Chen and P. Fryzlewicz (2019), Journal of Royal Statistical Society: Series B, 81(3), 649–672.

Value

An S3 object of class cptpath, which contains the following fields:

solutions.nested

FALSE, i.e., the change-point outputs are not nested

solution.path

Empty list

solution.set

Locations of possible change-points in the mean of x for each threshold level (in the decreasing order), arranged in the form of a list of lists

solution.set.th

A list that contains threshold levels corresponding to the detections in solution.set

x

Input vector x

type

The model type used, which is given in the input. If not given, the default is type="const"

M

Input parameter M

cands

Matrix of dimensions length(x) - 1 by 4. The first two columns are (start, end)-points of the detection intervals of the corresponding possible change-point location in the third column resulted from applying NOT to all threshold levels. The fourth column is a measure of strength of the corresponding possible change-point. The order of the rows reflect the strength of each detection in decreasing order. To avoid repetition, each possible location would appear at most once in the matrix (with the sub-interval that carries its highest possible strength)

method

The method used, which has value "not" here

References

R. Baranowski, Y. Chen & P. Fryzlewicz (2019). Narrowest-over-threshold detection of multiple change points and change-point-like features. Journal of the Royal Statistical Society: Series B, 81(3), 649–672.

See Also

sol.idetect, sol.idetect_seq, sol.tguh, sol.wbs, sol.wbs2

Examples

r3 <- rnorm(1000) + c(rep(0,300), rep(2,200), rep(-4,300), rep(0,200))
sol.not(r3)

[Package breakfast version 2.4 Index]