CS 188: Artificial Intelligence Spring Announcements

Similar documents
CS 188: Artificial Intelligence Spring Announcements

Announcements. CS 188: Artificial Intelligence Spring Announcements II. P4: Ghostbusters 2.0. Today. Dynamic Bayes Nets (DBNs)

Announcements. CS 188: Artificial Intelligence Spring Today. P4: Ghostbusters. Exact Inference in DBNs. Dynamic Bayes Nets (DBNs)

Contents TRIGONOMETRIC METHODS PROBABILITY DISTRIBUTIONS

INVESTIGATION 2. What s the Angle?

Chp. 3_4 Trigonometry.notebook. October 01, Warm Up. Pythagorean Triples. Verifying a Pythagorean Triple... Pythagorean Theorem

Performance Comparison of Dynamic Voltage Scaling Algorithms for Hard Real-Time Systems

An Indian Journal FULL PAPER ABSTRACT KEYWORDS. Trade Science Inc. The tennis serve technology based on the AHP evaluation of consistency check

AHP-based tennis service technical evaluation consistency test

Data Compression. Lossless And Lossy Compression. Text Compression. Lossless And Lossy Compression. Lossless compression is essential.

CS 253: Algorithms. LZW Data Compression

Grade 6. Mathematics. Student Booklet SPRING 2011 RELEASED ASSESSMENT QUESTIONS. Record your answers on the Multiple-Choice Answer Sheet.

Working Paper: Reversal Patterns

Listening & Speaking. Grade 1. Supports. instructi GRADE. Develops oral and receptive language. 15- to 20-minute daily activities

Data Compression. Reduces storage space and hence storage cost. Compression ratio = original data size /

The Pythagorean Theorem and Its Converse Is That Right?

bark bark bat bat Multiple Meaning Words: Kindergarten to Grade 2 More Teaching Tools at harsh sound made by a dog

A Measurement Framework for National Key Performance Measures

1 Measurement. What you will learn. World s largest cylindrical aquarium. Australian Curriculum Measurement and Geometry Using units of measurement

ERRATA for Guide for the Development of Bicycle Facilities, 4th Edition (GBF-4)

Chapter 5. Triangles and Vectors

Apply the Law of Sines. You solved right triangles. You will solve triangles that have no right angle.

SUMMER ASSIGNMENT FOR FUNCTIONS/TRIGONOMETRY Due September 7 th

Bicycle wheel and swivel chair

SUMMER ASSIGNMENT FOR FUNCTIONS/TRIGONOMETRY Bring to school the 1 st day of class!

Data Compression. Reduce the size of data. Reduces time to retrieve and transmit data. Compression ratio = original data size/compressed data size

First Aid in School Policy

Why? DF = 1_ EF = _ AC

Small Game Hunter Lead Shot Communication Study. Executive Summary. A cooperative study conducted by:

Chapter 4 Group of Volunteers

MTH 112: Elementary Functions

Open Access Regression Analysis-based Chinese Olympic Games Competitive Sports Strength Evaluation Model Research

Chance. PARAMOUNT LDS 1st & 3rd Ward

2014 Victorian Shooting Championship

2014 WHEAT PROTEIN RESPONSE TO NITROGEN

TECHNICAL BULLETINApril 2016

IGF Research Project N Safer High Heels

Firearm Safety. Links to Topics below XAVIER BECERRA THE SIX BASIC GUN SAFETY RULES. Attorney Genera] The. Six Basic Gun Safety Rules

PROTECTION FROM HAND-ARM TRANSMITTED VIBRATION USING ANTIVIBRATON GLOVES

Right Triangle Trigonometry

2018 Sponsorship Opportunities

EasyStart Guide Works with FitnessBoxingOnline.com and other Boxout Video & Mp3 workouts

Math commonly used in the US Army Pathfinder School

Lesson 8: Application Technology

A Step, Stride and Heading Determination for the Pedestrian Navigation System

The Discussion of this exercise covers the following points: The open-loop Ziegler-Nichols method. The open-loop Ziegler-Nichols method

Graphic Standards Guide

Renewable Energy xxx (2011) 1e10. Contents lists available at SciVerse ScienceDirect. Renewable Energy

2018 Sponsorship Opportunities

A Universal Zombie RPG Add-On

Incremental Dependency Parsing

Nanobiophysical exploration of transthyretin amyloid fibrils Final report

PRESSURE LOSSES DUE TO THE LEAKAGE IN THE AIR DUCTS - A SAFETY PROBLEM FOR TUNNEL USERS?

Lesson 12.1 Right Triangle Trigonometry

1985 BFS CLINICS. BFS Clinic-Assembly in Kamloops, British Columbia. Westsyde High School. Bob Bridges is the Football Coach.

Department of Animal and Aquacultural Sciences, Norwegian University of life Science, PO-Box N-1432 Ås, Norway.

Hot-Air Blowers 12 / / Hot-Air Blowers

Recall that the area of a triangle can be found using the sine of one of the angles.

Bord Dyghtyans Management Board

WASTE ROCK MANAGEMENT AT SANGATTA COAL MINE A CULTURAL CHANGE. By Peter Scott HLA- Envirosciences Pty Limited

Characteristics, Expenditures, and Economic Impact of Resident and Nonresident Hunters and Anglers in North Dakota, , Season and Trends

Starter. The Cosine Rule. What the Cosine Rule is and how to apply it to triangles. I can write down the Cosine Rule from memory.

Lesson 2 PRACTICE PROBLEMS Using Trigonometry in Any Triangle

VB-7253 Series. Application. Features. Applicable Literature

In any right-angle triangle the side opposite to the right angle is called the Label the Hypotenuse in each diagram above.

Name Class Date SAMPLE. Complete the missing numbers in the sequences below. 753, ,982. The area of the shape is approximately cm 2

UNCORRECTED PROOF. Materials and methods

* SEE ANCHOR SCHEDULE SHEET 7

ANNUAL SPECIAL EVENTS SPONSORSHIP

17.3 Find Unknown Side Lengths

How To Demonstrate Guide E24 & E26

BASKETBALL SPEED AND AGILITY

PCT MINIMUM DOCUMENTATION

Apply the Pythagorean Theorem

FOR OWNERS OF HORSE BUSINESSES

An Analysis of the Visual Demands Associated with Aviation Maintenance Inspectors. The Ohio State University College of Optometry, Columbus, OH 2

Workfit -SR, Dual Monitor Short Surface

Bypass Compensator Cartridge, Size 16

Nick Willis Discipline: Middle distance running Specialist events: 800m and 1500m

* LANDING ROLLED CURB SIDEWALK RAMP TYPE R (ROLLED SIDES) * LANDING ** RAMP FULL CURB HEIGHT MAY BE REDUCED TO ACCOMMODATE MAXIMUM SIDE FLARE SLOPE

EMBASSY SWIMMING POOL & FITNESS SUITE Fitness Programme June - September 2017

Minnesota s Wild Turkey Harvest Fall 2016, Spring 2017

APPLICATION OF POLISH CALCIUM SORBENTS IN CARBONATE LOOPING

Sparse, decorrelated odor coding in the mushroom body enhances learned odor discrimination

Multiple Meaning Words: Grade 3 to 5 More Teaching Tools at

THERMOFLO FLUID PUMPS& SYSTEMS THERMOFLO FOR HEATING, COOLING AND WATER SUPPLY APPLICATIONS TO BS7074 SEALED SYSTEMS EXPANSION VESSELS PRESSURIZERS

Regards, David C. Grossman, M.D., M.P.H. Chair, U.S. Preventive Services Task Force

Physics 20 Lesson 11 Relative Motion

Design and Calibration of Submerged Open Channel Flow Measurement Structures: Part 3 - Cutthroat Flumes

Models for Predicting Average Bubble Diameter and Volumetric Bubble Flux in Deep Fluidized Beds

Physics 20 Lesson 12 Relative Motion

Skills Practice Skills Practice for Lesson 4.1

6 TRIGONOMETRY TASK 6.1 TASK 6.2. hypotenuse. opposite. adjacent. opposite. hypotenuse 34. adjacent. opposite. a f

Computación y Sistemas ISSN: Instituto Politécnico Nacional México

400 Series Flat Panel Monitor Arm Rotate Mount Double Pivot P/L

Garden City Community Park - Bike Terrain Park Consultation Process

Right Triangle Trigonometry

RENEWABLE SOFTWARE THE EASY WAY

St Ac Ex Sp TOPICS (Text and Practice Books) 4.1 Triangles and Squares Pythagoras' Theorem - -

Step #2 Liner Type. Enter the pool shape you selected from STEP 2 of the MEASURING INSTRUCTIONS:

Transcription:

CS 188: Artificil Intelligence Spring 2011 Lecture 19: Dynmic Byes Nets, Nïve Byes 4/6/2011 Pieter Aeel UC Berkeley Slides dpted from Dn Klein. Announcements W4 out, due next week Mondy P4 out, due next week Fridy Mid-semester survey 2 1

Course contest Announcements II Regulr tournments. Instructions hve een posted! First week extr credit for top 20, next week top 10, then top 5, then top 3. First nightly tournment: tenttively Mondy night 3 P4: Ghostusters 2.0 Plot: Pcmn's grndfther, Grndpc, lerned to hunt ghosts for sport. He ws linded y his power, ut could her the ghosts nging nd clnging. Trnsition Model: All ghosts move rndomly, ut re sometimes ised Emission Model: Pcmn knows noisy distnce to ech ghost Noisy distnce pro True distnce = 8 15 13 11 9 7 5 3 1 2

Tody Dynmic Byes Nets (DBNs) [sometimes clled temporl Byes nets] Demos: Locliztion Simultneous Locliztion And Mpping (SLAM) Strt mchine lerning 5 Dynmic Byes Nets (DBNs) We wnt to trck multiple vriles over time, using multiple sources of evidence Ide: Repet fixed Byes net structure t ech time Vriles from time t cn condition on those from t-1 t =1 t =2 t =3 G 1 G 2 G 3 G 1 G 2 G 3 E 1 E 1 E 2 E 2 E 3 E 3 Discrete vlued dynmic Byes nets re lso HMMs 3

Exct Inference in DBNs Vrile elimintion pplies to dynmic Byes nets Procedure: unroll the network for T time steps, then eliminte vriles until P(X T e 1:T ) is computed t =1 t =2 t =3 G 1 G 2 G 3 G 1 G 2 G 3 E 1 E 1 E 2 E 2 E 3 E 3 Online elief updtes: Eliminte ll vriles from the previous time step; store fctors for current time only 7 DBN Prticle Filters A prticle is complete smple for time step Initilize: Generte prior smples for the t=1 Byes net Exmple prticle: G 1 = (3,3) G 1 = (5,3) Elpse time: Smple successor for ech prticle Exmple successor: G 2 = (2,3) G 2 = (6,3) Oserve: Weight ech entire smple y the likelihood of the evidence conditioned on the smple Likelihood: P(E 1 G 1 ) * P(E 1 G 1 ) Resmple: Select prior smples (tuples of vlues) in proportion to their likelihood [Demo] 8 4

DBN Prticle Filters A prticle is complete smple for time step Initilize: Generte prior smples for the t=1 Byes net Exmple prticle: G 1 = (3,3) G 1 = (5,3) Elpse time: Smple successor for ech prticle Exmple successor: G 2 = (2,3) G 2 = (6,3) Oserve: Weight ech entire smple y the likelihood of the evidence conditioned on the smple Likelihood: P(E 1 G 1 ) * P(E 1 G 1 ) Resmple: Select prior smples (tuples of vlues) in proportion to their likelihood 9 Trick I to Improve Prticle Filtering Performnce: Low Vrince Resmpling Advntges: More systemtic coverge of spce of smples If ll smples hve sme importnce weight, no smples re lost Lower computtionl complexity 5

Trick II to Improve Prticle Filtering Performnce: Regulriztion If no or little noise in trnsitions model, ll prticles will strt to coincide à regulriztion: introduce dditionl (rtificil) noise into the trnsition model SLAM SLAM = Simultneous Locliztion And Mpping We do not know the mp or our loction Our elief stte is over mps nd positions! Min techniques: Klmn filtering (Gussin HMMs) nd prticle methods [DEMOS] DP-SLAM, Ron Prr 6

Root Locliztion In root locliztion: We know the mp, ut not the root s position Oservtions my e vectors of rnge finder redings Stte spce nd redings re typiclly continuous (works siclly like very fine grid) nd so we cnnot store B(X) Prticle filtering is min technique [Demos] Glol-floor SLAM SLAM = Simultneous Locliztion And Mpping We do not know the mp or our loction Stte consists of position AND mp! Min techniques: Klmn filtering (Gussin HMMs) nd prticle methods 7

Prticle Filter Exmple 3 prticles mp of prticle 1 mp of prticle 3 mp of prticle 2 15 SLAM DEMOS fstslm.vi, visionslm_helioffice.wmv 8

Further redings We re done with Prt II Proilistic Resoning To lern more (eyond scope of 188): Koller nd Friedmn, Proilistic Grphicl Models (CS281A) Thrun, Burgrd nd Fox, Proilistic Rootics (CS287) Prt III: Mchine Lerning Up until now: how to reson in model nd how to mke optiml decisions Mchine lerning: how to cquire model on the sis of dt / experience Lerning prmeters (e.g. proilities) Lerning structure (e.g. BN grphs) Lerning hidden concepts (e.g. clustering) 9

Mchine Lerning Tody An ML Exmple: Prmeter Estimtion Mximum likelihood Smoothing Applictions Min concepts Nïve Byes Prmeter Estimtion r g g r g g r g g r r g g g g Estimting the distriution of rndom vrile Elicittion: sk humn (why is this hrd?) Empiriclly: use trining dt (lerning!) E.g.: for ech outcome x, look t the empiricl rte of tht vlue: r g g This is the estimte tht mximizes the likelihood of the dt Issue: overfitting. E.g., wht if only oserved 1 jelly en? 10

Estimtion: Smoothing Reltive frequencies re the mximum likelihood estimtes In Byesin sttistics, we think of the prmeters s just nother rndom vrile, with its own distriution???? Estimtion: Lplce Smoothing Lplce s estimte: Pretend you sw every outcome once more thn you ctully did H H T Cn derive this s MAP estimte with Dirichlet priors (see cs281) 11

Estimtion: Lplce Smoothing Lplce s estimte (extended): Pretend you sw every outcome k extr times H H T Wht s Lplce with k = 0? k is the strength of the prior Lplce for conditionls: Smooth ech condition independently: Exmple: Spm Filter Input: emil Output: spm/hm Setup: Get lrge collection of exmple emils, ech leled spm or hm Note: someone hs to hnd lel ll this dt! Wnt to lern to predict lels of new, future emils Fetures: The ttriutes used to mke the hm / spm decision Words: FREE! Text Ptterns: $dd, CAPS Non-text: SenderInContcts Der Sir. First, I must solicit your confidence in this trnsction, this is y virture of its nture s eing utterly confidencil nd top secret. TO BE REMOVED FROM FUTURE MAILINGS, SIMPLY REPLY TO THIS MESSAGE AND PUT "REMOVE" IN THE SUBJECT. 99 MILLION EMAIL ADDRESSES FOR ONLY $99 Ok, Iknow this is ltntly OT ut I'm eginning to go insne. Hd n old Dell Dimension XPS sitting in the corner nd decided to put it to use, I know it ws working pre eing stuck in the corner, ut when I plugged it in, hit the power nothing hppened. 12

Exmple: Digit Recognition Input: imges / pixel grids Output: digit 0-9 Setup: Get lrge collection of exmple imges, ech leled with digit Note: someone hs to hnd lel ll this dt! Wnt to lern to predict lels of new, future digit imges 0 1 2 Fetures: The ttriutes used to mke the digit decision Pixels: (6,8)=ON Shpe Ptterns: NumComponents, AspectRtio, NumLoops 1?? Other Clssifiction Tsks In clssifiction, we predict lels y (clsses) for inputs x Exmples: Spm detection (input: document, clsses: spm / hm) OCR (input: imges, clsses: chrcters) Medicl dignosis (input: symptoms, clsses: diseses) Automtic essy grder (input: document, clsses: grdes) Frud detection (input: ccount ctivity, clsses: frud / no frud) Customer service emil routing mny more Clssifiction is n importnt commercil technology! 13

Importnt Concepts Dt: leled instnces, e.g. emils mrked spm/hm Trining set Held out set Test set Fetures: ttriute-vlue pirs which chrcterize ech x Experimenttion cycle Lern prmeters (e.g. model proilities) on trining set (Tune hyperprmeters on held-out set) Compute ccurcy of test set Very importnt: never peek t the test set! Evlution Accurcy: frction of instnces predicted correctly Overfitting nd generliztion Wnt clssifier which does well on test dt Overfitting: fitting the trining dt very closely, ut not generlizing well We ll investigte overfitting nd generliztion formlly in few lectures Trining Dt Held-Out Dt Test Dt Byes Nets for Clssifiction One method of clssifiction: Use proilistic model! Fetures re oserved rndom vriles F i Y is the query vrile Use proilistic inference to compute most likely Y You lredy know how to do this inference 14

Simple Clssifiction Simple exmple: two inry fetures M S F direct estimte Byes estimte (no ssumptions) Conditionl independence + Generl Nïve Byes A generl nive Byes model: Y x F n prmeters Y Y prmeters n x F x Y prmeters F 1 F 2 F n We only specify how ech feture depends on the clss Totl numer of prmeters is liner in n 15

Inference for Nïve Byes Gol: compute posterior over cuses Step 1: get joint proility of cuses nd evidence Step 2: get proility of evidence + Step 3: renormlize Generl Nïve Byes Wht do we need in order to use nïve Byes? Inference (you know this prt) Strt with unch of conditionls, P(Y) nd the P(F i Y) tles Use stndrd inference to compute P(Y F 1 F n ) Nothing new here Estimtes of locl conditionl proility tles P(Y), the prior over lels P(F i Y) for ech feture (evidence vrile) These proilities re collectively clled the prmeters of the model nd denoted y θ Up until now, we ssumed these ppered y mgic, ut they typiclly come from trining dt: we ll look t this now 16

Input: pixel grids A Digit Recognizer Output: digit 0-9 Nïve Byes for Digits Simple version: One feture F ij for ech grid position <i,j> Possile feture vlues re on / off, sed on whether intensity is more or less thn 0.5 in underlying imge Ech input mps to feture vector, e.g. Here: lots of fetures, ech is inry vlued Nïve Byes model: Wht do we need to lern? 17

Exmples: CPTs 1 0.1 2 0.1 3 0.1 4 0.1 5 0.1 6 0.1 7 0.1 8 0.1 9 0.1 0 0.1 1 0.01 2 0.05 3 0.05 4 0.30 5 0.80 6 0.90 7 0.05 8 0.60 9 0.50 0 0.80 1 0.05 2 0.01 3 0.90 4 0.80 5 0.90 6 0.90 7 0.25 8 0.85 9 0.60 0 0.80 Prmeter Estimtion Estimting distriution of rndom vriles like X or X Y Empiriclly: use trining dt For ech outcome x, look t the empiricl rte of tht vlue: r g g This is the estimte tht mximizes the likelihood of the dt Elicittion: sk humn! Usully need domin experts, nd sophisticted wys of eliciting proilities (e.g. etting gmes) Troule clirting 18

A Spm Filter Nïve Byes spm filter Dt: Collection of emils, leled spm or hm Note: someone hs to hnd lel ll this dt! Split into trining, heldout, test sets Clssifiers Lern on the trining set (Tune it on held-out set) Test it on new emils Der Sir. First, I must solicit your confidence in this trnsction, this is y virture of its nture s eing utterly confidencil nd top secret. TO BE REMOVED FROM FUTURE MAILINGS, SIMPLY REPLY TO THIS MESSAGE AND PUT "REMOVE" IN THE SUBJECT. 99 MILLION EMAIL ADDRESSES FOR ONLY $99 Ok, Iknow this is ltntly OT ut I'm eginning to go insne. Hd n old Dell Dimension XPS sitting in the corner nd decided to put it to use, I know it ws working pre eing stuck in the corner, ut when I plugged it in, hit the power nothing hppened. Nïve Byes for Text Bg-of-Words Nïve Byes: Predict unknown clss lel (spm vs. hm) Assume evidence fetures (e.g. the words) re independent Wrning: sutly different ssumptions thn efore! Genertive model Word t position i, not i th word in the dictionry! Tied distriutions nd g-of-words Usully, ech vrile gets its own conditionl proility distriution P(F Y) In g-of-words model Ech position is identiclly distriuted All positions shre the sme conditionl pros P(W C) Why mke this ssumption? 19

Exmple: Spm Filtering Model: Wht re the prmeters? hm : 0.66 spm: 0.33 the : 0.0156 to : 0.0153 nd : 0.0115 of : 0.0095 you : 0.0093 : 0.0086 with: 0.0080 from: 0.0075... the : 0.0210 to : 0.0133 of : 0.0119 2002: 0.0110 with: 0.0108 from: 0.0107 nd : 0.0105 : 0.0100... Where do these tles come from? Spm Exmple Word P(w spm) P(w hm) Tot Spm Tot Hm (prior) 0.33333 0.66666-1.1-0.4 Gry 0.00002 0.00021-11.8-8.9 would 0.00069 0.00084-19.1-16.0 you 0.00881 0.00304-23.8-21.8 like 0.00086 0.00083-30.9-28.9 to 0.01517 0.01339-35.1-33.2 lose 0.00008 0.00002-44.5-44.0 weight 0.00016 0.00002-53.3-55.0 while 0.00027 0.00027-61.5-63.2 you 0.00881 0.00304-66.2-69.0 sleep 0.00006 0.00001-76.0-80.5 P(spm w) = 98.9 20

Exmple: Overfitting 2 wins!! Exmple: Overfitting Posteriors determined y reltive proilities (odds rtios): south-west : inf ntion : inf morlly : inf nicely : inf extent : inf seriously : inf... screens : inf minute : inf gurnteed : inf $205.00 : inf delivery : inf signture : inf... Wht went wrong here? 21

Generliztion nd Overfitting Reltive frequency prmeters will overfit the trining dt! Just ecuse we never sw 3 with pixel (15,15) on during trining doesn t men we won t see it t test time Unlikely tht every occurrence of minute is 100% spm Unlikely tht every occurrence of seriously is 100% hm Wht out ll the words tht don t occur in the trining set t ll? In generl, we cn t go round giving unseen events zero proility As n extreme cse, imgine using the entire emil s the only feture Would get the trining dt perfect (if deterministic leling) Wouldn t generlize t ll Just mking the g-of-words ssumption gives us some generliztion, ut isn t enough To generlize etter: we need to smooth or regulrize the estimtes Estimtion: Smoothing Prolems with mximum likelihood estimtes: If I flip coin once, nd it s heds, wht s the estimte for P (heds)? Wht if I flip 10 times with 8 heds? Wht if I flip 10M times with 8M heds? Bsic ide: We hve some prior expecttion out prmeters (here, the proility of heds) Given little evidence, we should skew towrds our prior Given lot of evidence, we should listen to the dt 22

Estimtion: Smoothing Reltive frequencies re the mximum likelihood estimtes In Byesin sttistics, we think of the prmeters s just nother rndom vrile, with its own distriution???? Estimtion: Lplce Smoothing Lplce s estimte: Pretend you sw every outcome once more thn you ctully did H H T Cn derive this s MAP estimte with Dirichlet priors (see cs281) 23

Estimtion: Lplce Smoothing Lplce s estimte (extended): Pretend you sw every outcome k extr times H H T Wht s Lplce with k = 0? k is the strength of the prior Lplce for conditionls: Smooth ech condition independently: Estimtion: Liner Interpoltion In prctice, Lplce often performs poorly for P(X Y): When X is very lrge When Y is very lrge Another option: liner interpoltion Also get P(X) from the dt Mke sure the estimte of P(X Y) isn t too different from P(X) Wht if α is 0? 1? For even etter wys to estimte prmeters, s well s detils of the mth see cs281, cs288 24

Rel NB: Smoothing For rel clssifiction prolems, smoothing is criticl New odds rtios: helvetic : 11.4 seems : 10.8 group : 10.2 go : 8.4 res : 8.3... verdn : 28.8 Credit : 28.4 ORDER : 27.2 <FONT> : 26.9 money : 26.5... Do these mke more sense? Tuning on Held-Out Dt Now we ve got two kinds of unknowns Prmeters: the proilities P(Y X), P(Y) Hyperprmeters, like the mount of smoothing to do: k, α Where to lern? Lern prmeters from trining dt Must tune hyperprmeters on different dt Why? For ech vlue of the hyperprmeters, trin nd test on the held-out dt Choose the est vlue nd do finl test on the test dt 25

Bselines First step: get seline Bselines re very simple strw mn procedures Help determine how hrd the tsk is Help know wht good ccurcy is Wek seline: most frequent lel clssifier Gives ll test instnces whtever lel ws most common in the trining set E.g. for spm filtering, might lel everything s hm Accurcy might e very high if the prolem is skewed E.g. clling everything hm gets 66%, so clssifier tht gets 70% isn t very good For rel reserch, usully use previous work s (strong) seline Confidences from Clssifier The confidence of proilistic clssifier: Posterior over the top lel Represents how sure the clssifier is of the clssifiction Any proilistic model will hve confidences No gurntee confidence is correct Clirtion Wek clirtion: higher confidences men higher ccurcy Strong clirtion: confidence predicts ccurcy rte Wht s the vlue of clirtion? 26

Precision vs. Recll Let s sy we wnt to clssify we pges s homepges or not In test set of 1K pges, there re 3 homepges Our clssifier sys they re ll non-homepges 99.7 ccurcy! Need new mesures for rre positive events Precision: frction of guessed positives which were ctully positive Recll: frction of ctul positives which were guessed s positive Sy we guess 5 homepges, of which 2 were ctully homepges Precision: 2 correct / 5 guessed = 0.4 Recll: 2 correct / 3 true = 0.67 Which is more importnt in customer support emil utomtion? Which is more importnt in irport fce recognition? - guessed + ctul + Precision vs. Recll Precision/recll trdeoff Often, you cn trde off precision nd recll Only works well with wekly clirted clssifiers To summrize the trdeoff: Brek-even point: precision vlue when p = r F-mesure: hrmonic men of p nd r: 27

Errors, nd Wht to Do Exmples of errors Der GlolSCAPE Customer, GlolSCAPE hs prtnered with ScnSoft to offer you the ltest version of OmniPge Pro, for just $99.99* - the regulr list price is $499! The most common question we've received out this offer is - Is this genuine? We would like to ssure you tht this offer is uthorized y ScnSoft, is genuine nd vlid. You cn get the...... To receive your $30 Amzon.com promotionl certificte, click through to http://www.mzon.com/pprel nd see the prominent link for the $30 offer. All detils re there. We hope you enjoyed receiving this messge. However, if you'd rther not receive future e-mils nnouncing new store lunches, plese click... Wht to Do Aout Errors? Need more fetures words ren t enough! Hve you emiled the sender efore? Hve 1K other people just gotten the sme emil? Is the sending informtion consistent? Is the emil in ALL CAPS? Do inline URLs point where they sy they point? Does the emil ddress you y (your) nme? Cn dd these informtion sources s new vriles in the NB model Next clss we ll tlk out clssifiers which let you esily dd ritrry fetures more esily 28

Summry Nïve Byes Clssifier Byes rule lets us do dignostic queries with cusl proilities The nïve Byes ssumption tkes ll fetures to e independent given the clss lel We cn uild clssifiers out of nïve Byes model using trining dt Smoothing estimtes is importnt in rel systems Clssifier confidences re useful, when you cn get them 29