How to Predict Timeseries data using Neural Network in Matlab

10 views (last 30 days)
Muhammad Usman Saleem on 28 May 2022
I've timeseries (past 31 years ) dataset of 41 independent variables. I want to predict my three dependent variables (These depends on rest 41 variables) using Neural Network in Matlab. I want to trained my ANN model using 80% timeseries dataset and 20% dataset for testing model. Then I want to predict (or forecaste) for two years (NAN values in excel file) my 3 dependent variables using my best trained model. I google about the problem, but not able to understand provided codes as mostly practice on images not excel dataset. How can I do that In Matlab?
I've attached my sample dataset which describe my problem well in excel with this question. A timely reply will be highly appriciated.

Muhammad Usman Saleem on 28 May 2022
Edited: Muhammad Usman Saleem on 18 Feb 2023
Problems in the above code:
(1) I want to predict my first three columns which depends on 41 rest of colums? I want to predicted them one by one actual vs predicted in plots. I not sure whether the above code is doing the same or not??
(2) Just after the training in above code, why this mean, stdv has been caculate for all training data and testing data? Training and testing dataset consist on my 41 independent variables. Each variable has different sense that why mean or stdv looking not sense to this code? Is mean and stdv for single variable will be suitable in ANN? (according to understanding)?
(3) This is my step by step working: I want to make 90% training and 10% testing, then want to train the ANN. Then validate and select best neural network. Then want to predict 2 last values of first 3 columns in data.csv file from optimum ANN?
(4) At the end, I want to make sure from experts over this plate form which verify my code whether its doing the following tasks correctly or not ??
(5) Is after training the dataset for 45 variables, I can predict 1 variables out of 3? then variable no 2 and 3 ? Is the results get from the train model will be reliable for predicting individual variable? It's much confusing to me? Please clerify ? Please
I'll be very thankful to experts for timely response?
2 CommentsShow 1 older commentHide 1 older comment
Muhammad Usman Saleem on 25 Jun 2022
Edited: Muhammad Usman Saleem on 25 Jun 2022
Many thanks for your detail explaination to my problem. I am confuse with this why my number of channels will be 7? I've 41 variables but this line Each sequence is of length 6 with time steps corresponding to each month used, and each time step is a vector of length 7, where 7 is the number of variables for each month. In the above example, numChannels = 7
Dear Sir, I've 41 variables, why my numchannels are 7? its confusing me?
Will you please correct my code according to my problem? If I use wrong code, then error will be multiple in my research?
Many thanks for your kind support..

Categories

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

R2019a

Community Treasure Hunt

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

Start Hunting!