ufzLogo rdmLogo

Test Functions#

Basic Anomalies#

flagMissing

Deprecated since version 2.7.0.

flagIsolated

Find and flag temporally isolated groups of data.

flagJumps

Flag jumps and drops in data.

flagRaise

The function flags raises and drops in value courses, that exceed a certain threshold within a certain timespan.

flagConstants

Flag constant data values.

flagByVariance

Flag low-variance data.

flagPlateau

Flag anomalous value plateaus.

Change Points and Noise#

flagChangePoints

Flag values that represent a system state transition.

assignChangePointCluster

Label data where it changes significantly.

flagByScatterLowpass

Flag anomalous data chunks based on scatter statistics.

Gap filling#

interpolateByRolling

Replace NaN by the aggregation result of the surrounding window.

Multivariate Analysis#

Multivariate outlier detection.

flagLOF

Flag values where the Local Outlier Factor (LOF) exceeds cutoff.

flagZScore

Uses standard score cutoffs to detect outliers.

Sampling Alignment#

align

Convert a time series to a specified frequency, interpolating values according to the chosen method.

concatFlags

Project flags/history of field to target and adjust to the frequeny grid of target by 'undoing' former interpolation, shifting or resampling operations

resample

Resample data points and flags to a regular frequency.

reindex

Change a variables index.

Data Products#

assignKNNScore

Score datapoints by an aggregation of the distances to their k nearest neighbors.

assignLOF

Assign Local Outlier Factor (LOF).

assignUniLOF

Assign "univariate" Local Outlier Factor (LOF) or "inivariate" Local Outlier Probability (LOP)

assignZScore

Calculate (rolling) Zscores.

calculatePolynomialResiduals

Fits a polynomial model to the data and calculate the residuals.

calculateRollingResiduals

Calculate the diff of a rolling-window function and the data.

fitPolynomial

Fit a polynomial model to the data.

fitLowpassFilter

Fits the data using the butterworth filter.

Drift detection and correction#

flagDriftFromNorm

Flags data that deviates from an avarage data course.

flagDriftFromReference

Flags data that deviates from a reference course.

correctDrift

The function corrects drifting behavior.

correctRegimeAnomaly

Function fits the passed model to the different regimes in data[field] and tries to correct those values, that have assigned a negative label by data[cluster_field].

correctOffset

type field:

str

flagRegimeAnomaly

Flags anomalous regimes regarding to modelling regimes of field.

assignRegimeAnomaly

A function to detect values belonging to an anomalous regime regarding modelling regimes of field.

Flagtools#

forceFlags(field[, flag])

Set whole column to a flag value.

clearFlags(field, **kwargs)

Assign the flag UNFLAGGED to all timestamps.

flagUnflagged(field[, flag])

Assign a flag to all timestamps.

flagManual(field, mdata[, method, mformat, ...])

Include flags listed in external data.

flagDummy(field, **kwargs)

Function does nothing but returning data and flags.

transferFlags(field[, target, squeeze, ...])

Transfer flags from one field to another.

andGroup(field[, group, target, flag])

Logical AND operation for Flags.

orGroup(field[, group, target, flag])

Logical OR operation for Flags.

Generic Functions#

processGeneric

Generate/process data with user defined functions.

flagGeneric

Flag data based on a given function.

andGroup

Logical AND operation for Flags.

orGroup

Logical OR operation for Flags.

Outlier Detection#

Univariate Outlier Detection

flagUniLOF

Flag anomalous values using the Univariate Local Outlier Factor (UniLOF) method.

flagByStray

Flag outliers in 1-dimensional (score) data using the STRAY Algorithm.

flagMAD

Flag outliers using the modified Z-score outlier detection method.

flagOffset

Flag offsetting value courses.

flagRange

Flag values outside the closed interval [min, max].

flagLOF

Flag values where the Local Outlier Factor (LOF) exceeds cutoff.

flagZScore

Uses standard score cutoffs to detect outliers.

flagPlateau

Flag anomalous value plateaus.

Tools#

copyField

Make a copy of the data and flags to a new field.

dropField

Drops field from the data and flags.

renameField

Rename field to the given name.

selectTime

Realizes masking within saqc.

plot

Plot data and flags or store plot to file.