Skip to main content
. 2024 Feb 26;24(5):1522. doi: 10.3390/s24051522
Algorithm 1: The training stage of the proposed method

Require: Original dataset MS; Number epochs N

Initialized embedding vector u, Gat Gat(·),Gru Gru(·), short time series forecasting SF(·), Encoder E(·), Decoder D(·), and fully connected layer fθ(·)

W←u

n←1

Repeat

   for each Si∈MS do:

      X←Gru(Gat(Si,W))

      S^K←SF(X)

      LossS=‖S^k−Sk‖2

      Xtoken←E(X)

      Xde=Concat(Xtoken,X0)

      S^j←D(Xde)

      LossL=‖S^j−Sj‖2

      S^i=fθ(Concat(S^k,S^j))

      Lossz=‖S^i−Si‖2

      Loss=λLosss+κLossL+τLossz

      u,Gat(·),Gru(·),E(·),D(·)←update weights using Loss

   end for

n←n+1

until  n=N