Research Article

Stock Index Prices Prediction via Temporal Pattern Attention and Long-Short-Term Memory

Algorithm 1

TPA-LSTM framework.
Input initial , wherein (n = 8)
Output a mixed output of a linear part and a nonlinear part
Initialize best_val = 10000000
for to epoches do
if highway >0 do
  
if val_loss < best_val
  best_val = val_loss
  model save
else
  continue
end