ECE 471/571 – Lecture 21 Syntactic Pattern Recognition 11/19/15.

Slides:



Advertisements
Similar presentations
Natural Language Processing - Formal Language - (formal) Language (formal) Grammar.
Advertisements

CFGs and PDAs Sipser 2 (pages ). Long long ago…
Grammars, Languages and Parse Trees. Language Let V be an alphabet or vocabulary V* is set of all strings over V A language L is a subset of V*, i.e.,
Chapter Chapter Summary Languages and Grammars Finite-State Machines with Output Finite-State Machines with No Output Language Recognition Turing.
CFGs and PDAs Sipser 2 (pages ). Last time…
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 4 Context-free grammars Jan Maluszynski, IDA, 2007
Chapter 3: Formal Translation Models
Syntactic Pattern Recognition Statistical PR:Find a feature vector x Train a system using a set of labeled patterns Classify unknown patterns Ignores relational.
1 Introduction to Parsing Lecture 5. 2 Outline Regular languages revisited Parser overview Context-free grammars (CFG’s) Derivations.
Formal Grammars Denning, Sections 3.3 to 3.6. Formal Grammar, Defined A formal grammar G is a four-tuple G = (N,T,P,  ), where N is a finite nonempty.
Lecture 16 Oct 18 Context-Free Languages (CFL) - basic definitions Examples.
Introduction Syntax: form of a sentence (is it valid) Semantics: meaning of a sentence Valid: the frog writes neatly Invalid: swims quickly mathematics.
BİL 744 Derleyici Gerçekleştirimi (Compiler Design)1 Syntax Analyzer Syntax Analyzer creates the syntactic structure of the given source program. This.
Context-free Grammars Example : S   Shortened notation : S  aSaS   | aSa | bSb S  bSb Which strings can be generated from S ? [Section 6.1]
Grammars CPSC 5135.
Languages & Grammars. Grammars  A set of rules which govern the structure of a language Fritz Fritz The dog The dog ate ate left left.
Lecture # 9 Chap 4: Ambiguous Grammar. 2 Chomsky Hierarchy: Language Classification A grammar G is said to be – Regular if it is right linear where each.
Phrase-structure grammar A phrase-structure grammar is a quadruple G = (V, T, P, S) where V is a finite set of symbols called nonterminals, T is a set.
Regular Grammars Chapter 7. Regular Grammars A regular grammar G is a quadruple (V, , R, S), where: ● V is the rule alphabet, which contains nonterminals.
Grammar G = (V N, V T, P, S) –V N : Nonterminal symbols –V T : Terminal symbols V N  V T = , V N ∪ V T = V – P : a finite set of production rules α 
CMSC 330: Organization of Programming Languages Context-Free Grammars.
Parsing Introduction Syntactic Analysis I. Parsing Introduction 2 The Role of the Parser The Syntactic Analyzer, or Parser, is the heart of the front.
Regular Grammars Chapter 7 1. Regular Grammars A regular grammar G is a quadruple (V, , R, S), where: ● V is the rule alphabet, which contains nonterminals.
ECE 471/571 – Lecture 2 Bayesian Decision Theory 08/25/15.
ECE 471/571 – Lecture 6 Dimensionality Reduction – Fisher’s Linear Discriminant 09/08/15.
1 A well-parenthesized string is a string with the same number of (‘s as )’s which has the property that every prefix of the string has at least as many.
1 Simplification of Context-Free Grammars Some useful substitution rules. Removing useless productions. Removing -productions. Removing unit-productions.
9.7: Chomsky Hierarchy.
Re-enter Chomsky More about grammars. 2 Parse trees S  A B A  aA | a B  bB | b Consider L = { a m b n | m, n > 0 } (one/more a ’s followed by one/more.
ECE 471/571 - Lecture 19 Review 11/12/15. A Roadmap 2 Pattern Classification Statistical ApproachNon-Statistical Approach SupervisedUnsupervised Basic.
CSC312 Automata Theory Lecture # 26 Chapter # 12 by Cohen Context Free Grammars.
Programming Languages and Design Lecture 2 Syntax Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Regular Grammars Reading: 3.3. What we know so far…  FSA = Regular Language  Regular Expression describes a Regular Language  Every Regular Language.
Formal Languages and Grammars
Context Free Grammars and Regular Grammars Needs for CFG Grammars and Production Rules Context Free Grammars (CFG) Regular Grammars (RG)
ECE 471/571 – Lecture 3 Discriminant Function and Normal Density 08/27/15.
1 A well-parenthesized string is a string with the same number of (‘s as )’s which has the property that every prefix of the string has at least as many.
20 G M aaba acba aaba.. What is it about? Models of Language Generation Models of Language Recognition.
PROGRAMMING LANGUAGES
Language Recognition MSU CSE 260.
Syntactic Pattern Recognition 04/28/17
ECE 471/571 - Lecture 19 Review 02/24/17.
Nonparametric Density Estimation – k-nearest neighbor (kNN) 02/20/17
David Rodriguez-Velazquez CS – 6800 Summer I
Performance Evaluation 02/15/17
Complexity and Computability Theory I
Natural Language Processing - Formal Language -
CS314 – Section 5 Recitation 3
ECE 471/571 – Lecture 18 Classifier Fusion 04/12/17.
Unsupervised Learning - Clustering 04/03/17
Unsupervised Learning - Clustering
Regular Grammar.
Chapter 7 Regular Grammars
ECE 471/571 – Lecture 12 Perceptron.
ECE 471/571 – Review 1.
Parametric Estimation
Hairong Qi, Gonzalez Family Professor
ECE – Pattern Recognition Lecture 16: NN – Back Propagation
ECE – Pattern Recognition Lecture 13 – Decision Tree
Hairong Qi, Gonzalez Family Professor
Hairong Qi, Gonzalez Family Professor
ECE – Lecture 1 Introduction.
ECE – Pattern Recognition Lecture 10 – Nonparametric Density Estimation – k-nearest-neighbor (kNN) Hairong Qi, Gonzalez Family Professor Electrical.
Bayesian Decision Theory
Hairong Qi, Gonzalez Family Professor
ECE – Pattern Recognition Lecture 8 – Performance Evaluation
ECE – Pattern Recognition Lecture 4 – Parametric Estimation
Hairong Qi, Gonzalez Family Professor
ECE – Pattern Recognition Lecture 14 – Gradient Descent
ECE – Pattern Recognition Midterm Review
Presentation transcript:

ECE 471/571 – Lecture 21 Syntactic Pattern Recognition 11/19/15

Recap 2 Pattern Classification Statistical ApproachNon-Statistical Approach SupervisedUnsupervised Basic concepts: Distance Agglomerative method Basic concepts: Baysian decision rule (MPP, LR, Discri.) Parameter estimate (ML, BL) Non-Parametric learning (kNN) LDF (Perceptron) k-means Winner-take-all Kohonen maps Dimensionality Reduction FLD, PCA Performance Evaluation ROC curve ( TP, TN, FN, FP ) cross validation Classifier Fusion majority voting NB, BKS Stochastic Methods local opt (GD, EM) global opt (SA, GA) Decision-tree Syntactic approach NN (BP, Hopfield, DL) Support Vector Machine

3 Key Concept If we can draw it (automatically), then we can recognize it Based on formal language

4 Philosophy A grammar generates a (possibly infinite) set of strings (pictures) If we can design a grammar which generates a class of strings, then we can build a machine which will recognize any string in that class

5 Types of Grammars - Symbols V N : the set of non-terminal symbols V T : the set of terminal symbols P: the set of rewriting rules (productions) S: the start symbol : the empty (null) symbol

6 Type 0 Grammar No restrictions on rewriting rules The string  (whenever it occurs in a deviation) may be replaced by the string 

7 Type 1 – Context Sensitive

8 Type 2 – Context Free Left side must be a single non-terminal Example A   S  0S1 S  01

9 Type 3 - Regular A  aB, or A  a A and B are single non-terminal Is a regular grammar also context-free?

10 Example Describe two types of chromosomes for recognition (submedian chromosome and telocentric chromosome) Chromosome is represented as a string, obtained by tracing the outline in clockwise direction Pattern primitives = terminal symbols

11 Example (cont ’ ) Grammar for recognition of submedian and telocentric chromosomes G = (V N, V T, P, S) Non-terminals V N = {S, S 1 *, S 2 *, A, B, C, D, E, F} S – start symbol S 1 * – submedian chromosome S 2 * – telocentric chromosome A – armpair, B – bottom, C – side, D – arm, E – rightpart, F - leftpart

12 Example (cont ’ ) Production (rewriting rules) S  S 1 *B  eS  S2*C  bC S 1 *  AAC  CbS 2 *  BAC  b A  CAC  dA  ACD  bD A  DED  DbA  FDD  a B  bDE  cDB  BbF  Dc

13 Example (cont ’ ) S  S 1 *  AA  ACA  FDCA  DcDCA  bDcDCA  bDbcDCA  babcDCA  babcbDCA  babcbDbCA  babcbabCA  babcbabdA  babcbabdAC  babcbabdDEC  babcbabdaEC  babcbabdacDC  babcbabdacaC  babcbabdacad babcbabdacad ebabcbab

14 Finite State Machine A regular expression determines a finite-state machine 0(010)*1 S  A, A  0B, B  0C, C  1D, D  0B, B  1

15 Recognition of Abnormal ECG Regular grammar G = ({S, A, B, C, D, E, H}, {p, r, t, b}, P, S) Productions: S  pA, A  rB, B  bC, C  tD, D  b, D  bE, E  b, E  bH, E  pA, H  b, H  bS, H  pA p r b t b b b

16 ECG (cont ’ ) Example of derivation of a well formed ECG wave: S  pA  prB  prbC  prbtD  prbtbE  prbtbbH  prbtbbbS  prbtbbbpA  prbtbbbprB  prbtbbbprbC  prbtbbbprbtD  prbtbbbprbtbE  prbtbbbprbtbb  … etc. Note possibility of variable number of “ b ’ s ” One to three to accommodate normal variations of heart rate

17 The FSM S ABCD E H p rb t bb b b b p p b FSM