collective_anomalies-methods: Collective anomaly location, lags, and mean/variance changes.

Description Usage Arguments Value See Also

Description

Creates a data frame containing collective anomaly locations, lags and changes in mean and variance as detected by capa.uv, capa.mv, scapa.uv, scapa.mv, capa, pass, and sampler.

For an object produced by capa.uv or scapa.uv, collective_anomalies returns a data frame with columns containing the start and end position of the anomaly, the change in mean due to the anomaly. When type="meanvar", the change in variance due to the anomaly is also returned in an additional column.

For an object produced by capa.mv or scapa.mv, collective_anomalies returns a data frame with columns containing the start and end position of the anomaly, the variates affected by the anomaly, as well as their the start and end lags. When type="mean"/"robustmean" only the change in mean is reported. When type="meanvar" both the change in mean and change in variance are included. If merged=FALSE (the default), then all the collective anomalies are processed individually even if they are common across multiple variates. If merged=TRUE, then the collective anomalies are grouped together across all variates that they appear in.

For an object produced by capa, collective_anomalies returns the same results as scapa.uv when the data is univariate, or the same results as scapa.mv when the data is multivariate.

For an object produced by pass or sampler returns a data frame containing the start, end and strength of the collective anomalies.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## S4 method for signature 'bard.sampler.class'
collective_anomalies(object)

## S4 method for signature 'capa.class'
collective_anomalies(object, epoch = nrow(object@data), merged = FALSE)

## S4 method for signature 'capa.mv.class'
collective_anomalies(object)

## S4 method for signature 'capa.uv.class'
collective_anomalies(object)

## S4 method for signature 'pass.class'
collective_anomalies(object)

## S4 method for signature 'scapa.mv.class'
collective_anomalies(object, epoch = nrow(object@data))

## S4 method for signature 'scapa.uv.class'
collective_anomalies(object, epoch = nrow(object@data))

Arguments

object

An instance of an S4 class produced by capa, capa.uv and capa.mv.

epoch

Positive integer. CAPA methods are sequential and as such, can generate results up to, and including, any epoch within the data series. This can be controlled by the value of epoch and is useful for examining how the inferred anomalies are modified as the data series grows. The default value for epoch is the length of the data series.

merged

Boolean value. If merged=TRUE then collective anomalies that are common across multiple variates are merged together. This is useful when comparing the relative strength of multivariate collective anomalies. Default value is merged=FALSE. Note - merged=TRUE is currently only available when type="mean".

Value

A data frame.

See Also

capa,capa.uv,capa.mv.


anomaly documentation built on Jan. 21, 2021, 5:07 p.m.