ufzLogo rdmLogo

Test Functions#

Basic Anomalies#

flagMissing

Flag NaNs in data.

flagIsolated

Find and flag temporal 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.

Change Points and Noise#

flagChangePoints

Flag values that represent a system state transition.

assignChangePointCluster

Label data where it changes significantly.

flagByScatterLowpass

Flag data chunks of length window dependent on the data deviation.

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

Flag data where its (rolling) Zscore exceeds a threshold.

Sampling Alignment#

align

Convert time series to specified frequency.

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).

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

Fits 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 UNFLAGGED value to all periods in field.

flagUnflagged(field[, flag])

Function sets a flag at all unflagged positions.

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 of one variable 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 "univariate" Local Outlier Factor (LOF) exceeding cutoff.

flagByStray

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

flagMAD

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

flagOffset

A basic outlier test that works on regularly and irregularly sampled data.

flagRange

Function flags values exceeding the closed interval [min, max].

flagLOF

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

flagZScore

Flag data where its (rolling) Zscore exceeds a threshold.

Tools#

copyField

Make a copy of the data and flags of field.

dropField

Drops field from the data and flags.

renameField

Rename field in data and flags.

selectTime

Realizes masking within saqc.

plot

Plot data and flags or store plot to file.