features {not} | R Documentation |
Extract locations of features from a 'not' object
Description
The function applies user-specified stopping criteria to extract change-points from object
generated by not
.
Usage
features(object, ...)
## Default S3 method:
features(object, method = c("ic", "threshold"),
penalty = c("sic", "aic", "user"), q.max = 25, penalty.fun, th, ...)
Arguments
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 |
Details
Denote by T_{1}, \ldots, 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\mbox{log-likelihood}(\code{object}, \code{cpt}=T_k)+\mbox{penalty}(\code{object\$n}, \code{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"
).
Value
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 |
References
R. Baranowski, Y. Chen, and P. Fryzlewicz (2019). Narrowest-Over-Threshold Change-Point Detection. (http://stats.lse.ac.uk/fryzlewicz/not/not.pdf)
Examples
# **** 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)