SlideShare a Scribd company logo
PATTERN
RECOGNITION
Tutorial 2
Aly Osama
15-10-2016
Agenda
■ Rules and Attendance
■ Lab
– Lab Configuration
– Lab Tools
– Lab Experiment
■ Tutorial
– Solve Sheet 1 “ Problem 2 and 4”
■ 15 Minutes In Deep
– Estimating Probabilities
Pattern Recognition | Tutorial 2 | Aly Osama 2
1. Rules and Attendance
■ Tutorial Starts 11:00 - Ends 1:10
■ I will start at 11:05
■ Attendance at 11:08
■ Allowance Until 11:10
Pattern Recognition | Tutorial 2 | Aly Osama 3
2. Lab Configuration - Dataset
Pattern Recognition | Tutorial 2 | Aly Osama 4
Dataset
Feature 1 Feature 2 Feature 3 Feature 4 Class(Label)
2 1 3 7 1
3 2 1 2 2
41 1 44 2 1
61 3 1 5 1
14 51 5 9 2
X2X1 X3 X4 Y
2. Lab Configuration – Experiment
Pattern Recognition | Tutorial 2 | Aly Osama 5
Dataset
Training
Dataset
Testing
Dataset
75%
25%
Pattern
Recognition
Algorithm
Model
X(Feature Vector)
Calculate
Error
Y
(Real Class)
Accuracy
Y
(Predicted Class)
2. Lab Configuration – Algorithm
Pattern Recognition | Tutorial 2 | Aly Osama 6
Pattern
Recognition
Algorithm
As Example
Naive Bayes Classifier
Assign x to W2 if :
Given
• X: given data
• W1,W2 Two classes
2. Lab Configuration – Gaussian Bayes Classifier
Pattern Recognition | Tutorial 2 | Aly Osama 7
Unknown
• Mean of Data
• Standard Deviation
Loss Matrix Probability of Classes
Given
Ex: Gaussian
Unknown
Calculated from your dataset
2. Lab Configuration – Bayes Experiment
Pattern Recognition | Tutorial 2 | Aly Osama 8
Dataset
Training
Dataset
Testing
Dataset
75%
25%
Bayes Classifier
1. Probability
2. Expectation
3. Standard
Deviation
Model
X(Feature Vector)
Calculate
Error
Y
(Real Class)
Accuracy
Y
(Predicted Class)
2.2. Lab Tools
1. Select Dataset from UCI Machine Learning Repo
– https://archive.ics.uci.edu/ml/index.html
2. Install Matlab with PR Toolbox or Python with Scikit-learn
– PR Toolbox :
■ https://drive.google.com/drive/folders/0B9lOqlIVVRRIOF9VVFBtNHU4bEk?usp=drive_web
– Scikit Learn :
■ http://scikit-learn.org/
Pattern Recognition | Tutorial 2 | Aly Osama 9
We will tell you What to do
But you have to know How to do it
Pattern Recognition | Tutorial 2 | Aly Osama 10
Time to code!
2.3. Lab Experiment
Pattern Recognition | Tutorial 2 | Aly Osama 11
15 Minutes
Time to code!
3. Tutorial
Pattern Recognition | Tutorial 2 | Aly Osama 12
1 Hour
3. Tutorial – Problem 2
Pattern Recognition | Tutorial 2 | Aly Osama 13
3. Tutorial – Solution 2
Pattern Recognition | Tutorial 2 | Aly Osama 14
3. Tutorial – Solution 2
Pattern Recognition | Tutorial 2 | Aly Osama 15
3. Tutorial – Solution 2
Pattern Recognition | Tutorial 2 | Aly Osama 16
3. Tutorial – Problem 4
Pattern Recognition | Tutorial 2 | Aly Osama 17
3. Tutorial – Solution 4
Pattern Recognition | Tutorial 2 | Aly Osama 18
3. Tutorial – Solution 4
Pattern Recognition | Tutorial 2 | Aly Osama 19
4. 15 Minutes In Deep
Pattern Recognition | Tutorial 2 | Aly Osama 20
Estimating Probabilities
???
Tasks 3
1. Quick Presentation ( 2 Minutes )
2. Try to run different random/un random splits for ( Training and Testing ) datasets
1. 75%, 25%
2. 60%, 30%
3. 50%, 50 %
3. Perform Gaussian Bayes Classifier
4. Compare your results – Report -
Pattern Recognition | Tutorial 2 | Aly Osama 21
Due date 22-10-2016
References
■ Pattern Classification, 2nd Edition Duda & Hart
■ Machine Learning, Tom Mitchell: Estimating Probabilities
Pattern Recognition | Tutorial 2 | Aly Osama 22
Pattern Recognition | Tutorial 2 | Aly Osama 23
alyosamah@gmail.com

More Related Content

PPT
Pattern Recognition
PDF
Introduction to pattern recognition
PPT
Pattern recognition
PDF
Java for android developers
PDF
Android Udacity Study group 1
PPTX
Pattern recognition and Machine Learning.
PPTX
Pattern Recognition
PPT
Pattern Recognition and its Applications
Pattern Recognition
Introduction to pattern recognition
Pattern recognition
Java for android developers
Android Udacity Study group 1
Pattern recognition and Machine Learning.
Pattern Recognition
Pattern Recognition and its Applications

Viewers also liked (19)

PDF
Imagining the Web of Things
PPTX
Web of things introduction
PPTX
Pattern recognition for technical communicators
PPT
The Web of Things in Practice
PPTX
Optimizing Apps for Better Performance
PPTX
Optimizing apps for better performance extended
PDF
Project Analysis - How to Start Project Develoment
PDF
Workshop on Search Engine Optimization
PDF
App indexing api
PDF
Workhsop on Logic Building for Programming
PPTX
Hack'n Break Android Workshop
PPTX
Android development session 3 - layout
PPTX
Overview of DroidCon UK 2015
PPTX
What's new in Android at I/O'16
PDF
Lecture 04. Mobile App Design
PDF
Android development session 4 - Fragments
PDF
Fundamental of android
PDF
Working better together designers & developers
PPTX
Workshop Android for Java Developers
Imagining the Web of Things
Web of things introduction
Pattern recognition for technical communicators
The Web of Things in Practice
Optimizing Apps for Better Performance
Optimizing apps for better performance extended
Project Analysis - How to Start Project Develoment
Workshop on Search Engine Optimization
App indexing api
Workhsop on Logic Building for Programming
Hack'n Break Android Workshop
Android development session 3 - layout
Overview of DroidCon UK 2015
What's new in Android at I/O'16
Lecture 04. Mobile App Design
Android development session 4 - Fragments
Fundamental of android
Working better together designers & developers
Workshop Android for Java Developers
Ad

More from Aly Abdelkareem (14)

PDF
An Inductive inference Machine
PPTX
Digital Image Processing - Frequency Filters
PPTX
Deep learning: Overfitting , underfitting, and regularization
PDF
Practical Digital Image Processing 5
PDF
Practical Digital Image Processing 4
PDF
Practical Digital Image Processing 3
PDF
Pattern recognition 4 - MLE
PDF
Practical Digital Image Processing 2
PDF
Practical Digital Image Processing 1
PDF
Machine Learning for Everyone
PDF
How to use deep learning on biological data
PDF
Deep Learning using Keras
PPTX
Object extraction from satellite imagery using deep learning
PDF
Introduction to Android Development
An Inductive inference Machine
Digital Image Processing - Frequency Filters
Deep learning: Overfitting , underfitting, and regularization
Practical Digital Image Processing 5
Practical Digital Image Processing 4
Practical Digital Image Processing 3
Pattern recognition 4 - MLE
Practical Digital Image Processing 2
Practical Digital Image Processing 1
Machine Learning for Everyone
How to use deep learning on biological data
Deep Learning using Keras
Object extraction from satellite imagery using deep learning
Introduction to Android Development
Ad

Recently uploaded (20)

PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Welding lecture in detail for understanding
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Digital Logic Computer Design lecture notes
PPTX
Foundation to blockchain - A guide to Blockchain Tech
DOCX
573137875-Attendance-Management-System-original
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
UNIT 4 Total Quality Management .pptx
PPT
Mechanical Engineering MATERIALS Selection
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
OOP with Java - Java Introduction (Basics)
Welding lecture in detail for understanding
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Digital Logic Computer Design lecture notes
Foundation to blockchain - A guide to Blockchain Tech
573137875-Attendance-Management-System-original
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
UNIT 4 Total Quality Management .pptx
Mechanical Engineering MATERIALS Selection
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
CYBER-CRIMES AND SECURITY A guide to understanding
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
CH1 Production IntroductoryConcepts.pptx
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf

Pattern recognition Tutorial 2

  • 2. Agenda ■ Rules and Attendance ■ Lab – Lab Configuration – Lab Tools – Lab Experiment ■ Tutorial – Solve Sheet 1 “ Problem 2 and 4” ■ 15 Minutes In Deep – Estimating Probabilities Pattern Recognition | Tutorial 2 | Aly Osama 2
  • 3. 1. Rules and Attendance ■ Tutorial Starts 11:00 - Ends 1:10 ■ I will start at 11:05 ■ Attendance at 11:08 ■ Allowance Until 11:10 Pattern Recognition | Tutorial 2 | Aly Osama 3
  • 4. 2. Lab Configuration - Dataset Pattern Recognition | Tutorial 2 | Aly Osama 4 Dataset Feature 1 Feature 2 Feature 3 Feature 4 Class(Label) 2 1 3 7 1 3 2 1 2 2 41 1 44 2 1 61 3 1 5 1 14 51 5 9 2 X2X1 X3 X4 Y
  • 5. 2. Lab Configuration – Experiment Pattern Recognition | Tutorial 2 | Aly Osama 5 Dataset Training Dataset Testing Dataset 75% 25% Pattern Recognition Algorithm Model X(Feature Vector) Calculate Error Y (Real Class) Accuracy Y (Predicted Class)
  • 6. 2. Lab Configuration – Algorithm Pattern Recognition | Tutorial 2 | Aly Osama 6 Pattern Recognition Algorithm As Example Naive Bayes Classifier Assign x to W2 if : Given • X: given data • W1,W2 Two classes
  • 7. 2. Lab Configuration – Gaussian Bayes Classifier Pattern Recognition | Tutorial 2 | Aly Osama 7 Unknown • Mean of Data • Standard Deviation Loss Matrix Probability of Classes Given Ex: Gaussian Unknown Calculated from your dataset
  • 8. 2. Lab Configuration – Bayes Experiment Pattern Recognition | Tutorial 2 | Aly Osama 8 Dataset Training Dataset Testing Dataset 75% 25% Bayes Classifier 1. Probability 2. Expectation 3. Standard Deviation Model X(Feature Vector) Calculate Error Y (Real Class) Accuracy Y (Predicted Class)
  • 9. 2.2. Lab Tools 1. Select Dataset from UCI Machine Learning Repo – https://archive.ics.uci.edu/ml/index.html 2. Install Matlab with PR Toolbox or Python with Scikit-learn – PR Toolbox : ■ https://drive.google.com/drive/folders/0B9lOqlIVVRRIOF9VVFBtNHU4bEk?usp=drive_web – Scikit Learn : ■ http://scikit-learn.org/ Pattern Recognition | Tutorial 2 | Aly Osama 9 We will tell you What to do But you have to know How to do it
  • 10. Pattern Recognition | Tutorial 2 | Aly Osama 10 Time to code!
  • 11. 2.3. Lab Experiment Pattern Recognition | Tutorial 2 | Aly Osama 11 15 Minutes Time to code!
  • 12. 3. Tutorial Pattern Recognition | Tutorial 2 | Aly Osama 12 1 Hour
  • 13. 3. Tutorial – Problem 2 Pattern Recognition | Tutorial 2 | Aly Osama 13
  • 14. 3. Tutorial – Solution 2 Pattern Recognition | Tutorial 2 | Aly Osama 14
  • 15. 3. Tutorial – Solution 2 Pattern Recognition | Tutorial 2 | Aly Osama 15
  • 16. 3. Tutorial – Solution 2 Pattern Recognition | Tutorial 2 | Aly Osama 16
  • 17. 3. Tutorial – Problem 4 Pattern Recognition | Tutorial 2 | Aly Osama 17
  • 18. 3. Tutorial – Solution 4 Pattern Recognition | Tutorial 2 | Aly Osama 18
  • 19. 3. Tutorial – Solution 4 Pattern Recognition | Tutorial 2 | Aly Osama 19
  • 20. 4. 15 Minutes In Deep Pattern Recognition | Tutorial 2 | Aly Osama 20 Estimating Probabilities ???
  • 21. Tasks 3 1. Quick Presentation ( 2 Minutes ) 2. Try to run different random/un random splits for ( Training and Testing ) datasets 1. 75%, 25% 2. 60%, 30% 3. 50%, 50 % 3. Perform Gaussian Bayes Classifier 4. Compare your results – Report - Pattern Recognition | Tutorial 2 | Aly Osama 21 Due date 22-10-2016
  • 22. References ■ Pattern Classification, 2nd Edition Duda & Hart ■ Machine Learning, Tom Mitchell: Estimating Probabilities Pattern Recognition | Tutorial 2 | Aly Osama 22
  • 23. Pattern Recognition | Tutorial 2 | Aly Osama 23 alyosamah@gmail.com