SlideShare a Scribd company logo
Neural Networks and
Fuzzy Systems
NeuroLab
(a simple and powerful Neural Network Library for Python)
Dr. Tamer Ahmed Farrag
Course No.: 803522-3
NeuroLab 0.3.5
• NeuroLab - a library of basic neural networks algorithms
with flexible network configurations and learning
algorithms for Python. To simplify the using of the library,
interface is similar to the package of Neural Network
Toolbox (NNT) of MATLAB© .
• The library is based on the package numpy
(http://numpy.scipy.org), some learning algorithms are
used scipy.optimize (http://scipy.org).
2
Features
• Pure python + numpy
• API like Neural Network Toolbox (NNT) from MATLAB
• Interface to use train algorithms form scipy.optimize
• Flexible network configurations and learning
algorithms. You may change: train, error, initialization
and activation functions
• Unlimited number of neural layers and number of
neurons in layers
• Variety of supported types of Artificial Neural Network
and learning algorithms
3
Supported neural networks types
4
• Single layer perceptron
• Multilayer feed forward perceptron
• Competing layer (Kohonen Layer)
• Learning Vector Quantization (LVQ)
• Elman Recurrent network
• Hopfield Recurrent network
• Hemming Recurrent network
Install
5
• Open Anconda Prompt as administrator as shown
• Install neurolab using setuptools/distribute:
easy_install neurolab
• Or pip:
pip install neurolab
net: Neural Networks
6
Network Type Function
Count of
layers
Support train fcn Error fcn
Single-layer perceptron newp 1 train_delta SSE
Multi-layer perceptron newff >=1
train_gd, train_gdm,
train_gda, train_gdx,
train_rprop,
train_bfgs*, train_cg
SSE
Competitive layer newc 1
train_wta,
train_cwta*
SAE
LVQ newlvq 2 train_lvq MSE
Elman newelm >=1 train_gdx MSE
Hopield newhop 1 None None
Hemming newhem 2 None None
• The module contains the basic network architectures
Single Layer Perceptron (newp)
7
• Syntax:
neurolab.net.newp(minmax, cn, transf=<neurolab.trans.HardLim>)
• Parameters:
• minmax: list of list, the outer list is the number of input neurons,
inner lists must contain 2 elements: min and maxRange of each input
values
• cn: int, number of output neurons Number of neurons
• transf: func (default HardLim) Activation function
• Returns:
• net: Net
Example
• To Create network with 2 inputs and 10 neurons
• each input values are between -1 and 1
>>> net = newp([[-1, 1], [-1, 1]], 10)
8
9
10
11
• Syntax:
neurolab.net.newff(minmax, size, transf=None)
Parameters:
• minmax: list of list, the outer list is the number of input neurons, inner
lists must contain 2 elements: min and max Range of each input values
• size: the length of list equal to the number of layers except input layer,
the element of the list is the neuron number for corresponding layer
Contains the number of neurons for each layer
• transf: list (default TanSig) List of activation function for each layer
• Returns:
• net: Net
Feed Forward Multilayer Perceptron (newff)
12
Example
• create neural net with 2 inputs
• input range for each input is [-0.5, 0.5]
• 3 neurons for hidden layer, 1 neuron for output
• 2 layers including hidden layer and output layer
>>> net = newff( [[-0.5, 0.5], [-0.5, 0.5]] , [3, 1])
>>> net.ci
2
>>> net.co
1
>>> len(net.layers)
2
13
14
15
16
Resources
• NeuroLab web site:
https://pythonhosted.org/neurolab/index.html
• Library:
https://pythonhosted.org/neurolab/lib.html#
• Examples:
https://pythonhosted.org/neurolab/example.html
17

More Related Content

PDF
Machine Learning Interview Questions
PDF
Foundations of Machine Learning
PPTX
Presentation on unsupervised learning
PDF
Lecture 2 (Machine Learning)
PDF
Convolutional Neural Networks (CNN)
PPTX
AI: Planning and AI
PPTX
Svm Presentation
PPTX
Spectral Clustering
Machine Learning Interview Questions
Foundations of Machine Learning
Presentation on unsupervised learning
Lecture 2 (Machine Learning)
Convolutional Neural Networks (CNN)
AI: Planning and AI
Svm Presentation
Spectral Clustering

What's hot (20)

PPTX
Artificial Neural Network ANN
PPTX
AlexNet
PPTX
Classical relations and fuzzy relations
PPTX
Inception V3 Image Processing .pptx
PPTX
CONVOLUTIONAL NEURAL NETWORK
PPTX
Neural network
PDF
Artificial Neural Networks Lect3: Neural Network Learning rules
PPT
Introduction to prolog
PDF
UNIT-V.pdf daa unit material 5 th unit ppt
PDF
Essential concepts for machine learning
PPTX
Component level design
PPTX
03 Single layer Perception Classifier
PPTX
neural network
PPT
Graph colouring
PDF
Introduction to text classification using naive bayes
PPTX
boosting algorithm
PDF
Lecture 9 Perceptron
PPT
Primitive Recursive Functions
PDF
Introduction To Generative Adversarial Networks GANs
PPT
Data cleaning-outlier-detection
Artificial Neural Network ANN
AlexNet
Classical relations and fuzzy relations
Inception V3 Image Processing .pptx
CONVOLUTIONAL NEURAL NETWORK
Neural network
Artificial Neural Networks Lect3: Neural Network Learning rules
Introduction to prolog
UNIT-V.pdf daa unit material 5 th unit ppt
Essential concepts for machine learning
Component level design
03 Single layer Perception Classifier
neural network
Graph colouring
Introduction to text classification using naive bayes
boosting algorithm
Lecture 9 Perceptron
Primitive Recursive Functions
Introduction To Generative Adversarial Networks GANs
Data cleaning-outlier-detection
Ad

Similar to 06 neurolab python (20)

TXT
Stackpirt20170222
PPTX
neuralnetwork.pptx
PPTX
neuralnetwork.pptx
PPTX
Intro to NeuralNets and training of the network and shallow neural network
PPTX
Netmap presentation
PPTX
Build a simple image recognition system with tensor flow
PDF
Artificial Neural Networks: Introduction, Neural Network representation, Appr...
PDF
Deep learning unit 3 artificial neural network
PPTX
neuralnetwork.pptx
PPTX
ANN-Lecture2-Python Startup.pptx
PDF
Separating Hype from Reality in Deep Learning with Sameer Farooqui
PDF
Multiprocessing.pdf..............,.......
PDF
Multiprocessing.............,...........
PPTX
Machine learning PPT which shows the some deep learning concepts and code of ...
PDF
Open mp library functions and environment variables
PDF
Introduction to OpenMP
PDF
Neural Networks from Scratch - TensorFlow 101
PPTX
4.2 Neural Networks Overviewwwwwwww.pptx
PDF
Lecture 11 neural network principles
PDF
Artificial Neural networks
Stackpirt20170222
neuralnetwork.pptx
neuralnetwork.pptx
Intro to NeuralNets and training of the network and shallow neural network
Netmap presentation
Build a simple image recognition system with tensor flow
Artificial Neural Networks: Introduction, Neural Network representation, Appr...
Deep learning unit 3 artificial neural network
neuralnetwork.pptx
ANN-Lecture2-Python Startup.pptx
Separating Hype from Reality in Deep Learning with Sameer Farooqui
Multiprocessing.pdf..............,.......
Multiprocessing.............,...........
Machine learning PPT which shows the some deep learning concepts and code of ...
Open mp library functions and environment variables
Introduction to OpenMP
Neural Networks from Scratch - TensorFlow 101
4.2 Neural Networks Overviewwwwwwww.pptx
Lecture 11 neural network principles
Artificial Neural networks
Ad

Recently uploaded (20)

PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PPTX
Feature types and data preprocessing steps
PPTX
introduction to high performance computing
PPT
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
PPTX
Current and future trends in Computer Vision.pptx
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PDF
August -2025_Top10 Read_Articles_ijait.pdf
PDF
ChapteR012372321DFGDSFGDFGDFSGDFGDFGDFGSDFGDFGFD
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
PDF
Abrasive, erosive and cavitation wear.pdf
PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PDF
737-MAX_SRG.pdf student reference guides
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PPTX
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
Feature types and data preprocessing steps
introduction to high performance computing
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
Current and future trends in Computer Vision.pptx
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
Fundamentals of safety and accident prevention -final (1).pptx
August -2025_Top10 Read_Articles_ijait.pdf
ChapteR012372321DFGDSFGDFGDFSGDFGDFGDFGSDFGDFGFD
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
Abrasive, erosive and cavitation wear.pdf
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
737-MAX_SRG.pdf student reference guides
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...

06 neurolab python

  • 1. Neural Networks and Fuzzy Systems NeuroLab (a simple and powerful Neural Network Library for Python) Dr. Tamer Ahmed Farrag Course No.: 803522-3
  • 2. NeuroLab 0.3.5 • NeuroLab - a library of basic neural networks algorithms with flexible network configurations and learning algorithms for Python. To simplify the using of the library, interface is similar to the package of Neural Network Toolbox (NNT) of MATLAB© . • The library is based on the package numpy (http://numpy.scipy.org), some learning algorithms are used scipy.optimize (http://scipy.org). 2
  • 3. Features • Pure python + numpy • API like Neural Network Toolbox (NNT) from MATLAB • Interface to use train algorithms form scipy.optimize • Flexible network configurations and learning algorithms. You may change: train, error, initialization and activation functions • Unlimited number of neural layers and number of neurons in layers • Variety of supported types of Artificial Neural Network and learning algorithms 3
  • 4. Supported neural networks types 4 • Single layer perceptron • Multilayer feed forward perceptron • Competing layer (Kohonen Layer) • Learning Vector Quantization (LVQ) • Elman Recurrent network • Hopfield Recurrent network • Hemming Recurrent network
  • 5. Install 5 • Open Anconda Prompt as administrator as shown • Install neurolab using setuptools/distribute: easy_install neurolab • Or pip: pip install neurolab
  • 6. net: Neural Networks 6 Network Type Function Count of layers Support train fcn Error fcn Single-layer perceptron newp 1 train_delta SSE Multi-layer perceptron newff >=1 train_gd, train_gdm, train_gda, train_gdx, train_rprop, train_bfgs*, train_cg SSE Competitive layer newc 1 train_wta, train_cwta* SAE LVQ newlvq 2 train_lvq MSE Elman newelm >=1 train_gdx MSE Hopield newhop 1 None None Hemming newhem 2 None None • The module contains the basic network architectures
  • 7. Single Layer Perceptron (newp) 7 • Syntax: neurolab.net.newp(minmax, cn, transf=<neurolab.trans.HardLim>) • Parameters: • minmax: list of list, the outer list is the number of input neurons, inner lists must contain 2 elements: min and maxRange of each input values • cn: int, number of output neurons Number of neurons • transf: func (default HardLim) Activation function • Returns: • net: Net
  • 8. Example • To Create network with 2 inputs and 10 neurons • each input values are between -1 and 1 >>> net = newp([[-1, 1], [-1, 1]], 10) 8
  • 9. 9
  • 10. 10
  • 11. 11
  • 12. • Syntax: neurolab.net.newff(minmax, size, transf=None) Parameters: • minmax: list of list, the outer list is the number of input neurons, inner lists must contain 2 elements: min and max Range of each input values • size: the length of list equal to the number of layers except input layer, the element of the list is the neuron number for corresponding layer Contains the number of neurons for each layer • transf: list (default TanSig) List of activation function for each layer • Returns: • net: Net Feed Forward Multilayer Perceptron (newff) 12
  • 13. Example • create neural net with 2 inputs • input range for each input is [-0.5, 0.5] • 3 neurons for hidden layer, 1 neuron for output • 2 layers including hidden layer and output layer >>> net = newff( [[-0.5, 0.5], [-0.5, 0.5]] , [3, 1]) >>> net.ci 2 >>> net.co 1 >>> len(net.layers) 2 13
  • 14. 14
  • 15. 15
  • 16. 16
  • 17. Resources • NeuroLab web site: https://pythonhosted.org/neurolab/index.html • Library: https://pythonhosted.org/neurolab/lib.html# • Examples: https://pythonhosted.org/neurolab/example.html 17