You are on page 1of 23

UNIT- 4

INSTANCe BASeD LEARTNG

t n cohsast to lraning melhoch hat cnstud


a genesa, exphct desasplon o e target funckion
Ote
homdod ,
Tn slane-boed leamng constuuct -he logt
funclion onby whn a new instante uust be claitted.
Tnckead o toomng Enplhct gereralisaton,
it compores new obems wh nstances n
bhich ane sBoved tn memoy.
foch ame aa new quey nstance is en countoed
tb relakonshap to he trertoudy stored Eramples s
Boned in oidey -to uin a tayget funcior
tuncton value fy
Ahe ne nstance.

Hezglet Leght Taget


150 Medum
155 55 Medun Mediom 4
3 160 lange
4 165 45 lage 2dawes
I57 54

whefver We want to clauctn he vkeo insBance


Ahen h velationship of hee 2 snstoncas baud on identfed
rainiag , baud on that angt
va.
D Laug leannes (eg: kNN)
Thstance- boud ) Radial baud nckons
Leom ) ase. baud Reosorng
-’ Tnsian (e baud leontng include, neoot neighbon
and locally Lweghted xogessiort mehodh, hat ascume
tnstances Can be depc sented as point, in a Euclidran
Space.
-’ t also includey cae- bOd Veasoning mehod
Ahat e nmoYL Comylex, jmboke Tepre sentation afor
instances.
-’ Instante -baed melhoo ane someimes caled as
lazg' leaning melhods becaue -hgy dloy
a new hstance
nstance must be clasuhod.
Procesing ntil
’ An adrantage ot ths And delayed o) laag

functon once for he entine instance space, these


mehod, con sckmade it locally oud oun
hew instoance. to be cla ssified.
Thslonce -baud leaming mehod duh as
nAest neghbor aud Jocay wgited Xgesiof
2sSiof Cone

concegBally slaghtfsuand opoochey do arpoinating


eal- vabued on dhscwte- valbrd tougel fuuctor,
’ msdote -boud ogproaches Con Consuct a dilfoent
apoimation to the toyget -funckion for ch dckinet
nstake 4hat must be clossfted.
Advondages o Tmskane-baud leoninge
Traiing is vey fast
lcoon complex tovget fuucton
possbity to dooje informaton. becawe tntre
9 No
instonce space is Cued to clouit lhe neuo instance.

)the cost of clauigg new instancey cau be high.


) n marg msBane -basd ogpooches, spocially
neoest neghoa agpoaches, hy tyrically considen all
aeibutes o) he instonc, hen alempsg o eoteve
fom mem.
on a fes o he
mary avalable olhbutes, hen he nsloncoy hat ane
Aaua most 'Sonlon" noy sell be a
:
- NEAREST NEIGHBOR LEARNING
basic insBanc - based nmelbod ie he
’ -he mast
k-heasest neghha alg Point
nslances Corurspond to
Onemes all
he n-dimensional space
in
R alsbute vaue (ron, n ’ no: of dimensso%
The neocst nehbors of an instance ose
trleons o he standand Euckdean dstance.
let an onbiaat instance xbe descnbnd ba
he featune VecBo
anl)>
<a,o), a,)
Hene, a, () derdotes he Vaue af -he
atfrbute. af in stance x.

blw 2 nstances x audX


Then he dstance bjus
defsned to be d(s, "), tohe
(a()- 4, )
don )
YI- no: of allvbutes

ncaset nbor Deaning -he taget fuckon


-’ In neave
moy be Elhe ctscete - valud o) eal- valad.
’ led us fst consi der leanning discvete- valued
tonget funcBiom o< he form

V’ finte set }V,


-the -neast st od neighbor ag -for agproximation
a discrede mvalued tanget funcon ís given below

-’ Fr tach training exomple <n, f)>, add he


Exomple to he Jist Araining -examples
classtcaton
’ Given a gusy instance X to be classtfed
Let X- --Xe deRto hek instan cey <from
hat ote. heaie st X
- Exomple
Retun.
k
fa)e amax
veV e|
S(, f))
a-b a
&(a,b) =0 Colhentse.
-Ve

+ Hoining along oth a


Juei instan oa Xa to be clacsid.
The - Neostst neighbor a
dossiftes 9 tve, whe ay
6- Neasest neghbor cassfies
t as -Ve.

’ # epresernt, the decis;on.


Sunface indued b he
1-neosest neighbor ag
fox a *yricad et af haing

he Convex rbgon Sunoundg sach boaining


indicotes the igon a instance space closest
to that onot te, Ae snslance, fo which he
1- noest neighbos ag wll assign 4he clauisi catio
ie k Neaest Neghoor ag fa appaoz:ivnaton
a a real- valued tooget fundhon 1s fven belouw
f: RR.

’ F® Each Aaiiag <«f0)>, add the


q to -the lst ainng -exomples
dass:tcoB:on alg:
’ Given a quoy instonce 'X o be dassficd
let -- --X denote he b nstance
from tatnt ng -ExOnples hat are neoyst

Retun

Pistance.-be yted aoest alegnbor algi


k
gma W, 8( f«)
veV
whene

d(y,")
4
Can dis tance - weight he n stance, f8L
Xeal- valuwd dangt fuuciorm in Sm:lan toay

Once We add dishance we igntyA , Ahee is


no ham n
have
olleuing
an ingluence on the
all trimng tg to
classf;caton the X,
be caue Noy distant ¬ togll hae Vey ltle ct on

he disadvantoge of considening all gs


hot oun clasefren o;ll dun move

If all Oe Considene
tihen class a new guog instonce. calel
a global mehod

ong Ahe ne oust ainn ole

conidoed oled ocal melbod.


Remane on k-neaest Neighbouwt Aa -
D Orslance 13esgted k neaest neghbor is a higbly
ectve algortam o mang practol troblems.
) Rokust to noisy data f he
taining sel io
lange Enough.
3) Bias s hat he. clossficotion of on
instance. ß most
Similan to ohe instance hat ae nearlag in
Eucktdean dtstance.
) nelevant albud ae a tnoblem. becoUse. distante.
Caleulated. on al attributy called cunse of
dimensionalit
5) Some aproa ches weight alrbutes to 'oVencome thy
Stetcng Jhe Euclidcan space detennine d. auto
mat colly usng cvoss- validaion.
) Jhe n nsk of ovefrg The agproach o loalty
axes is much des Conmon.
corn
) Prachcol (s8ue in k-ne asest neighbor

This processing untid a new

nofi cant conpulation Can


cay be euie o
FRUIT. to
Oragei from Tomato dicloute
o Cince
4
3"6
Q.2 =45 =
dstance clidean at
Eu Fosmul
? 6 tomato
frust OMage
3
Protcin 6
nuts
vegetotie bean jeen
3
Jape
fout 5 8
gpe Cunchines
Tood Sweenes
Gunckines (Ingiedtent-tomato
-6,Soecney ,
)-
in6lonce iven for
oyre 4he predct aud akNN Ara
food
Locdy Weighted Regression i
ohat s Reqessson ?
9 a stal;stica mehod to mode e
eloBioip ketxen a degrdont Cange) ond ndoçendat
Vaialbles ph one /mole ndependent vaiobles.
belp uy to cndenstond hou)
Kegycoson analgas
Ahe vale d the dependent vaiable is
Conesfonding to an independent vaiable ohen othe
indegcrdent vaiables ane beld frxed.
# predict tontenuoo ] real value Such as
tenpocduse
Locay 1ghted ogyeacion
’ loalyy ted Regeasion is instan e - baud leaning

locay weahted Regression means


Joca. becawe. the funoion is aproximated based
on dota nean
ne ha

Desghted becaue he contibution af fach


s we:gted bg iy dhstance fom dhe
Xegvess1on becae. his is the tom usd widey
lakstca leaning comnuntg for the problem of
aroximating Yeal-valued euclio%
Given a guy nstance 'N.
new

the genemal arpoad in


weighted eqvession is to consthuct
Opozimation

’ this agproxmakon s hen uscd to caleulate


4he value A) hi ch is oudput o he estmated
tovget value for -he quoy inetance.
Hous Localy weghted Regression oorks 9
’ Considen Jocaly aegted egesson in which he
Aangt fuchon ' 3 approXSma ted
Ggpvoxima nean

usng a mear funedion o he fom ’

f) = Wot w,a,() + - t Wnan )

a, ay an

’ le Co-licient of atibute (o)


Ahe weigbt af fantculen funckon,
Note: Hee. be know lhe aibude value
weiabt values.
w don knous -he Weight
a,) deiles Hhe vale of dhe h attibute
he smsBonce x
Ned to
Note: lean aboud Guadtent decrent of ANN

Yera:g

de
Locay
Smilay Gnadtot descent n ANN, ny
beight that
’ Beved mehods ase used to choo
Set D
or summe oven he sot
wni(3e. he squaned
gadtent descent

caleaated
vaue
o Aclua
value
Cwnve

wich led Us to he qatort destont tainin rule

yAvadent dosed
descerd ule
vule used hee
Noe -
ehients wn to Mnsm3e -he
.To ind Ahe co
4tng such lineost Honcton to a given set o}
Need to mabifa ths tocedue to ceive aa Joral
arpoxmation 1aherhon a global One.

The Single oagdo rdelme -he nor crtorion


The 3 osss ble cteráa aste

DHingnt3e
) he squaned EnoY OVer Sust he k'

2ek neconest nezko

2) Minims3e the
he Squane d Enor ove he Entve set
D of uhile weightg Ahe Enor +
toch tamng bg some. de caasing fuuction k
disoncefrom
=(0)-fo) ka9,))
(ombne

Xek neancst nbis 0f


’ 4 e choose caiteron 9 omd
xe-deonve he
gvadient des ceont zule we
obBoin the foloog
yule

A, =
Xe kneact nbs

Remanks on Locally wei ghted. Reqession i


DBroad NoMge o methado -foz dtstance wegtina the

) Rouge a melhods or localy agproimotirg target


fuctos.
) Funcion is Usualy conslant, Imean , to) guadiatic
because
move Complcx function, too high.
1) Simple apioximatos model he tanget tancthon
well oy a sulscoty small sub-gion,
Radiad sass Funcions :
RBf Used in ANN.
one hidden node.

O00OO0 aclas
Do00OO0O0, i) sfor
i) circle.

Hec we cannot Sepanabe he both thu claw


wh a single ine, s0 that hoe data B not linal
Syomahe.
non -lneon
How le CoNet non syfarable to
Lireony Sefanable?
) Thaoe the dimenson ality (2b-sn)
but dhis step b not mandatay, ony baud on the
) Exyoud the dieckon (Hor sonta)
Compres -he diecton (venthcal)

Result ant Data st is i

O0000000O00OOo
Erpanston aud
aud compress;on Connot do theu
Yaudony. We necdl to follaw Some fuckors,
How Rer dou his ?
’ consden one cnder xaudomy
’ draw Co centric ctcles.

pond congrus, We Use 3 fucts

Cso Constant
Invonse Mutrguaric

3) Gaoussi an funehion
case- band Reason ing s
Instance-boud mehods ch as k-neanest neihbor
Qud docaly - wghled rgession shave
doe 3 by tropotkes,
) These ae Jasg lrannng melhoch n that h defor

Ahe deison o hos to ennaae begond 4he traiming


Aata until a new guoy tnstona is obsenved.
) thqg doass4o -he new que fnstonces j anaying
Snlar ineBances ahile gnoring nstonce, hat ane e
divent from he guö
) thyy epsesent nstonces a real -valued Pont nau
w-Aimensional eucidean space.
In coR, Hhe ntances one not vepresented
as vead valued ports, but snstead, hay Use a

Sgmbolic ep iesentakon aud he. melhod used to


Ketieve sim Lon Snstances, tornespondina more

elabonate.
CBR has been apled to oblems uch as
’ concerhial desgn o mechatcal dences baud on
a' stoed bvary o tevious decgs,
’ Teasofg about new bgal Cares baud on previou
CBR Cons:sts One

) Retrreve i- GNen a neo case, rieve Sim:la


Cony fom he Case base.
) Reuse : Adap! the retved caes to ft to 4he
Vew Case.

Revise :- saluate Hhe sdution. Qmd tevise boud


on how wel 1t l201ks.
) Retain: Becide whelhen to rtain thi new cae
n he Case bow.

Hedp desk
’ Help Besk that uses call wth probles to be
solved.
’ ohen' usws give a descnpion' of a problum
Ahe closest cases in he case base 'Q1e eieved.
’Tthe diognoske ass:cBart Could recommend some
d thee to he UsU,
adapBng Each cau fo the
usos Poshculan Situation.
3f one - he adapled Cascs kouls, that cue is
added to Ahe case base, to be usud ohen amolhe
Usen aska a similan queston.
’ Tf none o he cases found work, Some oth
mehod atempted o sole -he problon, pohaps
ohen cas /havgg a human hetp
Prelotgcal Exomple of cBR 3
’ the cADET (Ca6e-bazd Degn Toal) ysen emplog
COue boud to assist in -he conce plual de sign
ol Simple wechankca devces such an waten faueta
t Usc S bog conainig attrotmato 75

fevtous drogos aud desgn fragerb, to sugarst


concplual desigrs to meet he specrfcohtow, of new
desgn problems.
’ Eoch înstane stored n memovt (e loato pige) &
epxesented descnbing both ta structune aud
th gualitahe fuchon.
’ Nes desgn pro blemm ane Ahen presented bg speci
ang Ahe desxd fuchon aud gueshng he
Coespondrg stucBue.
A oved cae: TT- Juncion fife .
Sudune Fundon
T tempenoture
J Q- waterflow

a,T2
sNes prdbiem specift cation : wator faucet
(conkrod -tmpt
shudure funcion
m

watnflow.
le, ’ cold ioate f hot wt
lc, Th, t ’ Tempuotte cold
Remaks on Lasg Vs Eagu Leawng
tae considoed 3 lasg leomig melhod :
D kNN - Algorthm
) Loaty boghted Rege ssion
) coe-boned ReasON ;49.
-’ hee mlhods laz because hy deon the
decision. of hocs to gertenabze begond 4he Arosmg data
untl sach new uy instone is Enountened.
Eoger Leong melhad:- the mehod fotox
leonng tadial basis fuacton nlos.
Doencn 'n compudadion -ome and dallerences he
class catos producedtor neuw gueries
Loaz methodo illl garcnaly regure Jus computaton
but moe Conpakakion whu thy muet
for a
predict he tarigt value for a new

) lo3 melhodh moy Considun the guey nstance 'x;


sun deciding haw
hous toto gorenalize bgond he trasmng
doda 'D.
Eogo melho ds cannot. 1 dhe time thyy chsove
-he quong nslance 'x, Aey have, alcady chosen-huiy
(glob a) ayuo ämafion to the dagt tucton.
In Fo Each new

Aennalsges fom he taoing dota y choosng


a new hapothess based on -he aining nean
In Contvast an éagun_leamer hat uses
he ypothe sis spac of Jneor fuuctons
same.
mugt choose it apysozimat:on befoe the gueces
e obseved.
4) he leaine must heufoe Commt to a
Strgle Lineo feachon hypothesis hat covea the
énkre insBoance space aud a! futue guenie,.
he lasg melhod eckv Uses a ichn

hapothesis space becaue t uses dlfoat


locad Binean funcion to fom tt smglhcit alobal
agprox;imatton to the trget fncton.
losa leornen hos he ophon of (impltert) tepre
Sentrg the tanget futhon bg a Cormosnation of
bcad appo:maton an zogeL
leonen wmust commt at taimng time to a
Sngle global attroximaB:on.
he dsknchon bl é0geeagen andl az
ta Ahun zeated to dhe. distanchon blo
global aud local appoxamatos to -he tonget
fanction,

You might also like