morpheus.stages.postprocess.timeseries_stage#

Functions

calc_bin(obj, time0, resolution_sec)

Calculates the bin spacing between the start and stop timestamp at a specified resolution.

fftAD(signalvalues[, percentile, zthresh, ...])

Detect anomalies with fast fourier transform.

round_seconds(obj)

Returns the given timestamp with rounded seconds.

to_periodogram(signal_cp)

Returns periodogram of signal for finding frequencies that have high energy.

zscore(data)

Calculate z score of cupy.ndarray.

Classes

TimeSeriesStage(c[, resolution, min_window, ...])

Perform time series anomaly detection and add prediction.

calc_bin(obj, time0, resolution_sec)[source]#

Calculates the bin spacing between the start and stop timestamp at a specified resolution.

fftAD(signalvalues, percentile=90, zthresh=8, lowpass=None)[source]#

Detect anomalies with fast fourier transform.

Parameters:
signalvaluescupy.ndarray

Values of time signal (real valued).

percentileint, optional

Filtering percentile for spectral density based filtering, by default 90.

zthreshint, optional

Z-score threshold, can be tuned for datasets and sensitivity, by default 8.

lowpass_type_, optional

Filtering percentile for frequency based filtering, by default None.

Returns:
cupy.ndarray

Binary vector whether each point is anomalous.

round_seconds(obj)[source]#

Returns the given timestamp with rounded seconds.

Parameters:
objpd.Timestamp

Timestamp obj.

Returns:
pd.Timestamp

Timestamp with rounded seconds.

to_periodogram(signal_cp)[source]#

Returns periodogram of signal for finding frequencies that have high energy.

Parameters:
signal_cpcupy.ndarray

Signal (time domain).

Returns:
cupy.ndarray

CuPy array representing periodogram.

zscore(data)[source]#

Calculate z score of cupy.ndarray.