Research Article
Research on DUAL-ADGAN Model for Anomaly Detection Method in Time-Series Data
Algorithm 2
DUAL-ADGAN anomaly detection network model pseudo-code
| (1) | Function Anomaly detection ; | | | Input: Time-series data sliced by sliding window x, Noise vector z, trained P models | | | Output: Anomalous data | | (2) | For i = 1, …, n do | | (3) | For k = 1, …, k do | | (4) | Feed the noise vector z into the generator to generate the data | | (5) | Calculate , update | | (6) | Calculate | | (7) | Calculate | | (8) | | | (9) | Calculate dynamic threshold | | (10) | If : | | (11) | Return | | (12) | end |
|