detect_ts_zscore_outliers: Detect Z-score outliers in time series.

View source: R/preparation.R

detect_ts_zscore_outliersR Documentation

Detect Z-score outliers in time series.

Description

Detect elements of the time series out of a Z-score threshold, applied on the whole timeseries or a rolling window of predefined width.

Usage

detect_ts_zscore_outliers(
  data,
  zScoreThreshold,
  window = NULL,
  zScoreExtremesSensitive = TRUE,
  na.rm = T
)

Arguments

data

<data.frame> describing the input time series whose outliers need to be detected. Time column: 'time', value column: 'value'.

zScoreThreshold

<float> describing the threshold of the Z-score calculation.

window

<string> in ISO 8601 format representing the window (e.g. "P7D","P1D", "PT168H" ,...). This is an optional argument setting the width of the rolling window where the Z-normalization calculation is considered. This argument allows to adapt the outlier filtering depending the dynamics of the signal itself. Default value is "NULL", thus no rolling window is considered.

zScoreExtremesSensitive

<boolean> defining if the aggregation function of the Zscore is the mean (true), or median(false). The first one makes the Z-score sensitive to extreme values, and the second no. Default is true.

na.rm

<boolean> describing if NAN values should be removed in mean, median and sd functions

Value

<data.frame> with boolean values representing whether a item is an outlier, or not.


biggproject/biggr documentation built on Oct. 2, 2024, 11:13 p.m.