0% found this document useful (0 votes)
2K views

NFTOOL

This document provides instructions for training a sin wave using MATLAB's Neural Network Toolbox fitting tool: 1. Generate input and output data and load it into the nftool. 2. Select the data from the workspace and proceed to set validation and test data to 15% of the original data. 3. Train the network with 5 hidden neurons for up to 1000 iterations until the network outputs match the targets for the training, validation, and test data sets. 4. Save the trained network for future use by calling the 'sim' function on new input data.

Uploaded by

thomagt
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

NFTOOL

This document provides instructions for training a sin wave using MATLAB's Neural Network Toolbox fitting tool: 1. Generate input and output data and load it into the nftool. 2. Select the data from the workspace and proceed to set validation and test data to 15% of the original data. 3. Train the network with 5 hidden neurons for up to 1000 iterations until the network outputs match the targets for the training, validation, and test data sets. 4. Save the trained network for future use by calling the 'sim' function on new input data.

Uploaded by

thomagt
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

TRAINING OF SIN WAVE USING ANN FITTING TOOLBOX

To define a fitting problem for the toolbox, arrange a set of Q input vectors
as columns in a matrix. Then, arrange another set of Q target vectors (the correct
output vectors for each of the input vectors) into a second matrix.

1. In Command Window generate inputs and outputs

2. Open the Neural Network Toolbox Fitting Tool with this command: nftool
3. Click Next to proceed. Get data from Workspace ('t' for input and 'y' for
output).
4. Click Next to display the Validate and Test Data window, shown in the
following figure. The validation and test data sets are each set to 15% of the
original data.
5. Click Next.
The number of hidden neurons is set to 5.
6. Click Next.
7. Click Train.
This time the training continued for the maximum of 1000 iterations.
8. View the network response. Click Plot Fit

The blue symbols represent training data, the green symbols represent validation
data, and the red symbols represent testing data. For this problem and this
network, the network outputs match the targets for all three data sets.

9. Click Next

10. Click Next


11. Use the buttons on this screen to save your results.

12. You have the network saved as net in the workspace. You can perform
additional tests on it or put it to work on new inputs, using the sim function.

13. When you have saved your results, click Finish.

14.For obtaining output from trained network, type


'sim(net,input)' in command window.

You might also like