Hello Saverio De Vito
From the given description, I understand that you are trying to develop an anomaly detector using the “deepSignalAnomalyDetector” object and you are referencing to the MATLAB example “Detect Anomalies in Signals Using deepSignalAnomalyDetector.”
To address you first query regarding “Case 2: Detect Anomalous Points in Continuous Long Time Series” :
In the given context, ‘channel’ and ‘WindowLength’ can be described as follows:
- ‘channel’ - A channel in signal processing and deep learning refers to a distinct stream of data or feature within a dataset that is processed or analyzed separately.
- ‘WindowLength’ – This is the length of each segment that the input signal is divided into.
In the example discussed:
- The example mentions the use of a larger than default network and not large filters.
- The example modifies the default network size by increasing the ‘NumDownsampleLayers’ from the default value of 2 to 4.
- This adjustment allows the network to handle more complex input data by adding more convolutional layers in the downsampling section.
- The window length is set to 1, enabling the detection of anomalies over each individual sample of the signal.
- The goal is to categorize the data at every timestep, assessing each sample independently for anomalies.
- Since the input data contains a single signal containing ECG recordings at each time step, the data is univariate and the detector only needs 1 channel for the input.
Regarding your second query about “Case 3: Detect Anomalous Regions in Multichannel Signals”:
For multichannel signals, the anomaly detector does not assign a separate detector for every channel. This can be verified by running the following code snippet and checking the network architecture of the underlying network:
DCONV3 = deepSignalAnomalyDetector(3,'lstmforecaster',WindowLen = 5);
The output of the above code snippet can be referred below:
The function “plotAnomalies” detects anomalies in all the channels. If an anomaly is detected in one channel for a particular sequence, that sequence is marked as anomalous in all the channels even though an anomaly would not be present in that sequence in other channels. This is the expected behavior of the function.
For further understanding, I suggest you refer to the following MathWorks Documentation and resources:
- Refer to the “Input Arguments” and “Name-Value Arguments” sections to understand further about various parameters of ‘deepSignalAnomalyDetector’: https://www.mathworks.com/help/signal/ref/deepsignalanomalydetector.html
- Refer to the given example to check the visualisation of anomaly detected in one signal but being flagged in all signals: https://www.mathworks.com/help/signal/ref/deepsignalanomalydetectorcnn.plotanomalies.html
Hope you find the above explanation and suggestions useful!