SlideShare a Scribd company logo
1 of 25
INTRODUCTION TO
NEURAL NETWORK
TOOLBOX IN
MATLAB
NEURAL NETWORK TOOLBOXNEURAL NETWORK TOOLBOX
• The Matlab neural network toolbox provides
a complete set of functions and a graphical user
interface for the design, implementation,
visualization, and simulation of neural networks.
• It supports the most commonly used
supervised and unsupervised network architectures
and a comprehensive set of training and learning
functions.
KEY FEATURESKEY FEATURES
•Graphical user interface (GUI) for creating, training, and
simulating your neural networks
•Support for the most commonly used supervised and
unsupervised network architectures
•A comprehensive set of training and learning functions
•A suite of Simulink blocks, as well as documentation and
demonstrations of control system applications
•Automatic generation of Simulink models from neural
network objects
•Routines for improving generalization
GENERAL CREATION OF NETWORKGENERAL CREATION OF NETWORK
net = network
net=
network(numInputs,numLayers,biasConnect,inputConnect
,layerConnect,outputConnect,targetConnect)
Description
NETWORK creates new custom networks. It is used to
create networks that are then customized by functions
such as NEWP, NEWLIN, NEWFF, etc.
NETWORK takes these optional arguments (shown
with default values):
numInputs - Number of inputs, 0.
numLayers - Number of layers, 0.
biasConnect - numLayers-by-1 Boolean vector, zeros.
inputConnect - numLayers-by-numInputs Boolean matrix,
zeros.
layerConnect - numLayers-by-numLayers Boolean matrix,
zeros.
outputConnect - 1-by-numLayers Boolean vector, zeros.
targetConnect - 1-by-numLayers Boolean vector, zeros. and
returns,
NET - New network with the given property values.
TRAIN AND ADAPTTRAIN AND ADAPT
1. Incremental training : updating the weights after the
presentation of each single training sample.
2. Batch training : updating the weights after each
presenting the complete data set.
When using adapt, both incremental and batch
training can be used . When using train on the other
hand, only batch training will be used, regardless of the
format of the data. The big plus of train is that it gives
you a lot more choice in training functions (gradient
descent, gradient descent w/ momentum, Levenberg-
Marquardt, etc.) which are implemented very efficiently .
The difference between train and adapt: the
difference between passes and epochs. When using
adapt, the property that determines how many times the
complete training data set is used for training the network
is called net.adaptParam.passes. Fair enough. But,
when using train, the exact same property is now called
net.trainParam.epochs.
>> net.trainFcn = 'traingdm';
>> net.trainParam.epochs = 1000;
>> net.adaptFcn = 'adaptwb';
>> net.adaptParam.passes = 10;
TRAINING FUNCTIONSTRAINING FUNCTIONS
There are several types of training functions:
1. Supported training functions
2. Supported learning functions
3. Transfer functions
4. Transfer derivative functions
5. Weight and bias initialize functions
6. Weight derivative functions
SUPPORTED TRAINING FUNCTIONSSUPPORTED TRAINING FUNCTIONS
trainb – Batch training with weight and bias learning rules
trainbfg – BFGS quasi-Newton backpropagation
trainbr – Bayesian regularization
trainc – Cyclical order incremental update
traincgb – Powell-Beale conjugate gradient backpropagation
traincgf – Fletcher-Powell conjugate gradient backpropagation
traincgp – Polak-Ribiere conjugate gradient backpropagation
traingd – Gradient descent backpropagation
traingda – Gradient descent with adaptive learning rate backpropagation
traingdm – Gradient descent with momentum backpropagation
traingdx – Gradient descent with momentum & adaptive linear backpropagation
trainlm – Levenberg-Marquardt backpropagation
trainoss – One step secant backpropagations
trainr – Random order incremental update
trainrp – Resilient backpropagation (Rprop)
trains – Sequential order incremental update
trainscg – Scaled conjugate gradient backpropagation
SUPPORTED LEARNING FUNCTIONSSUPPORTED LEARNING FUNCTIONS
learncon – Conscience bias learning function
learngd – Gradient descent weight/bias learning function
learngdm – Gradient descent with momentum weight/bias learning
function
learnh – Hebb weight learning function
learnhd – Hebb with decay weight learning rule
learnis – Instar weight learning function
learnk – Kohonen weight learning function
learnlv1 – LVQ1 weight learning function
learnlv2 – LVQ2 weight learning function
learnos – Outstar weight learning function
learnp – Perceptron weight and bias learning function
learnpn – Normalized perceptron weight and bias learning function
learnsom – Self-organizing map weight learning function
learnwh – Widrow-Hoff weight and bias learning rule
TRANSFER FUNCTIONSTRANSFER FUNCTIONS
compet - Competitive transfer function.
hardlim - Hard limit transfer function.
hardlims - Symmetric hard limit transfer function.
logsig - Log sigmoid transfer function.
poslin - Positive linear transfer function.
purelin - Linear transfer function.
radbas - Radial basis transfer function.
satlin - Saturating linear transfer function.
satlins - Symmetric saturating linear transfer function.
softmax - Soft max transfer function.
tansig - Hyperbolic tangent sigmoid transfer function.
tribas - Triangular basis transfer function.
TRANSFER DERIVATIVE FUNCTIONSTRANSFER DERIVATIVE FUNCTIONS
dhardlim - Hard limit transfer derivative function.
dhardlms - Symmetric hard limit transfer derivative function
dlogsig - Log sigmoid transfer derivative function.
dposlin - Positive linear transfer derivative function.
dpurelin - Hard limit transfer derivative function.
dradbas - Radial basis transfer derivative function.
dsatlin - Saturating linear transfer derivative function.
dsatlins - Symmetric saturating linear transfer derivative function.
dtansig - Hyperbolic tangent sigmoid transfer derivative function.
dtribas - Triangular basis transfer derivative function.
WEIGHT AND BIAS INITIALIZATIONWEIGHT AND BIAS INITIALIZATION
FUNCTIONSFUNCTIONS
initcon - Conscience bias initialization function.
initzero - Zero weight/bias initialization function.
midpoint - Midpoint weight initialization function.
randnc - Normalized column weight initialization function.
randnr - Normalized row weight initialization function.
rands - Symmetric random weight/bias initialization function.
WEIGHT DERIVATIVE FUNCTIONSWEIGHT DERIVATIVE FUNCTIONS
ddotprod - Dot product weight derivative function.
NEURAL NETWORK TOOLBOX GUINEURAL NETWORK TOOLBOX GUI
1. The graphical user interface (GUI) is designed to be simple and
user friendly.This tool lets you import potentially large and
complex data sets.
2. The GUI also enables you to create, initialize, train, simulate, and
manage the networks. It has the GUI Network/Data Manager
window.
3. The window has its own work area, separate from the more
familiar command line workspace. Thus, when using the GUI,
one might "export" the GUI results to the (command line)
workspace. Similarly to "import" results from the command line
workspace to the GUI.
4. Once the Network/Data Manager is up and running, create a
network, view it, train it, simulate it and export the final results to
the workspace. Similarly, import data from the workspace for use
in the GUI.
clc
clear all
%net = newp(P,T,TF,LF) ------ Create Perceptron Network
%P ------ R x Q1 matrix of Q1 input vectors with R elements
%T ------ S x Q2 matrix of Q2 target vectors with S elements
%TF ----- Transfer function (default = 'hardlim')
%LF ----- Learning function (default = 'learnp')
net = newp([0 1; 0 1],[0 1]);
P1 = [0 0 1 1; 0 1 0 1];
T1 = [0 1 1 1];
net = init(net);
Y1 = sim(net,P1)
net.trainParam.epochs = 20;
net = train(net,P1,T1);
Y2 = sim(net,P1)
A graphical user interface can thus be used to
1. Create networks
2. Create data
3. Train the networks
4. Export the networks
5. Export the data to the command line workspace
Sample Programmes
%Creating a Neural Network in MATLAB
net = network;
net.numInputs = 1;
net.inputs{1}.size = 2;
net.numLayers = 2;
net.layers{1}.size = 3;
net.layers{2}.size = 1;
net.inputConnect(1) = 1
net.layerConnect(2, 1) = 1
net.outputConnect(2) = 1
net.targetConnect(2) = 1
net.layers{1}.transferFcn = 'logsig'
net.layers{2}.transferFcn = 'purelin'
net.biasConnect = [ 1 ; 1]
%Design and Train a feedforward network for the following
problem: Parity: Consider a 4-input and 1-output problem, where
the output should be 'one' if there are odd number of 1s in the input
pattern and 'zero' other-wise.
clear
inp=[0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1;
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1;
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1;
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1];
out=[0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0];
network=newff([0 1;0 1; 0 1; 0 1],[6 1],{'logsig','logsig'});
network=init(network);
y=sim(network,inp);
figure,plot(inp,out,inp,y,'o'),title('Before Training');
axis([-5 5 -2.0 2.0]);
network.trainParam.epochs = 500;
network=train(network,inp,out);
- Continue…
y=sim(network,inp);
figure,plot(inp,out,inp,y,'o'),title('After Training');
axis([-5 5 -2.0 2.0]);
Layer1_Weights=network.iw{1};
Layer1_Bias=network.b{1};
Layer2_Weights=network.lw{2};
Layer2_Bias=network.b{2};
Layer1_Weights
Layer1_Bias
Layer2_Weights
Layer2_Bias
Actual_Desired=[y' out'];
Actual_Desired
gensim(network)
- Continue…
Neural tool box

More Related Content

What's hot

Fourier series example
Fourier series exampleFourier series example
Fourier series exampleAbi finni
 
PLOTTING UNITE STEP AND RAMP FUNCTION IN MATLAB
PLOTTING UNITE STEP AND RAMP  FUNCTION  IN  MATLAB PLOTTING UNITE STEP AND RAMP  FUNCTION  IN  MATLAB
PLOTTING UNITE STEP AND RAMP FUNCTION IN MATLAB Mahmudul Hasan
 
Introduction to soft computing
Introduction to soft computingIntroduction to soft computing
Introduction to soft computingAnkush Kumar
 
Extension principle
Extension principleExtension principle
Extension principleSavo Delić
 
Fuzzy Logic Seminar with Implementation
Fuzzy Logic Seminar with ImplementationFuzzy Logic Seminar with Implementation
Fuzzy Logic Seminar with ImplementationBhaumik Parmar
 
Soft computing (ANN and Fuzzy Logic) : Dr. Purnima Pandit
Soft computing (ANN and Fuzzy Logic)  : Dr. Purnima PanditSoft computing (ANN and Fuzzy Logic)  : Dr. Purnima Pandit
Soft computing (ANN and Fuzzy Logic) : Dr. Purnima PanditPurnima Pandit
 
Introduction to Radial Basis Function Networks
Introduction to Radial Basis Function NetworksIntroduction to Radial Basis Function Networks
Introduction to Radial Basis Function NetworksESCOM
 
Fuzzy relations
Fuzzy relationsFuzzy relations
Fuzzy relationsnaugariya
 
Chapter 5 - Fuzzy Logic
Chapter 5 - Fuzzy LogicChapter 5 - Fuzzy Logic
Chapter 5 - Fuzzy LogicAshique Rasool
 
Fuzzy rules and fuzzy reasoning
Fuzzy rules and fuzzy reasoningFuzzy rules and fuzzy reasoning
Fuzzy rules and fuzzy reasoningVeni7
 
Lecture 15 DCT, Walsh and Hadamard Transform
Lecture 15 DCT, Walsh and Hadamard TransformLecture 15 DCT, Walsh and Hadamard Transform
Lecture 15 DCT, Walsh and Hadamard TransformVARUN KUMAR
 
Statistical learning
Statistical learningStatistical learning
Statistical learningSlideshare
 
Recurrent problems: TOH, Pizza Cutting and Josephus Problems
Recurrent problems: TOH, Pizza Cutting and Josephus ProblemsRecurrent problems: TOH, Pizza Cutting and Josephus Problems
Recurrent problems: TOH, Pizza Cutting and Josephus ProblemsMenglinLiu1
 
Principles of soft computing-Associative memory networks
Principles of soft computing-Associative memory networksPrinciples of soft computing-Associative memory networks
Principles of soft computing-Associative memory networksSivagowry Shathesh
 
fuzzy fuzzification and defuzzification
fuzzy fuzzification and defuzzificationfuzzy fuzzification and defuzzification
fuzzy fuzzification and defuzzificationNourhan Selem Salm
 

What's hot (20)

Hebb network
Hebb networkHebb network
Hebb network
 
Fourier series example
Fourier series exampleFourier series example
Fourier series example
 
PLOTTING UNITE STEP AND RAMP FUNCTION IN MATLAB
PLOTTING UNITE STEP AND RAMP  FUNCTION  IN  MATLAB PLOTTING UNITE STEP AND RAMP  FUNCTION  IN  MATLAB
PLOTTING UNITE STEP AND RAMP FUNCTION IN MATLAB
 
Introduction to soft computing
Introduction to soft computingIntroduction to soft computing
Introduction to soft computing
 
Extension principle
Extension principleExtension principle
Extension principle
 
Fuzzy Logic Seminar with Implementation
Fuzzy Logic Seminar with ImplementationFuzzy Logic Seminar with Implementation
Fuzzy Logic Seminar with Implementation
 
HOPFIELD NETWORK
HOPFIELD NETWORKHOPFIELD NETWORK
HOPFIELD NETWORK
 
Soft computing (ANN and Fuzzy Logic) : Dr. Purnima Pandit
Soft computing (ANN and Fuzzy Logic)  : Dr. Purnima PanditSoft computing (ANN and Fuzzy Logic)  : Dr. Purnima Pandit
Soft computing (ANN and Fuzzy Logic) : Dr. Purnima Pandit
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Introduction to Radial Basis Function Networks
Introduction to Radial Basis Function NetworksIntroduction to Radial Basis Function Networks
Introduction to Radial Basis Function Networks
 
Fuzzy relations
Fuzzy relationsFuzzy relations
Fuzzy relations
 
Dsp lecture vol 5 design of iir
Dsp lecture vol 5 design of iirDsp lecture vol 5 design of iir
Dsp lecture vol 5 design of iir
 
Chapter 5 - Fuzzy Logic
Chapter 5 - Fuzzy LogicChapter 5 - Fuzzy Logic
Chapter 5 - Fuzzy Logic
 
Fuzzy rules and fuzzy reasoning
Fuzzy rules and fuzzy reasoningFuzzy rules and fuzzy reasoning
Fuzzy rules and fuzzy reasoning
 
Lecture 15 DCT, Walsh and Hadamard Transform
Lecture 15 DCT, Walsh and Hadamard TransformLecture 15 DCT, Walsh and Hadamard Transform
Lecture 15 DCT, Walsh and Hadamard Transform
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Recurrent problems: TOH, Pizza Cutting and Josephus Problems
Recurrent problems: TOH, Pizza Cutting and Josephus ProblemsRecurrent problems: TOH, Pizza Cutting and Josephus Problems
Recurrent problems: TOH, Pizza Cutting and Josephus Problems
 
Principles of soft computing-Associative memory networks
Principles of soft computing-Associative memory networksPrinciples of soft computing-Associative memory networks
Principles of soft computing-Associative memory networks
 
Sampling Theorem and Band Limited Signals
Sampling Theorem and Band Limited SignalsSampling Theorem and Band Limited Signals
Sampling Theorem and Band Limited Signals
 
fuzzy fuzzification and defuzzification
fuzzy fuzzification and defuzzificationfuzzy fuzzification and defuzzification
fuzzy fuzzification and defuzzification
 

Viewers also liked

Neural network in matlab
Neural network in matlab Neural network in matlab
Neural network in matlab Fahim Khan
 
Matlab Neural Network Toolbox MATLAB
Matlab Neural Network Toolbox MATLABMatlab Neural Network Toolbox MATLAB
Matlab Neural Network Toolbox MATLABESCOM
 
التعرف الآني علي الحروف العربية المنعزلة
التعرف الآني علي الحروف العربية المنعزلة التعرف الآني علي الحروف العربية المنعزلة
التعرف الآني علي الحروف العربية المنعزلة Ayman Amin
 
A Matlab Implementation Of Nn
A Matlab Implementation Of NnA Matlab Implementation Of Nn
A Matlab Implementation Of NnESCOM
 
Neural networks1
Neural networks1Neural networks1
Neural networks1Mohan Raj
 
Introduction to toolbox under matlab environment
Introduction to toolbox under matlab environmentIntroduction to toolbox under matlab environment
Introduction to toolbox under matlab environmentParamjeet Singh Jamwal
 
MATLAB Environment for Neural Network Deployment
MATLAB Environment for Neural Network DeploymentMATLAB Environment for Neural Network Deployment
MATLAB Environment for Neural Network DeploymentAngelo Cardellicchio
 
Matlab Neural Network Toolbox
Matlab Neural Network ToolboxMatlab Neural Network Toolbox
Matlab Neural Network ToolboxAliMETN
 
Neural Network Toolbox MATLAB
Neural Network Toolbox MATLABNeural Network Toolbox MATLAB
Neural Network Toolbox MATLABESCOM
 
مقدمة في برمجة الشبكات network programming
مقدمة في برمجة الشبكات network programmingمقدمة في برمجة الشبكات network programming
مقدمة في برمجة الشبكات network programmingEhab Saad Ahmad
 
الملتقي الدولي الثامن Colloque 2017 urnop ria
الملتقي الدولي الثامن Colloque 2017               urnop  riaالملتقي الدولي الثامن Colloque 2017               urnop  ria
الملتقي الدولي الثامن Colloque 2017 urnop riaboukhrissa Naila
 
REDES NEURONALES ADALINE
REDES NEURONALES ADALINEREDES NEURONALES ADALINE
REDES NEURONALES ADALINEESCOM
 
neural network nntool box matlab start
neural network nntool box matlab startneural network nntool box matlab start
neural network nntool box matlab startnabeelasd
 
Artificial Neural Networks Lect7: Neural networks based on competition
Artificial Neural Networks Lect7: Neural networks based on competitionArtificial Neural Networks Lect7: Neural networks based on competition
Artificial Neural Networks Lect7: Neural networks based on competitionMohammed Bennamoun
 
Dissertation character recognition - Report
Dissertation character recognition - ReportDissertation character recognition - Report
Dissertation character recognition - Reportsachinkumar Bharadva
 
RED NEURONAL ADALINE
RED NEURONAL ADALINERED NEURONAL ADALINE
RED NEURONAL ADALINEESCOM
 
Enhanced Human Computer Interaction using hand gesture analysis on GPU
Enhanced Human Computer Interaction using hand gesture analysis on GPUEnhanced Human Computer Interaction using hand gesture analysis on GPU
Enhanced Human Computer Interaction using hand gesture analysis on GPUMahesh Khadatare
 

Viewers also liked (20)

Neural network in matlab
Neural network in matlab Neural network in matlab
Neural network in matlab
 
Matlab Neural Network Toolbox MATLAB
Matlab Neural Network Toolbox MATLABMatlab Neural Network Toolbox MATLAB
Matlab Neural Network Toolbox MATLAB
 
التعرف الآني علي الحروف العربية المنعزلة
التعرف الآني علي الحروف العربية المنعزلة التعرف الآني علي الحروف العربية المنعزلة
التعرف الآني علي الحروف العربية المنعزلة
 
nn network
nn networknn network
nn network
 
A Matlab Implementation Of Nn
A Matlab Implementation Of NnA Matlab Implementation Of Nn
A Matlab Implementation Of Nn
 
Neural networks1
Neural networks1Neural networks1
Neural networks1
 
Introduction to toolbox under matlab environment
Introduction to toolbox under matlab environmentIntroduction to toolbox under matlab environment
Introduction to toolbox under matlab environment
 
MATLAB Environment for Neural Network Deployment
MATLAB Environment for Neural Network DeploymentMATLAB Environment for Neural Network Deployment
MATLAB Environment for Neural Network Deployment
 
Matlab Neural Network Toolbox
Matlab Neural Network ToolboxMatlab Neural Network Toolbox
Matlab Neural Network Toolbox
 
Neural Network Toolbox MATLAB
Neural Network Toolbox MATLABNeural Network Toolbox MATLAB
Neural Network Toolbox MATLAB
 
مقدمة في برمجة الشبكات network programming
مقدمة في برمجة الشبكات network programmingمقدمة في برمجة الشبكات network programming
مقدمة في برمجة الشبكات network programming
 
Ppt final
Ppt finalPpt final
Ppt final
 
الملتقي الدولي الثامن Colloque 2017 urnop ria
الملتقي الدولي الثامن Colloque 2017               urnop  riaالملتقي الدولي الثامن Colloque 2017               urnop  ria
الملتقي الدولي الثامن Colloque 2017 urnop ria
 
REDES NEURONALES ADALINE
REDES NEURONALES ADALINEREDES NEURONALES ADALINE
REDES NEURONALES ADALINE
 
neural network nntool box matlab start
neural network nntool box matlab startneural network nntool box matlab start
neural network nntool box matlab start
 
Artificial Neural Networks Lect7: Neural networks based on competition
Artificial Neural Networks Lect7: Neural networks based on competitionArtificial Neural Networks Lect7: Neural networks based on competition
Artificial Neural Networks Lect7: Neural networks based on competition
 
Fuzzy and nn
Fuzzy and nnFuzzy and nn
Fuzzy and nn
 
Dissertation character recognition - Report
Dissertation character recognition - ReportDissertation character recognition - Report
Dissertation character recognition - Report
 
RED NEURONAL ADALINE
RED NEURONAL ADALINERED NEURONAL ADALINE
RED NEURONAL ADALINE
 
Enhanced Human Computer Interaction using hand gesture analysis on GPU
Enhanced Human Computer Interaction using hand gesture analysis on GPUEnhanced Human Computer Interaction using hand gesture analysis on GPU
Enhanced Human Computer Interaction using hand gesture analysis on GPU
 

Similar to Neural tool box

Snabb - A toolkit for user-space networking (FOSDEM 2018)
Snabb - A toolkit for user-space networking (FOSDEM 2018)Snabb - A toolkit for user-space networking (FOSDEM 2018)
Snabb - A toolkit for user-space networking (FOSDEM 2018)Igalia
 
Overview of Chainer and Its Features
Overview of Chainer and Its FeaturesOverview of Chainer and Its Features
Overview of Chainer and Its FeaturesSeiya Tokui
 
backpropagation in neural networks
backpropagation in neural networksbackpropagation in neural networks
backpropagation in neural networksAkash Goel
 
Machine Learning Essentials Demystified part2 | Big Data Demystified
Machine Learning Essentials Demystified part2 | Big Data DemystifiedMachine Learning Essentials Demystified part2 | Big Data Demystified
Machine Learning Essentials Demystified part2 | Big Data DemystifiedOmid Vahdaty
 
On Implementation of Neuron Network(Back-propagation)
On Implementation of Neuron Network(Back-propagation)On Implementation of Neuron Network(Back-propagation)
On Implementation of Neuron Network(Back-propagation)Yu Liu
 
Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0 Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0 Sumanth Chinthagunta
 
IRJET - Implementation of Neural Network on FPGA
IRJET - Implementation of Neural Network on FPGAIRJET - Implementation of Neural Network on FPGA
IRJET - Implementation of Neural Network on FPGAIRJET Journal
 
Scalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNetScalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNetAmazon Web Services
 
What is pattern recognition (lecture 6 of 6)
What is pattern recognition (lecture 6 of 6)What is pattern recognition (lecture 6 of 6)
What is pattern recognition (lecture 6 of 6)Randa Elanwar
 
Machine learning Experiments report
Machine learning Experiments report Machine learning Experiments report
Machine learning Experiments report AlmkdadAli
 
Advanced Spark Programming - Part 2 | Big Data Hadoop Spark Tutorial | CloudxLab
Advanced Spark Programming - Part 2 | Big Data Hadoop Spark Tutorial | CloudxLabAdvanced Spark Programming - Part 2 | Big Data Hadoop Spark Tutorial | CloudxLab
Advanced Spark Programming - Part 2 | Big Data Hadoop Spark Tutorial | CloudxLabCloudxLab
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profilerIhor Bobak
 
Online learning, Vowpal Wabbit and Hadoop
Online learning, Vowpal Wabbit and HadoopOnline learning, Vowpal Wabbit and Hadoop
Online learning, Vowpal Wabbit and HadoopHéloïse Nonne
 
Introduction to Chainer
Introduction to ChainerIntroduction to Chainer
Introduction to ChainerSeiya Tokui
 
Neural network-toolbox
Neural network-toolboxNeural network-toolbox
Neural network-toolboxangeltejera
 

Similar to Neural tool box (20)

Snabb - A toolkit for user-space networking (FOSDEM 2018)
Snabb - A toolkit for user-space networking (FOSDEM 2018)Snabb - A toolkit for user-space networking (FOSDEM 2018)
Snabb - A toolkit for user-space networking (FOSDEM 2018)
 
Overview of Chainer and Its Features
Overview of Chainer and Its FeaturesOverview of Chainer and Its Features
Overview of Chainer and Its Features
 
backpropagation in neural networks
backpropagation in neural networksbackpropagation in neural networks
backpropagation in neural networks
 
MXNet Workshop
MXNet WorkshopMXNet Workshop
MXNet Workshop
 
N ns 1
N ns 1N ns 1
N ns 1
 
Machine Learning Essentials Demystified part2 | Big Data Demystified
Machine Learning Essentials Demystified part2 | Big Data DemystifiedMachine Learning Essentials Demystified part2 | Big Data Demystified
Machine Learning Essentials Demystified part2 | Big Data Demystified
 
Deep Learning
Deep LearningDeep Learning
Deep Learning
 
On Implementation of Neuron Network(Back-propagation)
On Implementation of Neuron Network(Back-propagation)On Implementation of Neuron Network(Back-propagation)
On Implementation of Neuron Network(Back-propagation)
 
Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0 Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0
 
IRJET - Implementation of Neural Network on FPGA
IRJET - Implementation of Neural Network on FPGAIRJET - Implementation of Neural Network on FPGA
IRJET - Implementation of Neural Network on FPGA
 
Scalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNetScalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNet
 
What is pattern recognition (lecture 6 of 6)
What is pattern recognition (lecture 6 of 6)What is pattern recognition (lecture 6 of 6)
What is pattern recognition (lecture 6 of 6)
 
Machine learning Experiments report
Machine learning Experiments report Machine learning Experiments report
Machine learning Experiments report
 
Advanced Spark Programming - Part 2 | Big Data Hadoop Spark Tutorial | CloudxLab
Advanced Spark Programming - Part 2 | Big Data Hadoop Spark Tutorial | CloudxLabAdvanced Spark Programming - Part 2 | Big Data Hadoop Spark Tutorial | CloudxLab
Advanced Spark Programming - Part 2 | Big Data Hadoop Spark Tutorial | CloudxLab
 
Matlab ppt
Matlab pptMatlab ppt
Matlab ppt
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profiler
 
Online learning, Vowpal Wabbit and Hadoop
Online learning, Vowpal Wabbit and HadoopOnline learning, Vowpal Wabbit and Hadoop
Online learning, Vowpal Wabbit and Hadoop
 
Deep learning-practical
Deep learning-practicalDeep learning-practical
Deep learning-practical
 
Introduction to Chainer
Introduction to ChainerIntroduction to Chainer
Introduction to Chainer
 
Neural network-toolbox
Neural network-toolboxNeural network-toolbox
Neural network-toolbox
 

Recently uploaded

SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 

Neural tool box

  • 2. NEURAL NETWORK TOOLBOXNEURAL NETWORK TOOLBOX • The Matlab neural network toolbox provides a complete set of functions and a graphical user interface for the design, implementation, visualization, and simulation of neural networks. • It supports the most commonly used supervised and unsupervised network architectures and a comprehensive set of training and learning functions.
  • 3. KEY FEATURESKEY FEATURES •Graphical user interface (GUI) for creating, training, and simulating your neural networks •Support for the most commonly used supervised and unsupervised network architectures •A comprehensive set of training and learning functions •A suite of Simulink blocks, as well as documentation and demonstrations of control system applications •Automatic generation of Simulink models from neural network objects •Routines for improving generalization
  • 4. GENERAL CREATION OF NETWORKGENERAL CREATION OF NETWORK net = network net= network(numInputs,numLayers,biasConnect,inputConnect ,layerConnect,outputConnect,targetConnect) Description NETWORK creates new custom networks. It is used to create networks that are then customized by functions such as NEWP, NEWLIN, NEWFF, etc.
  • 5. NETWORK takes these optional arguments (shown with default values): numInputs - Number of inputs, 0. numLayers - Number of layers, 0. biasConnect - numLayers-by-1 Boolean vector, zeros. inputConnect - numLayers-by-numInputs Boolean matrix, zeros. layerConnect - numLayers-by-numLayers Boolean matrix, zeros. outputConnect - 1-by-numLayers Boolean vector, zeros. targetConnect - 1-by-numLayers Boolean vector, zeros. and returns, NET - New network with the given property values.
  • 6. TRAIN AND ADAPTTRAIN AND ADAPT 1. Incremental training : updating the weights after the presentation of each single training sample. 2. Batch training : updating the weights after each presenting the complete data set. When using adapt, both incremental and batch training can be used . When using train on the other hand, only batch training will be used, regardless of the format of the data. The big plus of train is that it gives you a lot more choice in training functions (gradient descent, gradient descent w/ momentum, Levenberg- Marquardt, etc.) which are implemented very efficiently .
  • 7. The difference between train and adapt: the difference between passes and epochs. When using adapt, the property that determines how many times the complete training data set is used for training the network is called net.adaptParam.passes. Fair enough. But, when using train, the exact same property is now called net.trainParam.epochs. >> net.trainFcn = 'traingdm'; >> net.trainParam.epochs = 1000; >> net.adaptFcn = 'adaptwb'; >> net.adaptParam.passes = 10;
  • 8. TRAINING FUNCTIONSTRAINING FUNCTIONS There are several types of training functions: 1. Supported training functions 2. Supported learning functions 3. Transfer functions 4. Transfer derivative functions 5. Weight and bias initialize functions 6. Weight derivative functions
  • 9. SUPPORTED TRAINING FUNCTIONSSUPPORTED TRAINING FUNCTIONS trainb – Batch training with weight and bias learning rules trainbfg – BFGS quasi-Newton backpropagation trainbr – Bayesian regularization trainc – Cyclical order incremental update traincgb – Powell-Beale conjugate gradient backpropagation traincgf – Fletcher-Powell conjugate gradient backpropagation traincgp – Polak-Ribiere conjugate gradient backpropagation traingd – Gradient descent backpropagation traingda – Gradient descent with adaptive learning rate backpropagation traingdm – Gradient descent with momentum backpropagation traingdx – Gradient descent with momentum & adaptive linear backpropagation trainlm – Levenberg-Marquardt backpropagation trainoss – One step secant backpropagations trainr – Random order incremental update trainrp – Resilient backpropagation (Rprop) trains – Sequential order incremental update trainscg – Scaled conjugate gradient backpropagation
  • 10. SUPPORTED LEARNING FUNCTIONSSUPPORTED LEARNING FUNCTIONS learncon – Conscience bias learning function learngd – Gradient descent weight/bias learning function learngdm – Gradient descent with momentum weight/bias learning function learnh – Hebb weight learning function learnhd – Hebb with decay weight learning rule learnis – Instar weight learning function learnk – Kohonen weight learning function learnlv1 – LVQ1 weight learning function learnlv2 – LVQ2 weight learning function learnos – Outstar weight learning function learnp – Perceptron weight and bias learning function learnpn – Normalized perceptron weight and bias learning function learnsom – Self-organizing map weight learning function learnwh – Widrow-Hoff weight and bias learning rule
  • 11. TRANSFER FUNCTIONSTRANSFER FUNCTIONS compet - Competitive transfer function. hardlim - Hard limit transfer function. hardlims - Symmetric hard limit transfer function. logsig - Log sigmoid transfer function. poslin - Positive linear transfer function. purelin - Linear transfer function. radbas - Radial basis transfer function. satlin - Saturating linear transfer function. satlins - Symmetric saturating linear transfer function. softmax - Soft max transfer function. tansig - Hyperbolic tangent sigmoid transfer function. tribas - Triangular basis transfer function.
  • 12. TRANSFER DERIVATIVE FUNCTIONSTRANSFER DERIVATIVE FUNCTIONS dhardlim - Hard limit transfer derivative function. dhardlms - Symmetric hard limit transfer derivative function dlogsig - Log sigmoid transfer derivative function. dposlin - Positive linear transfer derivative function. dpurelin - Hard limit transfer derivative function. dradbas - Radial basis transfer derivative function. dsatlin - Saturating linear transfer derivative function. dsatlins - Symmetric saturating linear transfer derivative function. dtansig - Hyperbolic tangent sigmoid transfer derivative function. dtribas - Triangular basis transfer derivative function.
  • 13. WEIGHT AND BIAS INITIALIZATIONWEIGHT AND BIAS INITIALIZATION FUNCTIONSFUNCTIONS initcon - Conscience bias initialization function. initzero - Zero weight/bias initialization function. midpoint - Midpoint weight initialization function. randnc - Normalized column weight initialization function. randnr - Normalized row weight initialization function. rands - Symmetric random weight/bias initialization function. WEIGHT DERIVATIVE FUNCTIONSWEIGHT DERIVATIVE FUNCTIONS ddotprod - Dot product weight derivative function.
  • 14. NEURAL NETWORK TOOLBOX GUINEURAL NETWORK TOOLBOX GUI 1. The graphical user interface (GUI) is designed to be simple and user friendly.This tool lets you import potentially large and complex data sets. 2. The GUI also enables you to create, initialize, train, simulate, and manage the networks. It has the GUI Network/Data Manager window. 3. The window has its own work area, separate from the more familiar command line workspace. Thus, when using the GUI, one might "export" the GUI results to the (command line) workspace. Similarly to "import" results from the command line workspace to the GUI. 4. Once the Network/Data Manager is up and running, create a network, view it, train it, simulate it and export the final results to the workspace. Similarly, import data from the workspace for use in the GUI.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. clc clear all %net = newp(P,T,TF,LF) ------ Create Perceptron Network %P ------ R x Q1 matrix of Q1 input vectors with R elements %T ------ S x Q2 matrix of Q2 target vectors with S elements %TF ----- Transfer function (default = 'hardlim') %LF ----- Learning function (default = 'learnp') net = newp([0 1; 0 1],[0 1]); P1 = [0 0 1 1; 0 1 0 1]; T1 = [0 1 1 1]; net = init(net); Y1 = sim(net,P1) net.trainParam.epochs = 20; net = train(net,P1,T1); Y2 = sim(net,P1)
  • 21. A graphical user interface can thus be used to 1. Create networks 2. Create data 3. Train the networks 4. Export the networks 5. Export the data to the command line workspace
  • 22. Sample Programmes %Creating a Neural Network in MATLAB net = network; net.numInputs = 1; net.inputs{1}.size = 2; net.numLayers = 2; net.layers{1}.size = 3; net.layers{2}.size = 1; net.inputConnect(1) = 1 net.layerConnect(2, 1) = 1 net.outputConnect(2) = 1 net.targetConnect(2) = 1 net.layers{1}.transferFcn = 'logsig' net.layers{2}.transferFcn = 'purelin' net.biasConnect = [ 1 ; 1]
  • 23. %Design and Train a feedforward network for the following problem: Parity: Consider a 4-input and 1-output problem, where the output should be 'one' if there are odd number of 1s in the input pattern and 'zero' other-wise. clear inp=[0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1; 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1; 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1; 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1]; out=[0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0]; network=newff([0 1;0 1; 0 1; 0 1],[6 1],{'logsig','logsig'}); network=init(network); y=sim(network,inp); figure,plot(inp,out,inp,y,'o'),title('Before Training'); axis([-5 5 -2.0 2.0]); network.trainParam.epochs = 500; network=train(network,inp,out); - Continue…
  • 24. y=sim(network,inp); figure,plot(inp,out,inp,y,'o'),title('After Training'); axis([-5 5 -2.0 2.0]); Layer1_Weights=network.iw{1}; Layer1_Bias=network.b{1}; Layer2_Weights=network.lw{2}; Layer2_Bias=network.b{2}; Layer1_Weights Layer1_Bias Layer2_Weights Layer2_Bias Actual_Desired=[y' out']; Actual_Desired gensim(network) - Continue…