• Stars
    star
    139
  • Rank 261,480 (Top 6 %)
  • Language
    Python
  • Created over 6 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

By PyTorch

DA-LSTM

This is an implementation of paper "A Dual-Stage Attention-Based Recurrent Neural Network for Time Series Prediction". I only did a test to predict the price of AAPL.US by its historical data as well as the price of its opponent MSFT.US.

Dataset

Downloaded from NASDAQ 100 STOCK DATA.

Argument

-e, --epoch - the number of epochs

-b, --batch - the batch size

-s, --split - the split ratio of train and test set

-i, --interval - save models every interval epochs

-l, --lrate - learning rate of optimizor

-t, โ€”test - test phase

-m, โ€”model - if in test phase, the models name(if model name is "encoder50" and decoder50", inptut 50)

Sample train

Traing 500 epochs, with batch-size 128, save models every 100 epochs.

Python3 trainer -e 500 -b 128 -i 100

Sample test

Test data use model "encoder50" and "decoder50"

Python3 trainer -t -m 50