How do I predict the future using a limited past years data with Matlab NARX or LSTM

7 views (last 30 days)
Hi, I have pre-monsoon and post-monsoon Chloride data for 2014 and 2015 and I'd like to use them as input to predict future Cl values using the NARX time series. My question is can I use that data to predict the Cl for 2022 - 2024 using MatLab NARX or LSTM? The second question is I couldn't figure out where is the data for future predictions on ANN time series?

Answers (1)

Vidip
Vidip on 2 Nov 2023
I understand that you want to know whether you can use the available dataset to train a LSTM model in order to predict future values.
Yes, you can use your pre-monsoon and post-monsoon Chloride data for 2014 and 2015 as input to predict the Cl for 2022-2024 using MATLAB NARX or LSTM.
To do this, you will need to train the NARX or LSTM model on your historical data. Once the model is trained, you can use it to generate predictions for future time steps.
Here are the steps to create an LSTM regression neural network in MATLAB:
  • Use a sequence input layer with an input size that matches the number of channels of the input data.
  • Use an LSTM layer with 128 hidden units. The number of hidden units determines how much information is learned by the layer. Using more hidden units can yield more accurate results but can be more likely to lead to overfitting to the training data.
  • To output sequences with the same number of channels as the input data, include a fully connected layer with an output size that matches the number of channels of the input data.
  • Finally, include a regression layer.
To answer your second question, the data for future predictions on ANN time series is not explicitly stored in MATLAB. Instead, the future predictions are generated by the network using the weights and biases that were learned during training.
For further information, refer to the documentation links below:

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!