lecture 17 ml supp - github pages · lecture 17: linear classifiers and support vector machines...
TRANSCRIPT
CS639:DataManagementfor
DataScienceLecture17:LinearClassifiersandSupportVectorMachines
TheodorosRekatsinas(lecturebyAnkur Goswami manyslidesfromDavidSontag)
1
Today’sLecture
1. Linearclassifiers
2. ThePerceptronAlgorithm
3. SupportVectorMachines
2
Linearclassifier• Let’ssimplifylifebyassuming:
• Everyinstanceisavectorofrealnumbers,x=(x1,…,xn).(Notation:boldfacexisavector.)
• Thereareonlytwoclasses,y=(+1) andy=(-1)
• Alinearclassifier isvectorw ofthesamedimensionasx thatisusedtomakethisprediction:
)(sign)...sign(ˆ 2211 xw ×=+++= nnxwxwxwy
þýü
îíì
<-³+
=0if10 if1
)(signx
x
Example:Linearclassifier
ThePerceptronAlgorithmtolearnaLinearClassifier
Definition:Linearlyseparabledata
Doestheperceptronalgorithmwork?
Propertiesoftheperceptronalgorithm
Problemswiththeperceptronalgorithm
[Wewillseenextweek]
Linearseparators
SupportVectorMachines
Normaltoaplane
Scaleinvariance
Scaleinvariance
Whatisγasafunctionofw?
SupportVectorMachines(SVMs)
Whatifthedataisnotseparable?
Allowingforslack:“Softmargin”SVM
Allowingforslack:“Softmargin”SVM
EquivalentHingeLossFormulation
HingeLossvs0-1Loss
MulticlassSVM
Oneversusallclassification
MulticlassSVM
MulticlassSVM
Whatyouneedtoknow