features | R Documentation |
The function applies user-specified stopping criteria to extract change-points from object
generated by not
.
features(object, ...) ## Default S3 method: features(object, method = c("ic", "threshold"), penalty = c("sic", "aic", "user"), q.max = 25, penalty.fun, th, ...)
object |
An object of 'not' class returned by |
... |
Further arguments that can be passed to the penalty function. |
method |
A method of choosing the best solution in |
penalty |
Name of the penalty function to be used if |
q.max |
Maximum number of change-points allowed to be detected. Used only for |
penalty.fun |
Used only if |
th |
Used only if |
Denote by T_1, ..., T_N the elements on the solution path object$solution.path
,
each representing a set of change-points.
When (method="ic"
), the returned set of change-points is the one that minimises
-2 log-likelihood(object, cpt=T_k) + penalty(object\$n, n.param, ...),
over all k such that the number of change-points in T_k is smaller than or equal q.max
. The log-likelihood is computed using the logLik
routine,
while the penalty function is computed with sic.penalty
(penalty="sic"
), aic.penalty
(penalty="aic"
) or a user-defined penalty function (penalty="user"
).
th |
Value of the threshold used (if |
cpt |
Estimated locations of the change-points. |
ic |
Values of the information criterion minimised in order to find an optimal solution on the path (only if |
R. Baranowski, Y. Chen, and P. Fryzlewicz (2019). Narrowest-Over-Threshold Change-Point Detection. (http://stats.lse.ac.uk/fryzlewicz/not/not.pdf)
# **** Piecewisce-constant mean with Gaussian noise. x <- c(rep(0, 100), rep(1,100)) + rnorm(100) # *** identify potential locations of the change-points w <- not(x, contrast = "pcwsConstMean") # *** choose change-points using default settings fo <- features(w) # *** get the change-points fo$cpt # *** plot the SIC curve plot(fo$ic)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.