chapter 1: introduction to pattern recognition (sections 1...

31
2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction to Pattern Recognition (Sections 1.1-1.6) Machine Perception An Example Pattern Recognition Systems The Design Cycle Learning and Adaptation Conclusion

Upload: others

Post on 01-Jun-2020

18 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 1

Chapter 1: Introduction to

Pattern Recognition

(Sections 1.1-1.6)

Machine Perception

An Example

Pattern Recognition Systems

The Design Cycle

Learning and Adaptation

Conclusion

Page 2: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 2

Machine Perception

Build a machine that can recognize patterns:

Speech recognition

Fingerprint identification

OCR (Optical Character Recognition)

DNA sequence identification

Page 3: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 3

An Example

“Sorting incoming Fish on a conveyor

according to species using optical sensing”

Sea bass (黑鱸魚)

Species

Salmon (鮭魚)

Page 4: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 4

Problem Analysis

Set up a camera and take some sample images to

extract features

Length

Lightness

Width

Number and shape of fins

Position of the mouth, etc…

This is the set of all suggested features to explore for use in

our classifier!

Page 5: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 5

Preprocessing

Use a segmentation operation to isolate fishes from

one another and from the background

Information from a single fish is sent to a feature

extractor whose purpose is to reduce the data by

measuring certain features

The features are passed to a classifier

Page 6: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 6

Page 7: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 7

Classification

Select the length of the fish as a possible feature

for discrimination

Page 8: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 8

Page 9: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 9

The length is a poor feature alone!

Select the lightness as a possible feature.

Page 10: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 10

Page 11: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 11

Threshold decision boundary and cost relationship

For sea bass class, move our decision boundary

toward smaller values of lightness in order to minimize

the cost (reduce the number of sea bass that are

classified salmon!)

Task of decision theory

Page 12: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 12

Adopt the lightness and add the width of the

fish

Fish xT = [x1, x2]

Lightness Width

Page 13: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 13

Page 14: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 14

We might add other features that are not

correlated with the ones we already have.

A precaution should be taken not to reduce the

performance by adding such “noisy features”

Ideally, the best decision boundary should be the

one which provides an optimal performance such

as in the following figure:

Page 15: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 15

Page 16: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

Fig. 5

2014/2/18 YunTech EE Pattern Recognition 16

Instead of using a complex decision boundary, we might seek

to simplify the recognizer, motivated by a belief that the

underlying models will not require a decision boundary that is

as complex as that in Fig. 5

Page 17: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 17

However, our satisfaction is premature

because the central aim of designing a

classifier is to correctly classify novel input

Issue of generalization!

Page 18: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 18

Fig. 1.6 The decision boundary shown might represent the optimal

tradeoff between performance on the training set and simplicity of

classifier, thereby giving the highest accuracy on new patterns.

Page 19: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 19

1.3 Pattern Recognition Systems

Sensing

Use of a transducer (camera or microphone)

PR system depends of the bandwidth and the

resolution sensitivity distortion of the transducer

Segmentation and grouping

Patterns should be well separated and should not

overlap

Page 20: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 20

Page 21: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 21

Feature extraction

Discriminative features

Invariant features with respect to translation, rotation,

and scale.

Classification

Use a feature vector provided by a feature extractor to

assign the object to a category

Post Processing

Exploit context input dependent information other than

from the target pattern itself to improve performance

Page 22: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 22

The Design Cycle

Data collection

Feature Choice

Model Choice

Training

Evaluation

Computational Complexity

Page 23: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 23

Page 24: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 24

Data Collection

How do we know when we have collected an

adequately large and representative set of

examples for training and testing the system?

Page 25: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 25

Depends on the characteristics of the

problem domain

Simple to extract

Invariant to irrelevant transformation

Insensitive to noise

Feature Choice

Page 26: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 26

Model Choice

Unsatisfied with the performance of our fish

classifier and want to jump to another class of

model

Page 27: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 27

Training

Use data to determine the classifier

Many different procedures for training classifiers

and choosing models

Page 28: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 28

Evaluation

Measure the error rate (or performance) and

switch from one set of features to another one

Page 29: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 29

Computational Complexity

What is the trade-off between computational ease

and performance?

How an algorithm scales as a function of the

number of features, patterns, or categories?

Page 30: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 30

1.5 Learning and Adaptation

Supervised learning A teacher provides a category label or cost for each pattern

in the training set

Unsupervised learning The system forms clusters or “natural groupings” of the

input patterns

Reinforcement learning No desired category signal is given

Only teaching feedback tentative category is right or wrong

Page 31: Chapter 1: Introduction to Pattern Recognition (Sections 1 ...teacher.yuntech.edu.tw/htchang/PR1022-DHSch1.pdf · 2014/2/18 YunTech EE Pattern Recognition 1 Chapter 1: Introduction

2014/2/18 YunTech EE Pattern Recognition 31

Conclusion

Reader seems to be overwhelmed by the

number, complexity and magnitude of the

sub-problems of Pattern Recognition

Many of these sub-problems can indeed be

solved

Mathematical theories solving some of these

problems have in fact been discovered

Many fascinating unsolved problems still

remain