epyt_control.signal_processing.event_detection

epyt_control.signal_processing.event_detection.event_detector

Module provides a base class for event detectors.

class epyt_control.signal_processing.event_detection.event_detector.EventDetector(**kwds)[source]

Bases: ABC

Base class for event detectors.

abstract apply(scada_data: ScadaData) list[int][source]

Applies this detector to given SCADA data and returns suspicious time points.

Parameters:

scada_data (ScadaData) – SCADA data in which to look for events (i.e. anomalies).

Returns:

List of suspicious time points.

Return type:

list[int]

epyt_control.signal_processing.event_detection.sensor_interpolation_detector

Module provides a simple residual-based event detector that performs sensor interpolation.

class epyt_control.signal_processing.event_detection.sensor_interpolation_detector.SensorInterpolationDetector(regressor_type: Any = sklearn.linear_model.LinearRegression, **kwds)[source]

Bases: EventDetector

Class implementing a residual-based event detector based on sensor interpolation.

Parameters:

regressor_type (Any, optional) –

Regressor class that will be used for the sensor interpolation. Must implement the usual fit and predict functions.

The default is sklearn.linear_model.LinearRegression

apply(scada_data: ScadaData | ndarray) list[int][source]

Applies this detector to given SCADA data and returns suspicious time points.

Parameters:

scada_data – SCADA data in which to look for events/anomalies.

Returns:

List of suspicious time points.

Return type:

list[int]

fit(scada_data: ScadaData | ndarray) None[source]

Fit detector to given SCADA data – assuming the given data represents the normal operating state.

Parameters:

scada_data – SCADA data to fit this detector.

property regressor_type: Any

Gets the class used for building the regressors in the sensor interpolation.

Returns:

Regressor class.

Return type:

Any

property regressors: list[Any]

Gets the fitted sensor interpolation regressors.

Returns:

Fitted regressors.

Return type:

list[Any]