lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

index.md (3767B)


      1 +++
      2 title = 'Classification'
      3 +++
      4 # Classification
      5 a pattern is an entity vaguely defined, that could be given a name.
      6 recognition is identification of pattern as member of a category
      7 
      8 ## Types of pattern recognition (classification) systems
      9 
     10 - speech recognition:
     11 
     12     1. PC card converts analog waves from mic into digital format
     13     2. acoustical model breaks the word into phonemes
     14     3. language model compares phonemes to words in built-in dictionary
     15     4. software decides on what spoken word was and displays best match
     16 
     17 - brain-computer interface that acquires signals directly from the brain
     18 - gesture recognition using acceleration magnitude from watch
     19 - image recognition
     20 
     21 ## Classification (known categories)
     22 
     23 - given a few classes, each item belongs to one class
     24 - objects are described by features
     25 - system needs a training set (both positive and negative examples)
     26 - if a new item comes, its features are measured and the system decides which class it belongs to
     27 
     28 ![screenshot.png](b7159d61e48e0091c9bcc952dbdd9472.png)
     29 
     30 Components:
     31 
     32 - Sensing module
     33 - Preprocessing mechanism
     34 - Feature extraction mechanism
     35 - Classifier
     36 - Training set of already classified examples
     37 
     38 ### Building a pattern recognition system
     39 
     40 1. Choose features, define classes (e.g. coins 10 cent, 20 cent, 50 cent, 1$, 2$)
     41 
     42     - features need to have discriminative power
     43     - not too many, but enough to reliably separate classes based on them
     44     - e.g. coins colour and diameter
     45     - algorithms
     46         - simple: rule-based activity recognition (If…And/Or…Then)
     47         - complicated: machine learning decision trees, HMM, neural networks
     48 
     49 2. Extract features
     50 
     51     - image recognition
     52         - shape decriptors
     53             - form factor (round object has 1, others smaller)
     54             - Euler number (number of objects minus number of holes in objects)
     55             - perimeter, area, roundness ratio…
     56         - preprocessing
     57             - binarisation, morphological operators, segmentation
     58         - extract features (e.g. area, coordinates of centre of mass)
     59         - optical character recognition (OCR)
     60             - converts image into machine readable text
     61             - uses statistical moments (total mass, centroid, elliptical parameters, etc.)
     62             - invariant moments of Hu
     63     - sound recognition
     64         - features
     65             - frequency spectrum
     66             - spectrograms
     67             - Mel cepstrum coefficients — FFT to Log(|x|) to IFFT results in cepstrum
     68         - vowels recognition: second formant vs first formant frequency for vowels (significant freqs)
     69 
     70 3. Train the classifier
     71 4. Evaluate the performance of classification
     72 
     73 ### Classifiers
     74 #### Rule-based: if-then-else
     75 
     76 - exhaustive, mutually exclusive rules
     77 - works well if there aren’t too many features
     78 
     79 #### Template-matching: a set of reference patterns is available, match an unknown using nearest-neighbour
     80 
     81 get a fingerprint for a specific signal, using FFT (freq. spectrum) or Mel cepstrum coefficients
     82 
     83 train with various words, store fingerprints, and then apply
     84 two approaches:
     85 
     86 - maximum correlation
     87 - minimum error — calculate Euclidian distance between vectors
     88 
     89 #### Neural networks:
     90 synapses are weights
     91 
     92 output is binary, depends on comparison between weighted sum of inputs and threshold θ
     93 
     94 a neuron has:
     95 
     96 - set of weighted inputs — dendrites+synapses
     97 - an adder — soma
     98 - an activation function to decide whether or not the neuron fires
     99 
    100 a neuron cannot learn, but a perceptron can. by changing the weights which are adjustable.
    101 
    102 neural networks are collections of artificial neurons, and have hidden layers.
    103 
    104 they learn by testing output against desired output and adjusting weights accordingly.
    105 
    106 ![screenshot.png](4f6a745e243088e8189c73f7eca571a0.png)