perceptrons - university of texas at · pdf fileall cs188 materials are available at .]...
TRANSCRIPT
![Page 1: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/1.jpg)
CS343:ArtificialIntelligencePerceptrons
Prof.ScottNiekum—TheUniversityofTexasatAustin[TheseslidesbasedonthoseofDanKleinandPieterAbbeelforCS188IntrotoAIatUCBerkeley.AllCS188materialsareavailableathttp://ai.berkeley.edu.]
![Page 2: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/2.jpg)
Error-DrivenClassification
![Page 3: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/3.jpg)
Errors,andWhattoDo
▪ ExamplesoferrorsDear GlobalSCAPE Customer,
GlobalSCAPE has partnered with ScanSoft to offer you the latest version of OmniPage Pro, for just $99.99* - the regular list price is $499! The most common question we've received about this offer is - Is this genuine? We would like to assure you that this offer is authorized by ScanSoft, is genuine and valid. You can get the . . .
. . . To receive your $30 Amazon.com promotional certificate, click through to
http://www.amazon.com/apparel
and see the prominent link for the $30 offer. All details are there. We hope you enjoyed receiving this message. However, if you'd rather not receive future e-mails announcing new store launches, please click . . .
![Page 4: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/4.jpg)
WhattoDoAboutErrors
▪ Problem:there’sstillspaminyourinbox
▪ Needmorefeatures–wordsaren’tenough!▪ Haveyouemailedthesenderbefore?▪ Have1Motherpeoplejustgottenthesameemail?▪ Isthesendinginformationconsistent?▪ IstheemailinALLCAPS?▪ DoinlineURLspointwheretheysaytheypoint?▪ Doestheemailaddressyouby(your)name?
▪ NaïveBayesmodelscanincorporateavarietyoffeatures,buttendtodobestinhomogeneouscases(e.g.allfeaturesarewordoccurrences)
![Page 5: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/5.jpg)
LinearClassifiers
![Page 6: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/6.jpg)
FeatureVectors
Hello,
Do you want free printr cartriges? Why pay more when you can get them ABSOLUTELY FREE! Just
# free : 2 YOUR_NAME : 0 MISSPELLED : 2 FROM_FRIEND : 0 ...
SPAMor+
PIXEL-7,12 : 1 PIXEL-7,13 : 0 ... NUM_LOOPS : 1 ...
“2”
![Page 7: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/7.jpg)
Some(Simplified)Biology
▪ Verylooseinspiration:humanneurons
![Page 8: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/8.jpg)
LinearClassifiers
▪ Inputsarefeaturevalues▪ Eachfeaturehasaweight▪ Sumistheactivation
▪ Iftheactivationis:▪ Positive,output+1▪ Negative,output-1
Σf1f2f3
w1w2w3
>0?
![Page 9: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/9.jpg)
Weights▪ Binarycase:comparefeaturestoaweightvector▪ Learning:figureouttheweightvectorfromexamples
# free : 2 YOUR_NAME : 0 MISSPELLED : 2 FROM_FRIEND : 0 ...
# free : 4 YOUR_NAME :-1 MISSPELLED : 1 FROM_FRIEND :-3 ...
# free : 0 YOUR_NAME : 1 MISSPELLED : 1 FROM_FRIEND : 1 ...
Dot product positive means the positive class
![Page 10: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/10.jpg)
DecisionRules
![Page 11: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/11.jpg)
BinaryDecisionRule
▪ Inthespaceoffeaturevectors▪ Examplesarepoints▪ Anyweightvectorisahyperplane▪ OnesidecorrespondstoY=+1▪ OthercorrespondstoY=-1
BIAS : -3 free : 4 money : 2 ...
0 10
1
2
freemon
ey
+1=SPAM
-1=HAM
![Page 12: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/12.jpg)
WeightUpdates
![Page 13: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/13.jpg)
Learning:BinaryPerceptron
▪ Startwithweights=0▪ Foreachtraininginstance:
▪ Classifywithcurrentweights
▪ Ifcorrect(i.e.,y=y*),nochange!
▪ Ifwrong:adjusttheweightvector
![Page 14: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/14.jpg)
Learning:BinaryPerceptron
▪ Startwithweights=0▪ Foreachtraininginstance:▪ Classifywithcurrentweights
▪ Ifcorrect(i.e.,y=y*),nochange!▪ Ifwrong:adjusttheweightvectorbyaddingorsubtractingthefeaturevector.Subtractify*is-1.
![Page 15: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/15.jpg)
Examples:Perceptron
▪ SeparableCase
![Page 16: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/16.jpg)
MulticlassDecisionRule
▪ Ifwehavemultipleclasses:▪ Aweightvectorforeachclass:
▪ Score(activation)ofaclassy:
▪ Predictionhighestscorewins
Binary=multiclasswherethenegativeclasshasweightzero
![Page 17: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/17.jpg)
Learning:MulticlassPerceptron
▪ Startwithallweights=0▪ Pickuptrainingexamplesonebyone▪ Predictwithcurrentweights
▪ Ifcorrect,nochange!▪ Ifwrong:lowerscoreofwronganswer,
raisescoreofrightanswer
![Page 18: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/18.jpg)
Example:MulticlassPerceptron
BIAS : 1 win : 0 game : 0 vote : 0 the : 0 ...
BIAS : 0 win : 0 game : 0 vote : 0 the : 0 ...
BIAS : 0 win : 0 game : 0 vote : 0 the : 0 ...
“winthevote”
![Page 19: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/19.jpg)
PropertiesofPerceptrons
▪ Separability:trueifsomeparametersgetthetrainingsetperfectlycorrect
▪ Convergence:ifthetrainingisseparable,perceptronwilleventuallyconverge(binarycase)
▪ MistakeBound:themaximumnumberofmistakes(binarycase)relatedtothemarginordegreeofseparability
Separable
Non-Separable
![Page 20: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/20.jpg)
Examples:Perceptron
▪ Non-SeparableCase
![Page 21: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/21.jpg)
ImprovingthePerceptron
![Page 22: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/22.jpg)
ProblemswiththePerceptron
▪ Noise:ifthedataisn’tseparable,weightsmightthrash▪ Averagingweightvectorsovertimecan
help(averagedperceptron)
▪ Mediocregeneralization:findsa“barely”separatingsolution
▪ Overtraining:test/held-outaccuracyusuallyrises,thenfalls▪ Overtrainingisakindofoverfitting
![Page 23: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/23.jpg)
FixingthePerceptron
▪ Idea:adjusttheweightupdatetomitigatetheseeffects
▪ MIRA*:chooseanupdatesizethatfixesthecurrentmistake…▪ …but,minimizesthechangetow
▪ The+1helpstogeneralize
*MarginInfusedRelaxedAlgorithm
![Page 24: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/24.jpg)
MinimumCorrectingUpdate
minnotτ=0,orwouldnothavemadeanerror,sominwillbewhereequalityholds
![Page 25: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/25.jpg)
MaximumStepSize
▪ Inpractice,it’salsobadtomakeupdatesthataretoolarge▪ Examplemaybelabeledincorrectly▪ Youmaynothaveenoughfeatures▪ Solution:capthemaximumpossiblevalueofτ withsomeconstant
C
▪ Correspondstoanoptimizationthatassumesnon-separabledata▪ Usuallyconvergesfasterthanperceptron▪ Usuallybetter,especiallyonnoisydata
![Page 26: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/26.jpg)
LinearSeparators
▪ Whichoftheselinearseparatorsisoptimal?
![Page 27: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/27.jpg)
SupportVectorMachines
▪ Maximizingthemargin:goodaccordingtointuition,theory,practice▪ Onlysupportvectorsmatter;othertrainingexamplesareignorable▪ Supportvectormachines(SVMs)findtheseparatorwithmaxmargin▪ Basically,SVMsareMIRAwhereyouoptimizeoverallexamplesatonce
MIRA
SVM
![Page 28: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/28.jpg)
Classification:Comparison
▪ NaïveBayes▪ Buildsamodeltrainingdata▪ Givespredictionprobabilities▪ Strongassumptionsaboutfeatureindependence▪ Onepassthroughdata(counting)
▪ Perceptrons/MIRA:▪ Makeslessassumptionsaboutdata▪ Mistake-drivenlearning▪ Multiplepassesthroughdata(prediction)▪ Oftenmoreaccurate
![Page 29: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/29.jpg)
Apprenticeship
![Page 30: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/30.jpg)
PacmanApprenticeship!
▪ Examplesarestatess
▪ Candidatesarepairs(s,a)▪ “Correct”actions:thosetakenbyexpert▪ Featuresdefinedover(s,a)pairs:f(s,a)▪ Scoreofaq-state(s,a)givenby:
▪ HowisthisVERYdifferentfromreinforcementlearning?
“correct”actiona*
![Page 31: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/31.jpg)
VideoofPacmanApprentice
![Page 32: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/32.jpg)
WebSearch
![Page 33: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/33.jpg)
Extension:WebSearch
▪ Informationretrieval:▪ Giveninformationneeds,produceinformation▪ Includes,e.g.websearch,questionanswering,andclassicIR
▪ Websearch:notexactlyclassification,butratherranking
x=“AppleComputers”
![Page 34: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/34.jpg)
Feature-BasedRanking
x=“AppleComputer”
x,
x,
![Page 35: Perceptrons - University of Texas at · PDF fileAll CS188 materials are available at .] Error-Driven Classification. ... Properties of Perceptrons ... Problems with the Perceptron](https://reader031.vdocument.in/reader031/viewer/2022030500/5aabcd007f8b9a59658c4d1b/html5/thumbnails/35.jpg)
PerceptronforRanking
▪ Inputs▪ Candidates▪ Manyfeaturevectors:▪ Oneweightvector:▪ Prediction:
▪ Update(ifwrong):