KEMBAR78
Pattern Recognition: Tutorial 2 | PDF | Pattern Recognition | Statistical Classification
0% found this document useful (0 votes)
82 views23 pages

Pattern Recognition: Tutorial 2

This document outlines the agenda and content for Pattern Recognition Tutorial 2 taught by Aly Osama. The tutorial covers rules and attendance, a lab experiment on pattern recognition tools and algorithms, solving practice problems, and an assignment estimating probabilities. Students will use datasets to train and test classifiers, run experiments with different data splits, and implement a Gaussian Bayes classifier model.

Uploaded by

Wai Kit Kong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views23 pages

Pattern Recognition: Tutorial 2

This document outlines the agenda and content for Pattern Recognition Tutorial 2 taught by Aly Osama. The tutorial covers rules and attendance, a lab experiment on pattern recognition tools and algorithms, solving practice problems, and an assignment estimating probabilities. Students will use datasets to train and test classifiers, run experiments with different data splits, and implement a Gaussian Bayes classifier model.

Uploaded by

Wai Kit Kong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

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

X1 X2 X3 X4 Y
Feature 1 Feature 2 Feature 3 Feature 4 Class(Label)
2 1 3 7 1
3 2 1 2 2
Dataset
41 1 44 2 1
61 3 1 5 1
14 51 5 9 2

Pattern Recognition | Tutorial 2 | Aly Osama 4


2. Lab Configuration – Experiment Accuracy

Y
Training Pattern (Predicted Class) Calculate
Dataset Recognition Model Error
75% Algorithm

Dataset

25% X(Feature Vector)


Testing
Dataset
Y
(Real Class)

Pattern Recognition | Tutorial 2 | Aly Osama 5


2. Lab Configuration – Algorithm
As Example
Naive Bayes Classifier

Assign x to W2 if :
Pattern
Recognition
Algorithm

Given
• X: given data
• W1,W2 Two classes

Pattern Recognition | Tutorial 2 | Aly Osama 6


2. Lab Configuration – Gaussian Bayes Classifier

Ex: Gaussian

Loss Matrix Probability of Classes


Given Unknown
Unknown
• Mean of Data
• Standard Deviation

Calculated from your dataset

Pattern Recognition | Tutorial 2 | Aly Osama 7


2. Lab Configuration – Bayes Experiment Accuracy

Bayes Classifier Y
Training 1. Probability (Predicted Class) Calculate
75% Dataset 2. Expectation Model Error
3. Standard
Deviation

Dataset

25% Testing X(Feature Vector)


Dataset
Y
(Real Class)

Pattern Recognition | Tutorial 2 | Aly Osama 8


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/

We will tell you What to do


But you have to know How to do it

Pattern Recognition | Tutorial 2 | Aly Osama 9


Time to code!

Pattern Recognition | Tutorial 2 | Aly Osama 10


15 Minutes
2.3. Lab Experiment

Time to code!

Pattern Recognition | Tutorial 2 | Aly Osama 11


1 Hour

3. Tutorial

Pattern Recognition | Tutorial 2 | Aly Osama 12


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
???

Estimating Probabilities

Pattern Recognition | Tutorial 2 | Aly Osama 20


Tasks 3 Due date 22-10-2016

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


References

■ Pattern Classification, 2nd Edition Duda & Hart


■ Machine Learning, Tom Mitchell: Estimating Probabilities

Pattern Recognition | Tutorial 2 | Aly Osama 22


alyosamah@gmail.com

Pattern Recognition | Tutorial 2 | Aly Osama 23

You might also like