Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/detect_outliers.R
anomaly
is a function for detecting unusual (i.e., anomalous, abnormal, outlier) time-series in a set of time-series.
1 2 |
x |
A feature matrix returned by 'tsmeasures' function |
n |
Number of unusual time-series to return |
method |
Bivariate outlier detection method used for detecting high density regions of the first two principal components extracted from the time-series |
robust |
If |
ordered |
If |
plot |
If |
labels |
If |
col |
A vector of length 2 giving the colours for the first and second set of points respectively (and the corresponding axes). If a single colour is specified it will be used for both sets. If missing the default colour is used. |
When method = "hdr", the outliers are those with the lowest density in the 2-dimensional PC space using a bivariate kernel density estimator. In this case, the outliers are always in order of increasing density.
When method = "ahull", the outliers are the first n
scores in the 2-dimensional PC space which break away as singletons when alpha-convex hulls are used with decreasing alpha. They are not ordered by default. If ordered=TRUE
, then the outliers are ordered based on when they first break away from the remaining points. This is much slower, especially for large n
, and so it is turned off by default.
A vector showing the row index of the n
most unusual time-series and
a matrix of principal component scores. Returned invisibly if plot=TRUE
.
Rob J Hyndman, Earo Wang, Nikolay Laptev
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.