Download presentation
Presentation is loading. Please wait.
1
Neural Networks Toolbox
Analysis and Design
2
Matlab Neural Networks Toolbox
The neural network toolbox makes it easier to use neural networks in matlab. The toolbox consists of a set of functions and structures that handle neural networks: activation functions training algorithms, etc. The Neural Network Toolbox is contained in a directory called nnet. Type help nnet for a listing of help topics.
3
The Structure of the Neural Network Toolbox (I)
The toolbox is based on the network object. This object contains information about everything that concern the neural network: the number of its layers the structure of its layers the connectivity between the layers, etc. Matlab provides high-level network creation functions, like: newlin (create a linear layer) newp (create a perceptron) newff (create a feed-forward backpropagation network)
4
The Structure of the Neural Network Toolbox (II - Example)
NEWFF Create a feed-forward backpropagation network. >>P = [ ]; (INPUTS) >>T = [ ]; (TARGETS) Here a two-layer feed-forward network is created. The network's input ranges from [0 to 10]. The first layer has five TANSIG neurons, the second layer has one PURELIN neuron. The TRAINLM network training function is to be used. >>net = newff(minmax(P),[5 1],{'tansig' 'purelin'});
5
The Structure of the Neural Network Toolbox (II – Example Cont.)
Here the network is simulated and its output plotted against the targets. >>Y = sim(net,P); >>plot(P,T,P,Y,'o') Here the network is trained for 50 epochs. Again the network's output is plotted. >>net.trainParam.epochs = 50; >>net = train(net,P,T);
6
The Structure of the Neural Network Toolbox (III)
Type: >>net First the architecture parameters and the subobject structures subobject structures: inputs: {1x1 cell} of inputs layers: {1x1 cell} of layers outputs: {1x1 cell} containing 1 output targets: {1x1 cell} containing 1 target biases: {1x1 cell} containing 1 bias inputWeights: {1x1 cell} containing 1 input weight layerWeights: {1x1 cell} containing no layer weights are shown. The latter contains information about the individual objects of the network.
7
The Structure of the Neural Network Toolbox (IV)
The next paragraph contains the training, initialization and performance functions. functions: adaptFcn: ’trains’ initFcn: ’initlay’ performFcn: ’mse’ trainFcn: ’trainc’ The trainFcn and adaptFcn are used for the two different learning types batch learning and incremental or on-line learning. The ANN toolbox include almost 20 training functions.
8
The Structure of the Neural Network Toolbox (V)
>> net.trainFcn = ’mytrainingfun’; The parameters of the training functions: parameters: adaptParam: .passes initParam: (none) performParam: (none) trainParam: .epochs, .goal, .show, .time The weights and biases are also stored in the network structure: weight and bias values: IW: {1x1 cell} containing 1 input weight matrix LW: {1x1 cell} containing no layer weight matrices b: {1x1 cell} containing 1 bias vector
9
Neural Network using NN Toolbox V5.0
To implement a Neural Network, 7 steps must be followed: Loading data source. Selecting attributes required. Decide training, validation, and testing data. Data manipulations and Target generation. (for supervised learning) Neural Network creation (selection of network architecture) and initialisation. Network Training and Testing. Performance evaluation.
10
Neural Network Fitting Tool GUI
Open the Neural Network Fitting Tool window with this command: >>nftool
11
Loading Data Source Load Input Data from workspace
Load Target Data from workspace Data description
12
Decide training, validation, and testing data.
Divide Data Set in subsets for Training and Validation
13
Selecting Attributes Select the Number of Neurons
14
Neural Network Creation
Train Network
15
Training and Performance Evaluation
Mean Squared Error
16
Saving Results
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.