You are on page 1of 28

UNIT 1 : Linear Classifier and Generalizations

LECTURE 2 : Linear Classifier and Perceptron


Wooooooooo !!!!!!! We are back baby !!!!! Yeahhhhhh !!!!!

After the successful completion of Fundamentals of Statistics , your pal Scooby is back with a
brand new set of handwritten lecture notes. I found that many of you liked them and appriciated the
work by thanking me personally on my email. Which by the way is :

Scooby's email : peepeepoopoo873@gmail.com

Feel free to point out mistakes and message me anyways

For those who do not message me...


I don't care man!!! Whataever man !!!! Screw you guys !!!! Whatever!!!

(I do care, please message me. I was just pretending to be indifferent in the above line so that you
can't hurt me emotionally.) Anyways.

I tried to make these notes without any mistakes and cover most of the video material.

But as Yoda has rightly said : ' Is human, To err '

I however DO NOT TAKE any responsibilty if you fail your exams following my notes. So please
check the actual lecture slides and videos if you suspect something is wrong, and mail me too.

The notes DO NOT CONTAIN solutions to any homework problems or in-lecture exercises.
Only the problems and exercises solved in the videos are included in these notes.

Here is an interesting photo I googled

MARIJUANA MONKEY
I ran out of made up quotes so I will write very short stories instead. These may or may not
resemble true events, but will definitely have a message that will help you along the journey, that is
life.

STORY TIME : RICH PEOPLE LOVE

There was this dude named Chad. He chugged a lot of bear in parties. He was a trust fund kid. He
used to talk about generic s**t like , how much he could bench, or the game last night. Chad
frequently used to give life advice to people in his Instagram story, about living life to full, not
being afraid of anything, achieving their goals etc. He didn't care about fame, he cared about the
lives he touched. Atleast he caimed that.

There was this chick named Iris. Iris's father was a millionaire. She had self diaganosed herself with
depression in order to appear cool on her social media. She used to caption her pics with stuff like
'I am a mess, but I am a beautiful mess'. Obviously the pics were in grayscale tone. Cause she was
sad. Maybe she understood life really well.

Chad and Iris met at a rave party. And there were sparks all around. It was as if they understood
each other. It was love at first sight.

They talked about how to end world poverty and how the world would be a much better place, if
everyone was happy. They went on expensive vacations and were now the power couple that
infuenced people on Instagram. They talked about helping those in need, and took a selfie
everytime they helped someone. They dismissed their critics as haters, and lived happily ever after.

THE END

MORAL : No matter how screwed up you are, there's always someone equally screwed for you out
there. Go make this world a horrible place.

I hope these notes will help you

Let's get started


Lec # 2 : Linear Classifier and Perceptron 2.L
F Review d Basic Corrcepta
Asts stq.rt flnr's {ec{ure by bvfef ly revlsing concepts $va,m prevtcnts Lech,r.re
) feature rrector : X
-l6v each and ercvy case tl'tqt v\'e ['uad , we Lr-ad sorne properltes {hot \^}e he
tnhel^ent 1;rr tl''€ cose. Like fo'eg . E rerq rnovie +lmt v.re krad eo.rlier had
a ge nre , Irndb rottng , buc{gek, casb ebc '
We for our purposes roardbed to pvedhh ,sonreHnr'ng orr bosis { *ln-ese feoturea
Hence for eocl.r- eqse r^re choge ' d ' ]eattrres {zqt hrere chovactevxlic o/
and ,gtacKed {nen u in a uecLor hrtUtu eacl'u entzy beinT
{ tltot cose(beccr.r,tse
; ,rrr",ber {hots t4;hat m-ocldnsa un-derrsbarrrl)
-Ipuis
rnectoi {or the i+}.1 rnovie/cqse was colled *l'r" feaLure uect-or.
fl)
(i) x;
X € ed (C1",ur"rlg, )
4!t
;
x5' dx1

xi, # {eahtra + i&, coae


) Lch-eL
( i.l

{r^rs voas $E *h"ivt'1 {taoL h}e w qnbecl }o pvedich .

I,oe ove taLk[ng oboub aupeYvi*ec\ {eo.rninq- h"eve, , vshich" wteotil tv\re

wrLL how Labelted dqto" . (At least *'raivt. datd wtll be Lobelled)
{o eoch cqse $rov* *he trqiyl, data, hre NilL ha,,e q. J,abel ossoc(ated
& for eoch. co.se ttr, the test daba h!€. r-oovr,t tD predtct -tlae LabeL.
{or Lhe rvtovie example h)e ar€ studyin2' each r..ector couU hsrne o'ne
ot the *: to.l<',
(t )
: inclfcottng v(enry would watcVu it]r" movle
v _ : indicaH^a vfewey wo-utdn't rcatch i{n" rnowe
1

il. Agairu
{+s lh" *e\ "l zxomples ttot rue ieed our otgcrifrtvn in ordev 1o trairr.gnod
ovE dotng -suge vvised
Leorn i^t nylrulctu meqnA the tvaininq clotq 6,re
hor,e wttl be Labell ed. nd hlg l^tc tt ln-q\€, t4- exo rnples +o {eed
(ne.e,fore mathemattcol$ t,rle rnriLe

3n = t(^n,,J,t,), i=1,2,2,....n1
V gel eJ otl paivs ( feature lrector [ , tqbel t ) fo, o[ y1 €oses
z.z
) Clossif ier : l'u()
ltis ;trngty a functron o, ryppin3 {rm ?( ; [,e the sPace C fu.+"re raectur:
+o {lre spa.e laloeLs. 6v *he howe exomple h}e had
"l
L" , -R' F+ t-1,+1l
Itae idea wos ,strvrple

hxrL hnre jur,r,cuovt h( ) th,.t hltll *oke os in-put fny {eat.re rneclor
a
^)e oat a coTY€sPonding label +1 ot -1 ' lw srnclev to do
X anC Br'\^e ug "X
to tratn *he rnodel . lnis Juvrchon h( ) vrre 6orc
tl^at ,^re wtri ir.t rgeed
wttL irufacb depend ; payometer g (v'hreh con- rce rnutttdirnerrgionol) ,4n-d
uatng the broining dobo., hle wliLL esttmabe er's b {tnd on'optirrraL h( )
fne-^*^tftpredicb'labelst-.si;^?*lar'sogttmolh()'
)Tva[rn i Erro" gn ( h)
In ovdez to see hor,.r ourc clossi$ier pevfovmed r^rrt tvairuin2 dut& , nre needed
Aorvle sovt o{ rnettic , {he ideo hte l,-od rttos pr€+! -sirnple : f,ust Jooi(q,b
rnrhat fvactcon d polvtts tt,r" 4he 'traintvtg A ek afe rvr.r'sato,*r-fted by irt I
Ao we introduCed *he double bracket not-a*tcn't

I expresstcrr.r ]l 1 if Express(on is Tvrre


o i{ ExPresston is False

If f- ++l" "r{^ cose iw tvatr,n tng dota


h(xcir; * ,tir : then h cammited an eYroT
h(xtill = ,cit '. tnen I'u did nok corrrmilan eYtat
Ao trn, ordeY 4o {tnd the frackon "l eyr6r comynitfed \^)e ho,!€
n
(h) =
e"
* Ii=1 Ir"(xtir)*Ytir]
7 Tes+, Etvor End Ae* SeL

}f,ow we knou,c ae* let is .7t ia 4he Se 4 e>cornp)u UL c-saea [or


trutr"ab 4yte
rnvhfch- \^]e ruavtt lo Tredtcl )he lthelg . (ne fecrture Mector,6 are c* dtgcuxec{
eoxLie'r .gnl5 o" ?yo?ev\ leharucLeris+ic o[ the exornples / eases slone A+ doos
nob mor,ffet v,&te4laev -lhe exarnple ,trorw t^rdtn Se4 ]':esl Aet ,,g,ru
)L w
exompte t,n.ttlt olutroys l'rore a ,jec.luve, wctor .

{t* tabef ia +l\e tricky pavt


2-.3
tJp unttL nornr, nre h,ow, o,s-rurned 44aY *he tes.t dqbq h,e t'r,al€ jS utnlqbelted
JY",st4oy or maY Yr,oE be true
U*ua\ y.7hat 6rs clo hrhiLe trainin2; modil* i* *omethinS ,Like-thi(
r+ Xte hnue a fot { LABE LLED dofa'
-) tde sPtit it, into two parts RANDo}ILY
Bo 7- is tae tesb daba
[aualtY ,i ?. ls *?rc tzain dakl
hE tratrn"the' modeL
-, hIltt Jla'is 2b"h tratrudaba- )-brat|/ted
rnodeL per{otm:' on -lhe test data"
+ Theru Ure cl,ueck ho,^: ouY
Herc. r'oe ho"e {1alo -tldngs io'
o case in *he Tr's{ SET

{q X(i) iw {is1 SET


Tvre pvedicled labeL : h ( X (j) )
(j:
fvte trut{'L a
Y

+ Ne eon thevt comPoY€ -Lhese *rruo vo*Lues +o {*^d av\ eyrcrl. , xiwriliaz
bo outr 'lroivting EYYOT
m
6 (h) 1
f
fest tvror n1" [t(xtjr) * J'i,]
j=r

x(jl , jth jec.lure \^ec+oy in -lEsr Ser


m : t6to.L ccrses in Tesr SEr
,jr : LqbeL "J ith cose in {est Ser
v

Now NoTE .thot *'his hli,ll ontg be posstble to caLculate nyluen t,rle hoyrg
acfucrt {obels for )he coseg ivr, U.re aesr Data sET, r"Ylarch nt^J nok
alrnloys be twe case

2 Set "J Ctoss(fiers ;\


Tvtis h,as 4he sek oJ cholces we ltad for our {uvtchon h t l. ie I, e >1,

we sow 'that {fis mov€ cholces rde ol.tovued $ov h( ) , -the )et* generatrzed the
rnodeL becorne. 'le atlhou6ln hle got pel"fecb clo,s.r,iJrers 4w the tmin s,et wcg^,
tn(h)=0 ; {hey f"il€d nntsevabty when applied 1o tes+, dota,.
VG olso vevlse the Xeovwetvic i.h^* rue had iw wr.,n d t^ln i le doin6-
oll"'+hig
2.4
eornetn'c Prcture
ln, ordev lp ar.ralys€ "rha.U h-oppetned fqlrnelri"&V, uoe took

fr= 4 exantptes tn tvaining ze|*


2' dimensto'ral
Xe Rz re +he Jeofurne rectov tr'cos
yrir s t+f ar -11
This is a scatter plot
of the training set

Classifier divided the space


into two separate regions

But the real problem was


classifying new feature vectors
2,5
V /-trynx Clo"xtfier*
Now let rne rernind ylu someh^t {Lthough ran, how totked q lot qbouL l'r-ons v.re
plovt to closstf y oy pveclict the Lobels , v\re h-q\€n/,[ Vet proposed any. mathe-
-vnaftcaL form for {he {unction h-t I +hat rs ouY clossi{ier. {n otrv lecfure
now , h)€ plan to do eXact{y *h.ak, ond rare witl stavt rax{h the ximplestJarnily
called {he }trleav cto,s,ri$er. g, t in order *o cteorLy un-devsbqnd. *hern , h}e
wilL need a vrnatlnewrattcol corrcepb calLed hyperplarte 3o:

X4THTMATi cAL fNTER.LuDE H:pr<PtANE


> Lebs begiw wet,t,r, a rirnpte cqae

,LO r<..axis

\nle hare a *trat6ht li"l. above calLecl o xr axts . Arld t"re lto.ue Boryre poinb at xo
N0rat ts t*re equatton d +l"ir point !
ItraK a. vatlaer +iLLy luestton taut t$ r"rc 'l^"aue to oruroev it , *he equa*ccra,
wou[d be %4 x-o
=
Norttoke rndtat {l.r"ts potnt, ,tA doing ttrs divicling *iue X1 axis or tiyr.e
trnto two regtorrs . 4 fe

Re1;on 7 z <o *he vtght 'l e(.o


Regrorr 2 .. ao '*te teft )t-o
"{
x '. potnK*o{hert3ht, d x.
.
o : poinK {o tre fe{t a{ 2(o
Xo X1 OXIS

Qood rtohc te}s v!4o\€ on, {D the ra,ext cose

o. .tittte
Xr oxi,s Nor^c hle ?ro.ue trxo axes 2cr and xz
le rap hqw o 2d plarra
w€ also ?r.are a -[ivte it^.ad pal^es throgh
tnis plane
lr{e a6crtn ask 'the lues*toru, n*rat jL

aa axtS
be elua{/.on o/ +Lrfr Lile
2,e
9le axis h)e alvreody knotnl +hat *he equattorn, { o.

-Line looks like


)(z = lYL2(r -t' C

unrhere ^rv1, ;A sl6\'


c is <ntevcePk

2(1OXts hle caru taYrite +his qa


9(r+ YY19t1-C - O

But rde o.2o.in waVe ct palteYrt irere {vr. P\r e lrne diwdeg *he 2d plane
ivrto tra:o tre g.iorus

R%ror^ 1 {Uoue the ltne


Betow 4ne j*ne
Reqron 9-

?(1 oXlS
x x,Po ivtts abolne the }tvte
x o : points tcetow the li'te
o
x

Note that *laeve. witt olso be poivr6


x
o x
x exactty o!1, the 1i4e rn:htch "ok^{Y
2(1axk
*te eluatovt d the liqe
o o
o

Qood
yLot/lc tets rrao\€ or4 lD the next caae

7 \eVs c"ompUc.ate tt,is a h{He rnore


?Q AXtg Nornl nre lno.rne 3 axes hev€ 2(r, xr & cCg
j,t,is is whot rare calL o Bd Plane
YJe o,lso lTorae o' plane(in btrre;

{na nrc agatra, can'


olk 'tln'e lueskoa
,,nrhat is the elua*Lo't oJ +hja Plone

4" ntc.thenrahccr'[ geru'uses h]e

a
# --- X2 axis aLvectdy knoro {hat *he equah'oa
oJ

a
plone t! oJ {orrYt
o)Lr * bxn* CXg = d
con again ree '[he.
.{nd v.r
D(t oxls potfevn con*tnued he're
2.7
Jine plone agatn diWdes *he 3d ,=#on into tr,oo Pot(K
:
Re6ia't 1 Abovre the Plane PoinK
Regron 2: Belor^r the Plone Points

9Cg axri
x: potnts o,loove the plane

x x o: potnts be loto llne ptarr-e,


Y
x
be potnt(
Ndt/e *ha,- *hevl- ruitl also
x that {re exactty oru the plorte
x
x & tlltq sa*isj3 planer eluattan,

*--
r'\ /l
\r/' xLaxrs
r'.)

o
o

l(r axrk o

visuallyr
) Ao nord \^)e cartt go ony {uv{ffev
Because -lheve/s rro Nay hle con dravo
a 4d plok' Bub nrecqn vuathemailcall)r
+roE le(s look ok the 1^)e
trqnsl.,oLe -Prts rdecr fovrcovd . EeJore dory ^tmiUaviLies
l.uod Jor otrr R exarnPles' obore
Equa*dorr, d
9C1 r xo = o
frtvtt tn ldirrrenstavrr: C =O
Ltne in zdimenrisnr: Xx-IflXr-
[w Exgtbxl+ cXt - c[ :- o
plone Zcltmenrtcnt:

can say -thsf tf we hnrne d diraaenslonoL sPace irn' genera[ ,, 'the


,6o rarc
equatdon vue ore looking {ov
ts "J {#tu fovvm-
gdxd + oo = O
0,21 + Drxz+ grxg + "'''''+

{1so note the fotto^a^t


ln I dfrnensior.u : dimens
"1 potnt is O
tfl\
ln 2 ddrnenstcrru : di-er,ston -l-twe is i'
lru 3 dirnensiozr : ctlrvrensiorr "1
,# p\ane ts 2
h, if ^)e o-ne -(yr & d dtr,,tevr,si,srtal spo,ce hee wt[t haue the abo\€
elnbovl crs a ' d- I ' divnen*lora,al -il$ry lobject,
L.B
Xou.l a f.*L +lun6 *o noVe A
wrstte:r hr?ucl't dlmel'rsiorn d r h)€ choose , ++18 e{rua*ccna hre ,,*ole
^C
before di,vides the d dtmenstorrtoL space ivtto IWo sepevoLe re?^oru
-thir obiect thAt sahs{y -the e1u akwt
4F +h"r'e cry€ olso goivtfs thob tie ovr, we
ecr.v[ey te, Orx, * 0z %z+.... .+'gdrQ + Oo = o
,rrvobe

vJe oxe nohc *odJ to un-devstovrd {ire crrrcq.b o{ :

{ hypevplane trt 'r1" dtmenst,rn6 "rL a n-1 dimevr:Lonal subspa,ce .

4 hypezplavre *epevates the Space into *rpo sides

lne equatton { o. \F.rPtaYLe n


Oo + OtXrt9zX2+O72<g+"'"" + Ort2CrT' = O

Oo : is ao.lled lhe oJ{sek teYrr't


Line,orc algebra pyovides u-s o neob rco14 lo rnrribe {he eluoltsru
tf v,)e toke
0r Xt
g O2 &x -\y

9n
rrxl x rL nxt
Chen r^,e ccln use the doV grocluct ( eTx or O.x) {o urihe the
efuatton ,J hyper plane aE

Bo + g.X o

Novo +w )tt^t ,J *itis we^) {wrnutaL.r ., lets lcrkat otrz old examples
poiwtinld Z %t-2(o =o i t0o=O +
Or?tr Or=1 , go= -?Co
tine lrru 9.d i*t- hxr - e = O ;022t2+9rXr*Oo = O + 91=-trt, 0:-=1, Oo=-C
gtone [ra tsd
3x3*bxz+cxr -d=o )
glxl* O1eC2 *91etr+ 0o = o

ie 91 gz=b t 9a= A O"=-d


=C, )

}G^ be.fuve r^re ev\A *+tLU "frp,. orae lost +V;ny


2.q
Lets fivsk *ee the co.se ol line in 2d
ctz qk ol Jrne A
+he egua*r an
Or2Cr + 9z%r* ez =O
here cLr-=o
Ao *, = -9o /91 ON v

'A|["rc'
o axts

herre, xz =o
*o 2(r=-e /et

Now torla oi Ab vlsc+or


Oo/9r
(0,-e)
lll =l
o
-\
Ab =[
A
So
g" I -Oo/Oz

o
b
9(1 a)<lS U v.)e f^d *he dok Pvoduct d
9 -l
ue'toz lrrgl'lln AB vtE, gek

( -0o rO
srl
Or ) In, Oo./9 r
0o -0o = O
_ g,/oz

rdl^ct" wleor\a or&y r€c+oY ll4aK atmS


O wctoT.
z3inr.ittaxly ftv *lae ose d plavre i vt tsd hre. harre
xV gr2cr * 0r?Cz*03X3+Do =O
r"rrilten ar
Arny rec+ar qru lhe plone e-an be
., (o,,o'-g) .A
V l,r
.-l
il + IrcA
J 0o/gr
(. & , o) BA
D
vo/e
Sr" -oo/oe
r xa
t o "7

o
r'j,"J=I
go/OrJ f-0o/er
o

a -l 1

:
CA o
=
t \ ,-r-n" ar) I s{e ,7
r J L-3,,,, \
Nor,onol6 g.A =O = B,d
\e,
9c1
Tneve-Io,e 9'i = o ie g wci6t' i3 putpendiculox
[o at{Y t'lne
wctDr ort P\one '
2. 1o

lr.rereJore vnte can conclude


$o, o' hyperplane tm rt dimer'rx.isrna wt+fi eluatora,
Oo+ 0rX1 +Qz9(zf "''{9nX6=Q
OR Oo+O'X -O
{,,e rnector O r^}tll be or-thogonoL {6 ury vector ,lhot ties sn thia
per plavr,e , ie hes tn *he auPsPa-ce de{ined by the
kr-gperplane '
l.uy

Le$ ta"oh) qo\^e oru -lo *he lecfuvrg


F Ltneor Classifierx
Ok ,now hle qr€ ready to *tudy our frvsl c\ossi{ier rnodruemabtcoltry,. 4nd {he
problerr.t hle hod tvt vyrind is the rnwte r€coymrnender, nrh*.ve I rnov{e Jrorn
test doba .get t^till be oa*igaed eitttev +1 or -1 lo.be[.
VJe oLready knoru r^rhot a closst{tez does $r *^r problern. A+ divides -l}re
Spqce r,tvhere x € R,d -tirre into tr^lo regrons. (For eur example r h)€ hod"tt€
btle veBtor, oytd the r"rltite regroa-).
But the :tudy of l"r-yperplol,Les eorlier , veveoled {r-ot Lt {roo does the Aqme
flnqg. 4 hyperptone in m dinrerrar'ans rrs a n-1 oJirnenstcrnal subsporce *irak
divi"des .the n dlmerutsn aL Spoce info *,'co reg,iona .

F os. oux dossrftev, nrhy dor{+_ r^}e ,^*u the l,r-etp o{ a f.,lk"pfarle
tn srder tp$Crst,fCnct out closstftei h C f ?
r{d h}e h}tlt [nde ed d o exactty .ttr,at , Ide rarill norc tackte the rnorrie v€cornrne-
-ndev problem r usin6 qprplanet L*lp in .f-or minq o cto,lriJrer.
-t Gr": nobe that a
hyperplo.ne is oetua\ 1-,rrt, a lwte, r^Je alce in
{ dtrnensiol.ral s ^rheyt
Pace
Xe dec{ded eorLr'ey +rc keeg *}ri ,sirnple, {trat
e f*"fu re \nector ^gA
foy ith rnor&: X(il hr-rll hore *raro {eefuves fq Xtil e &z
Ao our hyperplone will be a li4e in our exawrgle.
{he wtat*revraatfcql
$rntula*oru .t]rot nle uottl r,r*e or" cleyir e rarttt be
)tor,'relre,r
appricc''bte '{or cLnJ pvoblem ol
t^ro - ctqss ctorarJrcokon , u.{tiu a ganeraI
fe"ture wctor X e-Rd
v{e rnoy nob be obte +o vis\rotixe it nrhert d >3 but *lae. mdd^t*ztattcaL
ideas hrtll revnain,
the aome

So buckle up, leG do it


2.tL
> {r,," (dea
hJe hovre atil 6 Strz. le the f eoture recbrs aye 2 dimenrtonaL . ,Ao rne need {o
divide l,lne IB2 plorne in 2- re6rozrr, *'"8 a.
2(2 DC.

divide the
fr1 plone

into hoo
reAi.or/ts
ustng a
ldne
*.1
x

Now *he general eluatioru o] a line is


$tXr+ 02Xrtgo = O
lirle is aatled
Tl,r'= l.uere Decr . Cti *he*arm yrnacldne lut+ni
sroN BouuoaeY
fr
peopla use. Are yar o. rrnochivte ,te,axniag people ? at yes .flrr.n r.r,se .tfija terrtr-
In generol d divrnenstons . {ne hyperplane wtll be cqlled -lhe decisisn barnrd"ry.
ok vtota {,n ordev *o corrg on"etgxra Jorr^rard , hre hrrtt Jr"*t *inagl(5 *he
vrarrHa a hit
" h)e yrnll -let {ne dec(si# boundqry , pqss *hrotrgh *tS*
We nrtlt lal,ey *ee the getnevot cose *.2-
but f*rst tebs see *tt[s one \
tf t rat [s {he cas e the n poivrb
(o,o) rhartd :attsJy +he equatcon
ie 0,.0+0r.0 *0o=0
+ O6=O
J>o +he o{eet tevrn O o .t,c O
(n" el*otton o] livle becomeg

9rrCr+ 9z%z = O

Decisio4 laoundat1 pc*z;u.g *hrougf, *;?rn


Noto {eK h^o\^e or sbep {urther
2.12
Now rue wont *o {ook of the r'rector I
hre krrow *h.at r'ectuc g iL orthogonaL
,t't
As
t,

to tLe lT-g[:evPlone (ltrre here')


Jhe real dirc.ckon al e wttL become cleor t (a
ochratlg kvroral *tT e numerica'l
rrrt{nen ntC .. o{t,
votues ol its cornponenlG . But {ov
non hle hove ttrro choices
hre con ei*hev c.hooge optton A cr t
oPt* B. \,oe choose optccrn A ( r^!e cpr.rld,
hale \ ery vrrcll choosen B, it doser/t malter) *l

8u* nohe +h6t these two directo.rs atr the


onty chotc€s hle hcrrre as these qre *he
o[r*v dtvredtqls orthggonal {ro the -Itne

(r)
X
t g g
I
/ olr d.g

./<- *
-
;(a) t
)lr 1

I
x(2)
I
I
ua
x (+)
Here hle see {rco w c*oys that Jie arr.
Regton By deffi oJ do! procluct Here tnre Aee w,ctors ta.ob tre
*r,^lo on
Reg.{"orru By def 'n oJ dor product
0" x = ll e ll llxll Cos(L bw Jhe -t'",o) 0' X= ll9 ll ll x ll Cos ( 4 bro *he {r,oo)
o. x = llo ll llx(tl Cos d t
g. x(=) ilOllI X(3)ll Ccs o(r
O,X = llgil [ l'11 Cos o(z =
O. x(4) = llel llx(4)[ Cos 4+
+ long os *he o x lies in fegbn
A* Iong qa +1e vectoy X Jiee iwQegion2-
fyre ongte betrueen wtll be betuoeen
o 10 T / 2- flaerc, $o.e Tvre angte betrrleerr , hltlt be betr,oeeh
tI/Z Lo rr
g.x >o for^ttX inR2ranl
0. X ( o {ar al,L X ivt R21on 2-
2.12

tro norJ hle I'uqv1s o neru inst8lut


We hsd -the dectstcrrr lcoundovg O. X = O possing thvougl"u origr"rn,
4]"d uUe knoy,l thaE
it diwdes tne sPoce imlo taro rc'gron*,
T-lue rrec+oys thot -l,ie oyr *lre sic{e loua.lovc{s ur}uicln-
g poinFs t rctt l'uorc
a posi*trre dot pvoduCb ie O. X >o tov X elong g/s :ide
Tyre. vecboys that -lie oyr the side opposite {o rro}Trckl o pornls \"rtll ho..ve
a vreqe^ttrre clot pvoduct ie O. X<o {ov X epposite to O's divre(kcrra..
\^lttfr this tr,tsight h)e can deuetope a c\qssifter os follor,os
-+ uoe heed a ctosslf ier t guch *hat
h. JRz F--> t+ r, -11
^ + te it should givre ou$uk +t or -1
-+ r,ohg dorrL hle just to,ke 'the -etgn cll ff" iravrerprcducb O'X for
a r,nectoy X {ying in tr
h(xi 9) = A€^ (o'x)
-+ {Ihrs u eluivalent b .^toyilg thot IL doz,,ri$es all rreclurx ira,
R?* 1 aa +1 and Re6*orr 9- a^ -1
9<2.

,.\
q/ d>

,\

s X1

Ao to coneLrde

Decistovt BoundorcY O 'X = O


Cto,ser'fier : h(x I e) = ,& i6rt ( g'X)

,x(6r^l tere r+e rnill ree 3 degrce oJ {reedout 'th"t r"re .still har,re. .

fnr:s r^rtlL loLey fuUp tx


2,4
> 4 o{ freedorn un u,sed
degree
Norac look of the exlcressicrr oJ {*-l. deeisian boundavy
O.X: [9, gzl %t 9t?C1t 9:?(z : O
x2 J=
\nvhot l.r-appens il i ct'uonge g to so! z5g r Let6 see
s'X : feser 25021
[ilil =
"5(er2(r*0zxr):o
u:hich eons' rhe e.quaron
^
4nd t?rk rs not t^r;';;;
{ 03,",ljl';.T,;;rl
g
n+ur fl," same
Joy 2E bur aty c o r,^yheve e erR
{vtu Poi^t here is as long aa g {s repraced
decdsiorr bourrdary y€ranoirzrs-+h"
by aome rnut+tpte eJ €r, the
aqme .

{v"f ts otso *rue {he clo,*si{ter


fcn

ry c ls soyyre reol posittve r,-urnber then


'["tX3cO) - ]€^(c0'x ) = ,A,Bn(e.x) =l-L(x3s)

/o oll hzr.qil^ev\^.oh,cat {or*latton , h]e Aotnl +tU nouJ r,oornl get c{{e&d
t,T hle use O oY cO r,there c.Ge-
lnis is a degree e/ Jneedowu rce Vrqrre, ie \de or€ f".ee *o choose elv\d:
posihlre, uzr"ulttpte qg , arr,d oux decrston botrnd*J anl. cto,r.li$'er ,,&t[
the -sqta4.g
reyrrto[yt
Dut ttote *hat if I ,A reptaced by cO . Ttre vroym o{ rrec*or change
ie tle ll = 9,1 + Do"

llcell = cag,'+cLs1 = lcl lloll


,8o the odditto^q.L dEree of {reedorrr r^re ho.rne letotes lo the, ^oyvyL *
the O vector , urlrr'ch rarc h-arer,t'l {fxed utp untill hon).
hCe r,"ill Jotez aee in L-ecfure 3 that tla-is norm hltll hutp us tp totwr,
ra:hat ore c0lted lorge rnorgtn cLoss'$ets . Bub that,s Joker"

Srsb 'tet( leneralise f* +hu case ,livte ond noL juat &1u
posstn5 -throu6[,u *W* .
"J "ry
2.75
)Tne generol cqse 0o # o
C$ gou dorr,t wol,rno be bothered t"'d+iL .lome tedtotrs cqlcularkoa yatr can
:ktp
be :'inatuar!9r
*,tis pozt ahd, qssume youvset{ +lrot-the clossiJrer ![or't*uis e,sewtll
delined but i{ you qre curtous heres h}hati ho'ppeninX
> Trre equa*t'oe { .trne ts
er 2(r * 9: Xr-* 9o -- O

h el orfgrv,r, to lhe 1i4e


distcnce
> hre dyaw q wc*or stoz{t4g *r*, ortgirt
and eradtng at the ltne , orthogonaL
{o *he {tvte
o
> 3.f its orbogorraL to *he .Lirue tttis cqn
b e r^.:villerr os lts
) Jo A oY -r' = ld wh"re A e R,
Poi,n*
> anis hleons [-e = Ad = f2o, aerlT
> 1f polnt A l,'es oy,r the }'ne tnen it rnust sattsJl its eluattcnn,
there$re gr (1e,) + Oz (Aer) * eo = o
9o

)Jo *lne perpendicular ddsternce of


Hr.
origin(o,o)frorr, -t_iy,re is
ll oill = ila6il : ildil = leot
Udtt
) Now nobe clue to our( construcksra, oo is lteEatrre
becouSe rd
.crrn
onll be arong d ,s diraectcoa if xf I posittve r otheyu*e
it wttl be {o ltre oppo"}te dtve"t . end rroe found
-,
1: -Oo =+
oo ts negalcve-
[6 il"
Notrc e\^ey
V 'thtng -r"ls raeady - Lets fcck at
-1,
J
$. X +9o
we knou,c d"i -- [d[ lrirr cog c( , ao abor,,e eqqo+i"cn Le,r-es
Ud n Ui il Coso{ * 0o ! LeB {o.lce n-"e n outside
tdu (r,Xucosx + ,ff, )
VOe olgo krnornc Oo b ne3atue due {o our construcftoa Ao hle cr.n ,r'v"ite't ar -lgol
2-,!6
7 ,lso d "i * 9o $vlally become8
v
cosc(
lr o il U* tt I

ITEII
ool

)
.c
/o {his is
,q
il?ilcos< : Prol'ec*corr oJ arly rcctar,X +
oto.tg d rs diracte on
r
tgol : Perpendiculan disfance ol llxllCos*
ll9ll 'lo {he ltvte
g,,tr'6ura-

dertred beJorle q @
v
.6F
q9\
Gr any rre,c-tor X t'vt R.e6ron I
J
tnereforre x.b^ (6.x.*oo) > o
st or,y rreclov x ir,r, Re2'ton 2-

ilVrere-fore hle caro generalrse aqy cla,xift er

Dect,ttot %aundarl- O,X + 9o - O

Ctaut[iev I,u(x.] gr oo) = xt6n ( O.x +go )

,rlt*, rare ho\€, our first clar,r.rfier , Conyat,.l^aho*a IIL

F Corrstvatr,r* strr( clossifter


"f cqrL clq'&fy pYopev[
fl"tthough \^re |ucpe o. c\a"trifieYr*ltts c\oes laoF rfleorLhle
-l{rat we vrnoc\e 3urt now
nlhat t wteon {o Ao) iS , +he Lineor e\aur{ter
'\/n 9-d . VUhy woutd it , so\w e\reIy problent'
iS ,r,r.o{htng n4oy€ -\t ran a ttle
-tlruot we. -thvour at i+ ?
+,^ro -.,r:+"gory c-\oxi$tco*tc,?t
"J
fie po']\t here ia there is a srnoll cotegory oj . P"oblerns Jhat
',Livteov ctosstfiev ab ole cotrld tockle gropetL;
ou7
ou}t *rotvting doba -fher€'S ,,.o gt^o"o.rn'fnt +i'\ok cl.tL
{.f ,oe ,Dtorre ,
Aee +hr^ vtsu"l*
,yauld be clu.lt$ ed-yrry\y. Lets
fr,*'e
2.t7
?LA
Here rnre h-ow aome *roinirrg daka,
+ t hJe see there can be vnolty lrvtes
+ + +huough origrn, *tnnt coYt c\o'*ifY
\ +
Qcrch poivtt properl;l
"11
,Aorne ore drahYt4,

+
+ +'+ Herre, hle -,\ee Eome {taining data,
++ +
we see +here cqvl be no line {hrough
+ ovr.gun, rihot corv'ec\ cta,s,l,.L{rer
otl the potvtts,
\ Bub *herae altll con be rrT any irnes
[e ltrzreerrt ClqrAit u, 'thot con do
or-rx job
Some CI.ve dravoar'

belouc ' lde Yu^ in'to o' problern he'te


NouO took at {he exantp\e
No MATTER horc haxd \^)e *'U
hlilL ne\€Y be obte {o {tnd
)l'2 o"
\^!e
+ li4e ie a cJo,r^rfieY , that
cta,u,iftes jll +lne &atrting
+
pouvtts corre.tty. 4nd hle a'^e i*t
u9irt6 4 e:YoY^t4ples tn L dimerwiot,l
9t{ here, .

E*ry line r,ue *rY {atts ' t*'s ltot


*1
\ gossible
us {o 4le toH'
{nd this brings
.{ineax eepovob[U, d a *et
oJ

{hqt rue wilt :fudy r.ext


.fni I +
I \ Xr
ts
{s
2,LO

tr Ljneolc Seperafio4"
Jo hle -rqu, eayJier( ,tla-ct in ar.der to Jtna o ctossilier.'{il.*d,, h UNEAR,
ifie polrafa in trotnrng reL correctty r v\.]€. vttll need ,aorne conditcoa
and cto,g,r,t$er ALL
to loe xattsfied ond {rtror co rr-ditan is folto r"xng i

Lebs undevshand tais properf


$I)€-t t-rndevsLqnd this teyrn- a
yti' c6 *ril a 6 ,)

Z,O ,(ee 4 calr?-L


Herc. hre coyt
{hat h}LlL co\^eY aII orrrt
1.G) lnequire YltenLg

h,r,stde the ctrcles arte llae


+.e aciraL tabets ol *}',. vectors
2.o Lel6 see +hern- one
by owe

Jnis is{he fine


A .'\
g.x + oo

1, O : tr:'tnen fafure wctor *,t'+h +1


/.\
label lies orr *he opposite stde
"l decisian bounclavy v.rrt I vrgch.r
(i) ,\
lnun : =+1 D.x (t -l Oo
)
v .)
= nqalir^e
{v,ere{ure: y,i) (6-e6ti1 +Eo) :
<o MISCLAS(IFIED

2.O uyhen feofurre wctoy hlt+h -1 tobel -lies cnr *he


opposilesicte
ql ehcistsrr boundovy wrt 0 \^gc+o-r
-1 : 6.xtil*oo=nqohve
(l )
{wen v
{.","$,e : y(l) (4. *til * oo) > O : CORRECTLY CLASSIFIED
2,1q

5. @ : hrhen feoture rnector


^)t+h
+1 .lobeL , JoW on t0re .6om€ xide S:
deciston boundoz,6, t^rrt 0 rrectoY
"*

In.n:. y(it:+1 ; 6.*til+6o = Posihrne


lrnerefore: ytil ( $.x<il *6"1 > O : CoRREqTLY cr-qsdrieU

4. O : r,uhen *he feature hnth -1


rnectov -lobeL , Jortrr o4 tln-e .&c(vzte xide {
dec{sCon houndarl r,..srt 6 uectrr

Traerefrre: ytil (6.rti)+6o) < o : MrsclissieiEp

,Ao \^)e {.^"ttry 8"k tp see *he f"ttor"rir-X-


whenarnectov.ta MrscuassirieD : ytil 1$.xi)+6r) <o
ulhen o. rnectrr is CoeqEc{uy Cr,qssirrlp , ytir (0. x(i)+ 6rl > O

k Whr,l" in, '{ifie de{trr,tltorn { .l.trlearc }epilob^Li"+t rrre ra.[d.


ytil 1$.x(i)+6") >o {orolt i=!,L,%....n'
vus are just s.tr^& {hat *te .Lin€
(ov h'6pevfl'ane) cta*ifias oll {he PrtrK
[ra, the traivttng' correct{g Jo *he defti,titon ?,anbe botled do,,rn to I
^nt
Def i.

4 Set Sn = t (x(i), y(it) , i= !,LF....nJ ctre lineonly :e.perable if


tde cayt {ivtd O and go ie porometer vectot and oi{se'[ pavometer +ha1.
Aeyzr.,le {hem . ie if {^}e cern find a -[tn€
#not seperates "t[ Point's correcl(y

T\"r.t is vedundaYtt

Ahd 't$ lout< at tt ctoselr , tt absotute!;r aays nothing at all. {+


^*
soys Yor{ corr covvec{y .t*Jy cr.tt poirtts using a l-tneax cta,*ifter
JusV

U* con fd,"cl -tineaY eto,l*ifer *lnat cqn ao +{rat


,$ ct

Out +his d{inilton is rneeded jcrr{fte ney* aLgoriU.m 'lh-o+ h}e q}^e oborrb
to ,uee c^orLled the perceptron . rryhich rrelies on {he foct +fia}
o" .&rlb.thwy,^ltll be {ound lor A rre,ctoy avtd oo e}!*et pa'tavneXer
ontg if Sn is ktnecr.hT beperable. But {trs{ let( cafculat'e traintng errna in,tfuscare.
2.,2o

y Traintng Error Jor Uneor Ctossif ier


Ne eorUev defrned {rainfng eyyq^ as the izac*tcrr poinld i,r, *h"
"J
troininq set -tltaL welr mtschssi{iecl . Here jo, t}'," cose t Aneorc
clos si$ier ltre carL sqy that

htx(i)) : g.x(i)+9o
h)e otso fq"vrdout that (vrespecltve "l *h. lobel t+t * -rt if
,til 19. x(i) *go ) > o 1laen point ts cott€c+lyr elu*'i{."d
ts
,til (g,. )c,i) + 0o ) <o *he potn* vnis ctossi$ied
lvrere is o cose rnyhen &*fute uectar wtll lie on *he hJperplane [line
here ) irn -thott cose
o.)c(i)+0o -o E+ y(i,(9"1ri)+go) -o
y0e r*ft[ a\so consider 'th,r's co.se qs an qryc( , heccruse xnr^eotly
donrt Knoltr hovo 1o ctosst{y it
.If you rernembev ltre If. n double bracl<et rroha]ton r h.]€ hod

LExpresstonX= 1i{ Expressirr,lrue


o if Expvessirn fo\se

.Yov 01J- e.YT srs


y (it (0. xtil * Oo ) < O wlll be *rue

{vle.e {o* t^re cc^n, tarite


n
L r" (lt) trt[e, 1= 1 I I yt[l 1o,xti'+ so) / 0 ]|
= e.
11.
L=1
=

Noto t^r€ t^'tlt ftnolty see l.he PercepLran Atgori*ftrn , *hot Snds d
li4eor cto,ur{ter , iJ {hene exisK ore .

tt t,tlttt ftnd a ctasstfter if the tratning se| Srt +f^-at hle


I,r-qve iA Unearly aepevable. wtlt rtoL be a unilue cLc"ui{ie< a* there
fru's
ynq! be movL! o'tirev t-irrr Ean daui{r'et that con aceomftslt, hn job

Let's see i+,


2.21

F FERCEPTRoN
tnsteod o$ Lqytng the algorithrn onyou,yug tocmld rather aee fuot '&comes us
Seometrtea.lly . Now hoEe t{ac.t !r1re oY€ here, in seo.rcla- "J q- Une ,lcuE it 6 +futtJ
clectded , ohce vue l.uqrve tlae rrectoy 9.
{so nobe {nab r vtre voctl see lfie cqse oJ {lne possing )htou{* mLgtn , i*t fox.
,sintplici*3 .
{so in ordey Jor t}us atgorithln- lo be ruccessfuL , r^re need ltneartg aeperable daka,
fe rue tnxtl need poinlstlaat conLre c\iutded/classi{ted by o Jtyr,e,
Ge ponsl-Line/ decrston bound,oly tnrill be perpendlcula'u to -tlae g vectrr oluraXx.
L.at us loegrrn"
) Leks fivst -roy tilr-at 6 {s t3l
1st Poilrb

luppose our algort{hrr.r encrr,rltterc *he 1st raech'r


*ct) =
'l .l,obe[ = * I o
t 't 1 I
r,rr tetl out( aLgoxtthrvr to drorroa rrectot I
from orgivl to this po\rt crnd maketk +he v\en

ttl o
1

-The lelea *tntple , i& o potnt wt+h +1 Lobel


is \
f$ g {hat I make [s potnted lovrlar& -l,he one poivtt thoL r.te houe tlnen , by
de$auLt -tl^,rs point [s correatty cta,rrifred
Poivtt
,suppose the next poivt is ,c(') = label +1

Now i aak vrnrl olgori{hvrn,._1s *he neyo point


['l I '^rc+h
carrec*ly
clouifted occorcltns {o *he O \^,e h.r\re
l.tere hre covr Jee wsuatly {hat both poivtts ore
fu the n'g'ltt eide d lhe ,Ltne tivr bLue) I @ o
+
Mathelnattcatly hle ark
\
) check if y(") (6.2d") I ) o \
L*VEs becr,.,se t+1)[[r,rrI >o
l]l o 1

Io rnoue ota, 1o {lae v.r e x +p


"L"t
2.22
3rd point & 4th poink
arre polvlt is qs Jong os +he atgovithms
hencour,tfus
1
@ o
ttew potvtts thot ore, cprvecty ctosstfded occovdi^g +
to oun I , hle dorr/t, neecl {o u:ovry, because
rarc lnoue o covrect closst$er

Flere we harre *r,rlo nehc poivttr -'l 1

x(z) lobel - 1 drpmaiyrsanne


=
[:il o
-1 \
x (+) [-.sl tcrheL -1 d yeryrains <arrr
L-.5l @

5++1 int
@ 0
{he 5{h potnt
-l
Now corvregthe trtcky part', Lel3 sqy +
eutcounterred by otgovi*hna ia

xtr) = -labeL -1
-{
LI'J 4

when vue check i+


6 -@
) check i+ y(s) [6".xts)) > o
L _i ( [r , rr ) ,* ncrr ]o o
-t
[].rl
/o fals e
g66 t*rat'the poi'tt i not cl^^eclty clossi$ed
we olso see -le^ "*'
{he cu.rvtvrt d . ,Sotoe'wifl houa -lo updateit'
ocovdtlg {o
one second e're'vy'lhi^g t^Ptft how ' and anst'\tfY +h^'
,Xfouc jrrst iovqet {or
voftat rcould d be if only poir,t 2t(s) exfrtecl '
il beeru a wr-tov {tcrrn' ovigin lo *tt' lcut wtt9t
The crnsyoey is roould ha.rre,
{o
lcecorrse rrue wonb J".ril; rnechrvs r'\rg+{n tobel -1
a negotwe.
poi.vtt away ^ig!1frorn {hem -Ao t{ +here wos only
rHo.trtd ;.; un"r" v(il ' d y(t) 'x(s)
"' point 'c(i)
one xts)
*o the probterrn ' {ne algovl{hm saYs
N,lrro t,rle cor,r'ts Faek

0 new
til 1

| :,j I';]
2-.23

te the algori*hm .LW to ftnd t{re new r,ector


New e \ectoy = Otcl {fiet
tfieta vectov Netn g r,rector *hat cto,r.rifres *he
classiited + he.^? point correc{y , t'J the nenr
pvevious potnts veetor hlos otoyre.
covrec*ty

Lefs see hornr 6t^r graph -[oot<.g like h]it{4 d =


El
\,^!e aee *hot the x1 axls itsel{
hos yrorar become the dec(sian boundaty t @ 6
+ +
ar,td aLL *he point o,r corvec*ty cto,usr'{Ced

Now j*t or *he {.^ol ne^it in'the -t {


Decistan
baundov2
eoJf iw nle hH ll add qnother
pOtr,tt
@
@
e-th poLrrud {

@
?((6) -2_ lobet = *1
=
-.2D
I (t)
6. x(t))
*he poivr* t^)ill not lce properly ctassified beco,se y (

= *i ([o , .rl [:.fo1) = -.rzs < o


*he vrer,l
-.t
onen =
dotd + ,t6)*ce)
o +r[:.;,]=f ,-
t I
.5 ,25
I

-gn"u'
J
0old
a
I

f +
0

A I

+
y(6.)*tcl
@ e/
@

g/s ore veeftnity


added h pnd
b/ t
2_,24

OOPSIEe eeeo
rae-c+ov d cloes
t'r.6t r^rhevr you then Bl"t , \^)e hlere alc oub -lo end. Th" ne^)
-potnts properlT "
@ & @ otre. ovr
ttre utrcrr/\g t tde
hot classtfy qlr. the
How do You jeel ? Do You {eel
like an idiot nounr !
you ore one You suck.Ll.l, ' Borroa t!\
nlell you should , becouse '

a' trick nohJ


Now Now clowt be *ad ' t wilL lell yotl
trlheyr w€ cryr. proutdecl {he clata set . lde raron't be provided
-the pointS
Ohe aftev -the other. rde ranlt lce prorrtded oll" t{ee n (hev'e 6) potnte
toge*hev " ^6,o u.re ccryl choose ah! point to be *he 1st , hd , Zvd
ar,ld vt{n . lts up+o ug - 3o wE $TART Aqeiu
y!1e , r,.:ho t's o. vrnatherrrahca[ gerr-ius tells y ou 1o clo-{*re folrowcng
^Bp nord
Take ls* pivrt 1o be :Cts) prevrleus\y .

we Eet e' = -1- I- t-l


thts won4 cto,r,ri{y sttll
belierc. me
h'5l [:;J
-(oke 2nd potnt tD be xL4\ p re vtousty

f .rd-x) = -t.(t-' rl -"5 ) =-(.5-,25) =-.25 <a


-.5 I
Ao
dn"^ = d*a + Y(2) x(2)
tel ri ldre nerc
,Eecond Potnt

l:; l+e,,\1]
=f il vrYlnen rare sdavled
O.go.trr"

Lets loo k tnrhat happevts nohr

IioL{rrL 1
+ +
h)e nornlfio.re a ttnec.rt repeva*oz &
hle dont* rneed *o .t.ook at Jurttrer
points because ff"y o.r.e atready 1 -l
Correcfty cto*a{tecl ), ,,rwnt +
,J
Change g ./o o
I
2,25
,So *fre Atc ori*hm is sornethlng like {r"x
Inittqlize g =O
Choose a Sequence ft* 1 {o rr- lo tterate ovrgf,

*or {oop in i
check if ytit 1g.x(i)) <. o 6o to
next
UYrs d = d+ Ytirltil (

b N o Dor* do onY*hing
Afier end { f"r( I*p
,T d ctaut$es all potnl( correc!
urle found *he ctassi$er . ENDc.oDE
iS not sruulJte -l*re indices

,[ol a -r {nre hrtl't4 enor6fi,


long 'f ,t6d.
fi yor do '1fi^t3 f4+lr i,,n" y61.t GIA.ot

Aavisur desuz you wltt ftnd a xotl*ton


fvrp qctraL aigor('lfrwr -lookA .tike -lt"is

Note +4^dt PevcePfro't {trrc\ A ,go[u'fton, {herne con be manY rno}€


,solu{tovrs f", 4he Sovvre {rolning aeb

$evrwolize *}u's vlnen


Ibul v.Je tdill xee hornc NE COl/l fl"ere
ig qn ofr*eL Poro
MeVeY
2-.L6
) Perce : Qeneral Coae
we o.lre ord y Knoutrlo *est cto*iS'ca*coa hle con do
yto ( d. x(il * go) > o oy 1o
l*e rrea I *vfck ts irt updattng Oo 6r *tds nre tttnk .l o,^r, problern-
os $nding q ne I^.) vec.b7 6 / flnaf hltll have a.n odd'rltonaL .[o.st enry

{oo 6

--s
9r We hlill add Xr
g Oz on oddittsna\ 2L2
x
9a Ito :
2Ld
Oo d+l xt *kre lost- elernenl-
o{ ecrch $nture
I
)
d+l x1
\nectoy .

,tl^d update jus* ttke be$orre


tf:
x
v X2
\ J Iti g old +
-.l
e vl EW o old + , ,/tt' xd 1
! J
+trutc hlilt gtnne us go heru = 0o otd + yti)

fu.n otgori'tf '{ooka like

thrs pvtvtqs us lp jhe end d {h" lecfur'e

Check
"t
t hny code l2_perceptron_visualization.ipynb in the shared folder
to wsuaLize a peTcep*ron
FIN"

You might also like