Description Usage Arguments Value References Examples

An offline as-if-online implementation of SCAPA (Sequential Collective And Point Anomalies) by Bardwell et al. (2019) for online collective and point anomaly detection. This version of `capa.uv`

has a default value
`transform=tierney`

which uses sequential estimates for transforming the data prior to analysis. It also returns an S4 class which allows the results to be postprocessed
at different time points as if the data had been analysed in an online fashion up to that point.

1 2 3 4 5 6 7 8 9 |

`x` |
A numeric vector containing the data which is to be inspected. The time series data classes ts, xts, and zoo are also supported. |

`beta` |
A numeric vector of length 1 or |

`beta_tilde` |
A numeric constant indicating the penalty for adding an additional point anomaly. It defaults to 3log(n), where n is the number of observations. |

`type` |
A string indicating which type of deviations from the baseline are considered. Can be "meanvar" for collective anomalies characterised by joint changes in mean and variance (the default), "mean" for collective anomalies characterised by changes in mean only, or "robustmean" for collective anomalies characterised by changes in mean only which can be polluted by outliers. |

`min_seg_len` |
An integer indicating the minimum length of epidemic changes. It must be at least 2 and defaults to 10. |

`max_seg_len` |
An integer indicating the maximum length of epidemic changes. It must be at least the min_seg_len and defaults to Inf. |

`transform` |
A function used to transform the data prior to analysis by |

An S4 class of type scapa.uv.class.

2018arXiv180601947Fanomaly

\insertRefalex2020realanomaly

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ```
library(anomaly)
# Simulated data example
# Generate data typically following a normal distribution with mean 0 and variance 1.
# Then introduce 3 anomaly windows and 4 point outliers.
set.seed(2018)
x = rnorm(5000)
x[1601:1700] = rnorm(100,0,0.01)
x[3201:3300] = rnorm(100,0,10)
x[4501:4550] = rnorm(50,10,1)
x[c(1000,2000,3000,4000)] = rnorm(4,0,100)
# use magrittr to pipe the data to the transform
library(magrittr)
trans<-.%>%tierney(1000)
res<-scapa.uv(x,transform=trans)
# Plot results at two different times and note that anomalies are re-evaluated:
plot(res,epoch=3201)
plot(res,epoch=3205)
``` |

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.