Shiladitya Chatterjee asked . 2022-04-13

Neural network time series prediction with ANN Toolbox

Hello all,
I know this question has been asked several times but I would still want to know. I am a beginner in Matlab and I have been experimenting with ANN toolbox. I have managed to train a NARX neural network with a set of input and target values and now an advanced script is generated. My training input is a 200 day dataset of 5 days each that is it takes input of 5 days and predicts the 6th day.
 
My question is, how do I feed new inputs to this network to make predictions? That is, now, I wanna just take 5 previous including the current day and predict the value for tomorrow? How do I pass this 5 day input set and predict the target?
 

ann toolbox , time series predic... , narx , AI, Data Science, and Statistics , Deep Learning T

Expert Answer

Prashant Kumar answered . 2024-04-26 10:32:08

For NARNET and NARXNET to be useful, target input values used in the openloop (OL) design have to be replaced by feedback from the output. This is accomplished via the CLOSELOOP (CL) command.
 
Very often, however, the resulting CL configuration is either not as accurate or is completely useless.
 
UNFORTUNATELY THERE IS NOTHING IN THE help OR doc DOCUMENTATION ABOUT THIS.
 
I have been struggling to devise a successful technique for improving the accuracy of CL designs. If you search both the NEWSREADER and ANSWERS with
 
 
 greg closeloop
you will see my efforts to resolve this issue.
 
All I can recommend at this time is the following
 
1. Try to obtain the lowest error rate possible with as few delays and hidden nodes as possible using the OL configuration. The fewer weights you have to estimate, the higher your probability of success.
 
2. The default values ID = 1:2, FD = 1:2, H = 10 are very often inadequate. Nevertheless, since you may have to make tens or even hundreds of OL designs before obtaining a successful CL design, I suggest that you ALWAYS start with the defaults.
 
3.
 
a. Successful input delays tend to be subsets of the  significant delays 
obtained from the statistically significant peaks of the  crosscorrelation 
functions of paired inputs and outputs. 

   b. Successful feedback delays tend to be subsets of the significant 
delays obtained from the statistically significant peaks of the target 
autocorrelation function. 

   c. Success usually results from choosing a reasonably sized subset of the delays 
found in a and b.

4. For each trial combination of delays, you can use a double loop design search over number of hidden nodes (outerloop h = Hmin:dH:Hmax) and initial random weights (inner loop: i = 1:Ntrials).

For examples search the NEWSREADER and ANSWERS using the search words

 greg Ntrials narxnet
5. For unbiased future predictions the test data subset data must occur after the training and validation subsets. The natural datadivision option to use is DIVIDEBLOCK. However, other trn/val configurations using divideind can certainly be used.
 
6. After achieving success with at least one OL design, use the CLOSELOOP command to replace target inputs with output feedback.
 
7. Unfortunately, when the loop is closed, very often the predictions are not as accurate or even completely useless.
 
8. The only other remedies I have to offer are
 
 
   a. Try CL designs from all of the other successful OL designs
   b. Train the CL configuration(s) initialized with the weights of the OL configuration(s).
   c. Try designing CL designs from random initial weights.

Hope this helps.


Not satisfied with the answer ?? ASK NOW

Frequently Asked Questions

MATLAB offers tools for real-time AI applications, including Simulink for modeling and simulation. It can be used for developing algorithms and control systems for autonomous vehicles, robots, and other real-time AI systems.

MATLAB Online™ provides access to MATLAB® from your web browser. With MATLAB Online, your files are stored on MATLAB Drive™ and are available wherever you go. MATLAB Drive Connector synchronizes your files between your computers and MATLAB Online, providing offline access and eliminating the need to manually upload or download files. You can also run your files from the convenience of your smartphone or tablet by connecting to MathWorks® Cloud through the MATLAB Mobile™ app.

Yes, MATLAB provides tools and frameworks for deep learning, including the Deep Learning Toolbox. You can use MATLAB for tasks like building and training neural networks, image classification, and natural language processing.

MATLAB and Python are both popular choices for AI development. MATLAB is known for its ease of use in mathematical computations and its extensive toolbox for AI and machine learning. Python, on the other hand, has a vast ecosystem of libraries like TensorFlow and PyTorch. The choice depends on your preferences and project requirements.

You can find support, discussion forums, and a community of MATLAB users on the MATLAB website, Matlansolutions forums, and other AI-related online communities. Remember that MATLAB's capabilities in AI and machine learning continue to evolve, so staying updated with the latest features and resources is essential for effective AI development using MATLAB.

Without any hesitation the answer to this question is NO. The service we offer is 100% legal, legitimate and won't make you a cheater. Read and discover exactly what an essay writing service is and how when used correctly, is a valuable teaching aid and no more akin to cheating than a tutor's 'model essay' or the many published essay guides available from your local book shop. You should use the work as a reference and should not hand over the exact copy of it.

Matlabsolutions.com provides guaranteed satisfaction with a commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been empanelled after extensive research and quality check.

Matlabsolutions.com provides undivided attention to each Matlab assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work done at the best price in industry.