d-ailin / GDN

Implementation code for the paper "Graph Neural Network-Based Anomaly Detection in Multivariate Time Series" (AAAI 2021)
MIT License
467 stars 140 forks source link

current time tick? #89

Closed FortunateStarstar86 closed 6 months ago

FortunateStarstar86 commented 6 months ago

Hello! how can I adjust the code to make it a multi-step prediction? or is it possible? I look forward to hearing from you. Thank you very much!

FortunateStarstar86 commented 6 months ago

For example, in order to predict the future 10 time steps, I adjusted the training set as shown in the figure, but the "out" output by the model from GDN. py cannot match multiple time steps and the dimensions are inconsistent. How should I modify the model or adjust parameters?(I have adjusted the slide_win and slide_stride accordingly) 68803657966f40a20651b43aa79aae2

d-ailin commented 6 months ago

Hi, I think it is possible, not but sure how accurate it would be.

One way to do it is to modify the output dimension to 10 instead of 1 (which is for predicting next 10 steps instead of next 1 step). This requires modifying the model output dimension to 10 and changing the ground truth to a vector of 10 dimensions as well, such that the MSE loss should be operated on a vector of 10 dimensions during training.

The alternative way is still using the current architecture, but you manipulate the input iteratively by appending the predicted value at T time step, and use the new input to predict the values at T+1.