Sie sind auf Seite 1von 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.

Das könnte Ihnen auch gefallen