lectures.alex.balgavy.eu

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

Classification 2.html (4172B)


      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      3 <html><head><link rel="stylesheet" href="sitewide.css" type="text/css"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta name="exporter-version" content="Evernote Mac 7.5.2 (457164)"/><meta name="altitude" content="1.285988807678223"/><meta name="author" content="Alex Balgavy"/><meta name="created" content="2017-11-27 13:56:22 +0000"/><meta name="latitude" content="52.33301811320457"/><meta name="longitude" content="4.865534911775513"/><meta name="source" content="desktop.mac"/><meta name="updated" content="2017-11-28 10:06:34 +0000"/><title>Classification 2</title></head><body><div>uncertainty is everywhere. probabilistic models look at learning as process of reducing uncertainty.</div><div>probability can be for single variables, but also conditional/posterior — how existing beliefs change in light of new evidence</div><div><br/></div><div><span style="font-weight: bold;">Naive Bayes classifier</span></div><div>given a set of classes, use Bayes rule to get posterior probabilities that object with features belongs to class.</div><div>the class with highest posterior probability is most likely class.</div><div>naive — assuming that elements in feature vector are conditionally independent</div><div><img src="Classification%202.resources/screenshot_1.png" height="75" width="303"/><br/></div><div><br/></div><div><span style="font-weight: bold;">Hidden Markov Model Classifier</span></div><div>works on a set of temporal data (when time is important)</div><div>each clock tick, the system moves to new state (can be the previous one)</div><div>we do not know these states (hidden), but we see observations</div><div>steps:</div><div><ul><li>Train by calculating:</li><ul><li>probability that person is in state x</li><li>transition probability P(xj | xi)</li><li>observation probability P(yi | xi)</li></ul><li>Use HMM as classifier</li><ul><li>given observation y, use Bayes to calculate P(xi | y)</li><li>class with highest P wins</li></ul></ul><div><br/></div></div><div><span style="font-weight: bold;">Unsupervised learning</span></div><div>do not have training sets, explore data and search for naturally occurring patterns and clusters</div><div>once clusters are found we make decisions</div><div>two inputs cluster if their vectors are similar (they are close to each other in feature space)</div><div><br/></div><div><img src="Classification%202.resources/screenshot_3.png" height="344" width="433"/><br/></div><div><br/></div><div><span style="font-weight: bold;">Evaluating classifiers</span></div><div>predictive accuracy — proportion of new, unseen instances that classifies correctly</div><div>classification error — correctly classified or not</div><div>error rate — # of classification errors / # of classifications attempted</div><div>true positives/negatives VS false positives/negatives — false negatives can be most dangerous!</div><div>true positive rate (hit rate) — proportion of positive instances that are correctly classified as positive (TP/(TP+FN))</div><div>false positive rate — negative instances that are erroneously classified as positive (FP/(FP+TN))</div><div>accuracy — percent of correct classifications</div><div><br/></div><div>confusion matrix gives info on how frequently instances were correctly/incorrectly classified. the diagonal is what’s important.</div><div>when writing a report, it’s best to explicitly give the confusion matrix</div><div><img src="Classification%202.resources/screenshot.png" height="244" width="475"/><br/></div><div><br/></div><div>receiver operating characteristics (ROC) graphs</div><div>useful for organising classifiers and visualising their performance</div><div>depict tradeoff between hit rates and false alarm rates over noisy channel</div><div><img src="Classification%202.resources/screenshot_4.png" height="326" width="472"/><img src="Classification%202.resources/screenshot_2.png" height="356" width="405"/><br/></div><div><br/></div><div><br/></div></body></html>