Upload
aly-osama
View
183
Download
6
Embed Size (px)
Citation preview
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
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