Skip to main content
. 2022 Dec 3;24(12):1770. doi: 10.3390/e24121770
Algorithm 1 AdaBoost-LSTM
  • Input: 

    The labeled target time series sequence, T, of size nT=(x1,x2,,xn), the maximum number of iterations, N and a base learning algorithm, Learner LSTM. Set the initial weight vector: Wjt=11nn.

  • Output: 

    Strong learner yf(x) is equal to the LSTMt prediction result yt(x) and its corresponding βt generated by weight collection.

  •  1:

    Call learner LSTMt with the training set, T, according to the distribution, Wjt, to train and give the hypothesis, yt:xR.

  •  2:
    Calculate the adjusted error for every sample:
    Dt=maxj=1n|yjLSTMk(xj)|
    ejt=yjLSTMNxj2Dt2
  •  3:
    Calculate the adjusted error of the LSTMt model:
    εt=j=1nejtwjt

    if εt0.5, stop and set N=t1.

  •  4:

    Let βt=εt/(1εt). Update the weight vector: wjt+1=wjtβt1ejt/Zt.

    (Zt is a normalizing constant.)

  •  5:

    Loop step 1 to 4. Reserve all models: LSTM1,LSTMt,LSTMN.