Neural Networks & Deep Learning
CSE & IT Department
ECE School
Shiraz University
ONLY
GOD
Overview of
NN Classifier
2021
2
Overview of
NN Classifier
Pattern Classification
3
• Is one type of pattern recognition
• Each input vector Ԧ
𝑥 belongs/not belongs to a particular class
ቊ
Ԧ
𝑥 ∈ class ⇒ Ԧ
𝑥 ∈ Class 1
Ԧ
𝑥 ∉ class ⇒ Ԧ
𝑥 ∈ Class 2
• Set of training data: {< Ԧ
𝑠 𝑝 ; Ԧ
𝑡 𝑝 >, 𝑝 = 1, … , 𝑃}
• Data representation: binary ቊ
1
0
or bipolar ቊ
1
−1
< Ԧ
𝑠 1 ; Ԧ
𝑡 1 > = < −1, −1,1,1; 1 >
< Ԧ
𝑠 2 ; Ԧ
𝑡 2 > = < 1, −1,1, −1; −1 >
• In bipolar representation: Ԧ
𝑥𝑇 Ԧ
𝑥 = 𝑛 where 𝑛 is dimension of Ԧ
𝑥
Ex. of 2-class Patterns
4
• Classifying airplanes given their masses and speeds
• Construct an NN to classify any type of bomber or fighter
𝐌𝐚𝐬𝐬 Speed 𝐂𝐥𝐚𝐬𝐬
1.0 0.1 Bomber
2.0 0.2 Bomber
0.1 0.3 Fighter
2.0 0.3 Bomber
0.2 0.4 Fighter
3.0 0.4 Bomber
0.1 0.5 Fighter
1.5 0.5 Bomber
0.5 0.6 Fighter
1.6 0.7 Fighter
NN Classifier for 2-class Example
5
• Two inputs: masses and speeds
• One output neuron for each class
• Activation 1: yes
• Activation 0: no
• Just one output neuron
• Activation 1: fighter
• Activation 0: bomber
• Try the simplest network: a single layer net
• Replace the threshold (𝜃) by using a bias (𝑏)
2-class NN Classifier for 2D Data
6
• Using single-layer NN with one output neuron for two classes
𝑦_𝑖𝑛 = 𝑏 + σ𝑖=1
𝑛
𝑥𝑖 𝑤𝑖 = 𝑏 + 𝑤𝑇
Ԧ
𝑥
𝑦 = 𝑓 𝑦_𝑖𝑛 = ቊ
1 𝑖𝑓 𝑦_𝑖𝑛 ≥ 0
−1 𝑖𝑓 𝑦_𝑖𝑛 < 0
Decision boundary:
𝑏 + σ𝑖=1
𝑛
𝑥𝑖 𝑤𝑖 = 0
Bias in NN Classifier
7
The role of bias:
𝑦_𝑖𝑛 = 𝑥1𝑤1 + 𝑥2𝑤2 + 𝑏
𝑦 = 𝑓 𝑦_𝑖𝑛 = ቊ
1 if 𝑥1𝑤1 + 𝑥2𝑤2 + 𝑏 ≥ 0
−1 if 𝑥1𝑤1 + 𝑥2𝑤2 + 𝑏 < 0
𝑥1𝑤1 + 𝑥2𝑤2 + 𝑏 = 0 → 𝑥2 = −
𝑤1
𝑤2
𝑥1 −
𝑏
𝑤2
: Decision line
Linear Separability and Decision Hyper-planes
8
• If for a classification problem, there are weights so that all
positive training patterns lie on side of decision boundary and
all negative patterns lie on other side of decision boundary,
then problem is linearly separable
• For two inputs, decision boundary is 1D straight line in 2D input
space
• If we have 𝑛 inputs, decision boundary is (𝑛 − 1)D hyper-plane
in 𝑛D input space
Decision Boundary for AND & OR
9
• For simple logic gate problems, decision boundaries between
classes are linear:
• Decision boundary: 𝑥1𝑤1 + 𝑥2𝑤2 − 𝜃 = 0
Decision Boundary for XOR
10
• For XOR, there are two obvious remedies:
• Either change activation function so that it has more
than one decision boundary
• Use a more complex network that is able to generate
more complex decision boundaries
Characteristics of NN Classifier
11
Decision boundary is not unique
• If a problem is linearly separable, there are many different
decision boundary separating positive pattern from negative
ones
Characteristics of NN Classifier
12
The weights and bias are not unique
• For each decision boundary, there are many choices for 𝑤𝑖s
and 𝑏 that give exactly the same boundary
𝒔𝟏 𝒔𝟐 𝒕
1 1 1
1 -1 -1
-1 1 -1
-1 -1 -1
𝑥2 = −𝑥1 + 1
𝑥2 = −
𝑤1
𝑤2
𝑥1 −
𝑏
𝑤2
𝑤1 = 𝑤2 = −𝑏
General Decision Boundaries
13
Generally, we wish NNs:
• To deal with input patterns that are not binary
• To form complex decision boundaries
• To classify inputs into many classes
• Also, to produce outputs for input
patterns that were not originally
set up to classify
• Shown with question marks
• Their classes may be incorrect
Memorization and Generalization
14
Two important aspects of network’s operation:
• Memorization:
• The network must learn decision surfaces from a set of
training patterns so that these training patterns are
classified correctly (are memorized)
• Generalization:
• The network must also be able to correctly classify test
patterns (sufficiently similar to training patterns) it has
never seen before (to generalize)
• A good NN can memorize well; also, can generalize well
Memorization and Generalization
15
• Sometimes, training data may contain errors:
• Noise in experimental determination of input values
• Incorrect classifications
• In this case, learning training data perfectly may make
the generalization worse
• There is an important trade-off between
memorization and generalization that arises quite
generally
Generalization in Classification
16
• An NN wants to learn a classification decision boundary
• The aim is to generalize such that it can classify new inputs
appropriately
• If training data contains noise, no necessarily need whole
training data to be classified accurately as it is likely to reduce
generalization ability
Generalization in Function Approximation
17
• An NN wants to recover a function for which only noisy
data samples exist
• NN is expected:
• To give a better representation of underlying function if its
output curve does not pass through all data points
• To allow a larger error on training data as is likely to lead to
better generalization
Pattern Representation in Classification
18
Binary vs. bipolar representation:
In a simple net, form of data representation may change a solvable
problem with a non-solvable one
Binary: ቊ
1 positive
0 negetive
Bipolar:ቐ
+1 positive
0 missing
−1 negetive
• Binary representation is not as good as bipolar in generalization
• Using bipolar input, missing data can be distinguished from
mistaken data

More Related Content

PPTX
Fishers linear discriminant for dimensionality reduction.
PPTX
Variance threshold based feature selection method
PDF
Recognition of unistroke gesture sequences
PDF
Designing A Minimum Distance to Class Mean Classifier
PDF
Pattern Recognition - Designing a minimum distance class mean classifier
PPTX
Finite element analysis
PDF
Pattern Recognition: Class mean classifier
PDF
Redes neuronales basadas en competición
Fishers linear discriminant for dimensionality reduction.
Variance threshold based feature selection method
Recognition of unistroke gesture sequences
Designing A Minimum Distance to Class Mean Classifier
Pattern Recognition - Designing a minimum distance class mean classifier
Finite element analysis
Pattern Recognition: Class mean classifier
Redes neuronales basadas en competición

What's hot (14)

PPTX
Structure in c#
PPTX
Accuracy-Constrained Privacy-Preserving Access Control Mechanism For Relation...
DOCX
Minor 1
PDF
IUI 2016 Presentation Slide
PPTX
Strings in c#
DOCX
Smu mscit sem 2 fall 2015 solved assignments
PPTX
Normalisation by vmb
PDF
Recognition of Numerals Using Neural Network
PPTX
FEA good practices presentation
PDF
Testing of memory using franklin method
PDF
Lecture 2 (Machine Learning)
PPTX
Single source shortestpath
DOCX
Structure in c#
Accuracy-Constrained Privacy-Preserving Access Control Mechanism For Relation...
Minor 1
IUI 2016 Presentation Slide
Strings in c#
Smu mscit sem 2 fall 2015 solved assignments
Normalisation by vmb
Recognition of Numerals Using Neural Network
FEA good practices presentation
Testing of memory using franklin method
Lecture 2 (Machine Learning)
Single source shortestpath
Ad

Similar to Ch 1-2 NN classifier (20)

PDF
KernelSVMfkajlhklzkjlzvckjdklfjlsjlfjlkdfslfs
PPTX
Introduction to Neural networks (under graduate course) Lecture 9 of 9
PDF
Competitive Neural Network Artificial Intelligence
PDF
Recurrent Neural Networks, LSTM and GRU
PPTX
04 Classification in Data Mining
PPTX
Reason To Switch to DNNDNNs excel in handling huge volumes of data (e.g., ima...
PPTX
Explainable algorithm evaluation from lessons in education
PPTX
Lecture_2_Deep_Learning_Overview.pptx
PDF
Multi-class Classification on Riemannian Manifolds for Video Surveillance
PPTX
Lecture_2_Deep_Learning_Overview-newone1
PDF
Lecture 2 neural network covers the basic
PDF
PR-284: End-to-End Object Detection with Transformers(DETR)
PDF
TOOD: Task-aligned One-stage Object Detection
PDF
Decision trees
PPTX
Deep learning with TensorFlow
PPTX
Training DNN Models - II.pptx
PDF
Lecture 6 - Classification Classification
PDF
ARTIFICIAL-NEURAL-NETWORKMACHINELEARNING
PPTX
03 Single layer Perception Classifier
PDF
Unsupervised learning and clustering.pdf
KernelSVMfkajlhklzkjlzvckjdklfjlsjlfjlkdfslfs
Introduction to Neural networks (under graduate course) Lecture 9 of 9
Competitive Neural Network Artificial Intelligence
Recurrent Neural Networks, LSTM and GRU
04 Classification in Data Mining
Reason To Switch to DNNDNNs excel in handling huge volumes of data (e.g., ima...
Explainable algorithm evaluation from lessons in education
Lecture_2_Deep_Learning_Overview.pptx
Multi-class Classification on Riemannian Manifolds for Video Surveillance
Lecture_2_Deep_Learning_Overview-newone1
Lecture 2 neural network covers the basic
PR-284: End-to-End Object Detection with Transformers(DETR)
TOOD: Task-aligned One-stage Object Detection
Decision trees
Deep learning with TensorFlow
Training DNN Models - II.pptx
Lecture 6 - Classification Classification
ARTIFICIAL-NEURAL-NETWORKMACHINELEARNING
03 Single layer Perception Classifier
Unsupervised learning and clustering.pdf
Ad

More from Zahra Amini (12)

PDF
Dip azimifar enhancement_l05_2020
PDF
Dip azimifar enhancement_l04_2020
PDF
Dip azimifar enhancement_l03_2020
PDF
Dip azimifar enhancement_l02_2020
PDF
Dip azimifar enhancement_l01_2020
PDF
Ch 1-3 nn learning 1-7
PDF
Ch 1-1 introduction
PDF
Lecture 8
PDF
Kernel estimation(ref)
PDF
Dr azimifar pattern recognition lect4
PDF
Dr azimifar pattern recognition lect2
PDF
Dr azimifar pattern recognition lect1
Dip azimifar enhancement_l05_2020
Dip azimifar enhancement_l04_2020
Dip azimifar enhancement_l03_2020
Dip azimifar enhancement_l02_2020
Dip azimifar enhancement_l01_2020
Ch 1-3 nn learning 1-7
Ch 1-1 introduction
Lecture 8
Kernel estimation(ref)
Dr azimifar pattern recognition lect4
Dr azimifar pattern recognition lect2
Dr azimifar pattern recognition lect1

Recently uploaded (20)

PDF
Metabolic Acidosis. pa,oakw,llwla,wwwwqw
PPTX
LIPID & AMINO ACID METABOLISM UNIT-III, B PHARM II SEMESTER
PPT
ecg for noob ecg interpretation ecg recall
PDF
Packaging materials of fruits and vegetables
PDF
Traditional Healing Practices: A Model for Integrative Care in Diabetes Mana...
PDF
Social preventive and pharmacy. Pdf
PPT
THE CELL THEORY AND ITS FUNDAMENTALS AND USE
PDF
THE-VITAL-ROLE-OF-MITOCHONDRIAL-RESPIRATION-IN-PLANT-GROWTH-AND-DEVELOPMENT.pdf
PDF
final prehhhejjehehhehehehebesentation.pdf
PPTX
Thyroid disorders presentation for MBBS.pptx
PPTX
limit test definition and all limit tests
PPTX
BPharm_Hospital_Organization_Complete_PPT.pptx
PDF
Sustainable Biology- Scopes, Principles of sustainiability, Sustainable Resou...
PDF
Science Form five needed shit SCIENEce so
PPTX
GREEN FIELDS SCHOOL PPT ON HOLIDAY HOMEWORK
PPTX
ELISA(Enzyme linked immunosorbent assay)
PPTX
Preformulation.pptx Preformulation studies-Including all parameter
PDF
CuO Nps photocatalysts 15156456551564161
PPT
Biochemestry- PPT ON Protein,Nitrogenous constituents of Urine, Blood, their ...
PPTX
Introduction to Immunology (Unit-1).pptx
Metabolic Acidosis. pa,oakw,llwla,wwwwqw
LIPID & AMINO ACID METABOLISM UNIT-III, B PHARM II SEMESTER
ecg for noob ecg interpretation ecg recall
Packaging materials of fruits and vegetables
Traditional Healing Practices: A Model for Integrative Care in Diabetes Mana...
Social preventive and pharmacy. Pdf
THE CELL THEORY AND ITS FUNDAMENTALS AND USE
THE-VITAL-ROLE-OF-MITOCHONDRIAL-RESPIRATION-IN-PLANT-GROWTH-AND-DEVELOPMENT.pdf
final prehhhejjehehhehehehebesentation.pdf
Thyroid disorders presentation for MBBS.pptx
limit test definition and all limit tests
BPharm_Hospital_Organization_Complete_PPT.pptx
Sustainable Biology- Scopes, Principles of sustainiability, Sustainable Resou...
Science Form five needed shit SCIENEce so
GREEN FIELDS SCHOOL PPT ON HOLIDAY HOMEWORK
ELISA(Enzyme linked immunosorbent assay)
Preformulation.pptx Preformulation studies-Including all parameter
CuO Nps photocatalysts 15156456551564161
Biochemestry- PPT ON Protein,Nitrogenous constituents of Urine, Blood, their ...
Introduction to Immunology (Unit-1).pptx

Ch 1-2 NN classifier

  • 1. Neural Networks & Deep Learning CSE & IT Department ECE School Shiraz University ONLY GOD Overview of NN Classifier 2021
  • 3. Pattern Classification 3 • Is one type of pattern recognition • Each input vector Ԧ 𝑥 belongs/not belongs to a particular class ቊ Ԧ 𝑥 ∈ class ⇒ Ԧ 𝑥 ∈ Class 1 Ԧ 𝑥 ∉ class ⇒ Ԧ 𝑥 ∈ Class 2 • Set of training data: {< Ԧ 𝑠 𝑝 ; Ԧ 𝑡 𝑝 >, 𝑝 = 1, … , 𝑃} • Data representation: binary ቊ 1 0 or bipolar ቊ 1 −1 < Ԧ 𝑠 1 ; Ԧ 𝑡 1 > = < −1, −1,1,1; 1 > < Ԧ 𝑠 2 ; Ԧ 𝑡 2 > = < 1, −1,1, −1; −1 > • In bipolar representation: Ԧ 𝑥𝑇 Ԧ 𝑥 = 𝑛 where 𝑛 is dimension of Ԧ 𝑥
  • 4. Ex. of 2-class Patterns 4 • Classifying airplanes given their masses and speeds • Construct an NN to classify any type of bomber or fighter 𝐌𝐚𝐬𝐬 Speed 𝐂𝐥𝐚𝐬𝐬 1.0 0.1 Bomber 2.0 0.2 Bomber 0.1 0.3 Fighter 2.0 0.3 Bomber 0.2 0.4 Fighter 3.0 0.4 Bomber 0.1 0.5 Fighter 1.5 0.5 Bomber 0.5 0.6 Fighter 1.6 0.7 Fighter
  • 5. NN Classifier for 2-class Example 5 • Two inputs: masses and speeds • One output neuron for each class • Activation 1: yes • Activation 0: no • Just one output neuron • Activation 1: fighter • Activation 0: bomber • Try the simplest network: a single layer net • Replace the threshold (𝜃) by using a bias (𝑏)
  • 6. 2-class NN Classifier for 2D Data 6 • Using single-layer NN with one output neuron for two classes 𝑦_𝑖𝑛 = 𝑏 + σ𝑖=1 𝑛 𝑥𝑖 𝑤𝑖 = 𝑏 + 𝑤𝑇 Ԧ 𝑥 𝑦 = 𝑓 𝑦_𝑖𝑛 = ቊ 1 𝑖𝑓 𝑦_𝑖𝑛 ≥ 0 −1 𝑖𝑓 𝑦_𝑖𝑛 < 0 Decision boundary: 𝑏 + σ𝑖=1 𝑛 𝑥𝑖 𝑤𝑖 = 0
  • 7. Bias in NN Classifier 7 The role of bias: 𝑦_𝑖𝑛 = 𝑥1𝑤1 + 𝑥2𝑤2 + 𝑏 𝑦 = 𝑓 𝑦_𝑖𝑛 = ቊ 1 if 𝑥1𝑤1 + 𝑥2𝑤2 + 𝑏 ≥ 0 −1 if 𝑥1𝑤1 + 𝑥2𝑤2 + 𝑏 < 0 𝑥1𝑤1 + 𝑥2𝑤2 + 𝑏 = 0 → 𝑥2 = − 𝑤1 𝑤2 𝑥1 − 𝑏 𝑤2 : Decision line
  • 8. Linear Separability and Decision Hyper-planes 8 • If for a classification problem, there are weights so that all positive training patterns lie on side of decision boundary and all negative patterns lie on other side of decision boundary, then problem is linearly separable • For two inputs, decision boundary is 1D straight line in 2D input space • If we have 𝑛 inputs, decision boundary is (𝑛 − 1)D hyper-plane in 𝑛D input space
  • 9. Decision Boundary for AND & OR 9 • For simple logic gate problems, decision boundaries between classes are linear: • Decision boundary: 𝑥1𝑤1 + 𝑥2𝑤2 − 𝜃 = 0
  • 10. Decision Boundary for XOR 10 • For XOR, there are two obvious remedies: • Either change activation function so that it has more than one decision boundary • Use a more complex network that is able to generate more complex decision boundaries
  • 11. Characteristics of NN Classifier 11 Decision boundary is not unique • If a problem is linearly separable, there are many different decision boundary separating positive pattern from negative ones
  • 12. Characteristics of NN Classifier 12 The weights and bias are not unique • For each decision boundary, there are many choices for 𝑤𝑖s and 𝑏 that give exactly the same boundary 𝒔𝟏 𝒔𝟐 𝒕 1 1 1 1 -1 -1 -1 1 -1 -1 -1 -1 𝑥2 = −𝑥1 + 1 𝑥2 = − 𝑤1 𝑤2 𝑥1 − 𝑏 𝑤2 𝑤1 = 𝑤2 = −𝑏
  • 13. General Decision Boundaries 13 Generally, we wish NNs: • To deal with input patterns that are not binary • To form complex decision boundaries • To classify inputs into many classes • Also, to produce outputs for input patterns that were not originally set up to classify • Shown with question marks • Their classes may be incorrect
  • 14. Memorization and Generalization 14 Two important aspects of network’s operation: • Memorization: • The network must learn decision surfaces from a set of training patterns so that these training patterns are classified correctly (are memorized) • Generalization: • The network must also be able to correctly classify test patterns (sufficiently similar to training patterns) it has never seen before (to generalize) • A good NN can memorize well; also, can generalize well
  • 15. Memorization and Generalization 15 • Sometimes, training data may contain errors: • Noise in experimental determination of input values • Incorrect classifications • In this case, learning training data perfectly may make the generalization worse • There is an important trade-off between memorization and generalization that arises quite generally
  • 16. Generalization in Classification 16 • An NN wants to learn a classification decision boundary • The aim is to generalize such that it can classify new inputs appropriately • If training data contains noise, no necessarily need whole training data to be classified accurately as it is likely to reduce generalization ability
  • 17. Generalization in Function Approximation 17 • An NN wants to recover a function for which only noisy data samples exist • NN is expected: • To give a better representation of underlying function if its output curve does not pass through all data points • To allow a larger error on training data as is likely to lead to better generalization
  • 18. Pattern Representation in Classification 18 Binary vs. bipolar representation: In a simple net, form of data representation may change a solvable problem with a non-solvable one Binary: ቊ 1 positive 0 negetive Bipolar:ቐ +1 positive 0 missing −1 negetive • Binary representation is not as good as bipolar in generalization • Using bipolar input, missing data can be distinguished from mistaken data