[LEADERG APP] LSTM

Area (Language):

大陆港澳 (简体中文)

台灣 (繁體中文)

 

 

[Introduction]

 

Use LSTM (Long Short-Term Memory) to analyze time series data.

 

 LEADERG APP-LSTM.png

 

 

 

[Interface functions and descriptions]

 

•    Dataset

 

The drop-down menu shows the datasets that can be analyzed.

 

 Selecting dataset.png

 

 

 

•    Open the folder location of the dataset

 

You can quickly edit and add datasets.

 

 Open data folder.png

 

 

 

•    Documentations and instructional videos

 

Open the official website to view the documentations and instructional videos.

 

 Docs and Videos.png

 

 

 

•    Program flow

 

Set the parameters of each process and execute in the order of the process.

 

 Program flow.png

 

 

 

[Operation steps and instructions]

 

1.    Select dataset

 

From the drop-down menu, select the dataset you want to analyze.

 

 Selecting dataset.png

 

 

 

 

 

Introduction to the datasets:

 

•    sales-forecast-airline

 

Airline passenger forecasting.

 

•    stock

 

Stock price prediction, input the opening, closing, high, low, and trading volume, and predict the closing price in five days.

 

 

 

Dataset preparation:

 

•    Training data set

 

File name: train_input.csv

 

File content:

 

The first column is the data index, or the time and date of the time series data. This column will be automatically ignored during analysis.

 

The first N columns are input, and the last column is output (prediction).

 

The following figure is an example of train_input.csv, 1 represents data index, 2 represents input, and 3 represents output.

 

 Data preparation.png

 

 

 

•    Testing dataset

 

File name: inference_input.csv

 

File content:

 

Same as the training dataset.

 

 

 

 

 

2.    In the program flow 1. Train, edit the training parameters and press Run to execute the training

 

Parameters setting:

 

•    Time Sequence

 

The length of the time series data (default is 12).

 

•    Learning Rate

 

Learning rate for training (default is 0.01).

 

•    Epochs

 

The number of iterations of training (default is 20000).

 

 

 

Results:

 

•    The comparison graph of the predicted value and the true value of the training dataset (train_input.csv).

 

 Predicted value and true value of the training data.png

 

 

 

•    The scatter plot of the predicted value and the true value of the training dataset (train_input.csv).

 

 Predicted value and true value scatter plot of the training data.png

 

 

 

•    Display the training loss (Loss) in the console.

 

 Training loss.png

 

 

 

•    Display the Root Mean Squared Error and R-squared of the trained model against the training dataset (train_input.csv) in the console

 

 Root Mean Squared Error and R-squared_training.png

 

 

 

•    Output predicted value (train_output.csv)

 

After opening the train_output.csv file, the last column is the predicted value of the training dataset (train_input.csv)

 

 Predected values on training data.png

 

 

 

3.    In the program flow 2. Inference, press Run to execute the inference

 

Parameters setting:

 

•    Time Sequence

 

The length of the time series data (default is 12).

 

This parameter must be the same as the length of the time series during training.

 

 

 

Results:

 

•    Comparison of the predicted and true values of the testing dataset (inference_input.csv)

 

 Predicted value and true value of the testing data.png

 

 

 

•    The scatter plot of the predicted and true values of the testing dataset (inference_input.csv)

 

 Predicted value and true value scatter plot of the testing data.png

 

 

 

•    Display the Root Mean Squared Error and R-squared of the trained model against the testing dataset (inference_input.csv) in the console

 

 Root Mean Squared Error and R-squared_testing.png

 

 

 

•    Output predicted value (inference_output.csv)

 

After opening the inference _output.csv file, the last column is the predicted value of the testing dataset (inference _input.csv).

 

 Predected values on testing data.png