Questions about DeepSignal​AnomalyDet​ector examples

3 次查看(过去 30 天)
Hi All,
I am trying to develpo an anomaly detection solution using DeepSignalAnomalyDetector object.
Reading about the documentation example, I found something unclear which I hope someone in the community can shed a light on:
a) Using Convolutional Auto Encoder class of detector the example "Case 2: Detect Anomalous Points in Continuous Long Time Series" use large filters with windows length equal to 1 and a single scalar channel... My understanding is that it is using a convolutional autoencoder with a single scalar input sample and classifying it as normal or anomalous which is definitely weird. I guess there is something which I don't understand and specifically what is the meaning of "channel" and "WindowsLength"
b) In the next example, it use an lstm forecaster as a core detector. The text include this sentence: "The detector determines that an anomaly exists in a signal when any of its channels shows abnormal behavior". Does it imply that any channel is "treated" separately (i.e. with a different detector and using no information as input from other channels) ?
Is there someone who can help or point me to a clarifying example?
Thank You in advance
Sav

采纳的回答

Garmit Pant
Garmit Pant 2024-6-18
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);
net = getModel(DCONV3);
analyzeNetwork(net)
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:
  1. 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
  2. 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!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 AI for Signals 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by