DATA FITTING Itesve Computto 3/4 Als Mss
Dt fttg Dt fttg cocers the problem of fttg dscrete dt to obt termedte estmtes. There re two geerl pproches two curve fttg: Iterpolto Dt s ver precse. The strteg s to pss curve or seres of curves through ech of the pots. Appromto Dt ehbt sgfct degree of sctter. The strteg s to derve sgle curve tht represets the geerl tred of the dt.
Defto Iterpolto dt pots, obted b smplg or epermetto, represet the vlues of fucto ffor lmted umber of vlues of the depedet vrble f s fucto ble to descrbe the relto betwee the set of vlues d the set of vlues = f wth terpolto we c compute ew dt pots wth the rge of dscrete set of ow dt pots
Defto Gve sequece of rel vlues Gve vlue for ech We wt to fd fucto f - fucto fml such tht f = =,..,, re sd dt pot f s sd the terpolt for the gve pot
Defto There re m dfferet terpolto methods Some of the cocers to cosder whe choosg lgorthm re: How ccurte s the method? How epesve s t? How smooth s the terpolt? How m dt pots re eeded?
Iterpolto methods Smple terpolto methods re: Ler terpolto Poloml terpolto Sple terpolto
Ler terpolto Ler terpolto cosders prs of dt pots Gve, d b, b the terpolt s gve b: b b Ler terpolto s quc d es, but t s ot ver precse Wth ler terpolto the terpolt s ot dfferetble t the pot
Ler terpolto Emple 5 4 3 - - -3-4 -5 3 4 5 6 7 8
Poloml terpolto Poloml terpolto s geerlzto of ler terpolto We ow replce ths terpolt wth poloml of hgher degree Gve dt pots, we loo for the poloml of degree t most gog through ll the dt pots
Poloml terpolto Some questos re: Does the poloml est? If the poloml est, s t uque? If the poloml est d s uque, s t possble to compute t? Does the poloml tht terpoltes,f ppromte better th other polomls?
Poloml terpolto = Gve two pots,,, fd the poloml of degree oe pssg through the two pots s equvlet to fd the le pssg through the two gve pots rett che pss per due put ssegt = Gve three pots,,,,, fd the poloml of degree two pssg through the three pots s equvlet to fd the prbol = + + 3 pssg through the three gve pots
Poloml terpolto Hece =3 gve dt pots m=3 codtos dt pots belog to the prbol 3 coeffcets to determe I geerl: Number of codtos = Number of coeffcets to determe Well posed problem
Poloml terpolto Emple Gve the three dt pots,,, 9 we wt to comput the terpolt Frst pproch Method of udertermed coeffcets From the terpolto codtos we obt the sstem
Poloml terpolto I geerl: Gve pots, =,,, fd the terpolt s the poloml of degree t most - wth the method of udetermed coeffcets correspods to solve the ler equto sstem... c c c P c c c c c c c c c............
Poloml terpolto I geerl the sstem could hve o soluto, tht s the problem s ot well posed problem s well posed f the coeffcets mtr ot sgulr, tht s ts determt s ot Whe the ler sstem s ot es to solve we c use other pproch: Lgrge terpolto
Poloml terpolto Secod pproch - Lgrge The terpolt s the poloml: P _ = _ l _ + _ l _ + + l tht s the poloml s ler combto of the l poloml tht re Lgrge bss polomls wth s coeffcets
Poloml terpolto I the poloml: P _ = _ l _ + _ l _ + + l The Lgrge bss polomls re gve b: l j s - degree poloml d hs the propert:............ l j j j j j j j j j j se j se l j
Poloml terpolto Emple Compute the Lgrge terpolt terpoltg the dt pots,,, 9 We hve to compute the two degree poloml: P l l l l
Poloml terpolto The Lgrge bss polomls re: l l l
Poloml terpolto B substtutg we obt: Observe tht the poloml P obted b the Lgrge method s the sme obted wth the udetermed coffcets method 3 9 l l l P
Poloml terpolto The terpolt obted b poloml terpolto s clerl dfferetble Poloml terpolto lso hs some dsdvtges: Clcultg the terpoltg poloml s computtoll epesve compred to ler terpolto. the shpe of the resultg curve, especll for ver hgh or low vlues of, m be cotrr to commosese The terpolto error s proportol to the dstce betwee the dt pots to the power
Poloml terpolto Poloml terpolto m ehbt osclltor rtfcts, especll t the ed pots - Ruge's pheomeo
Sple terpolto Sple terpolto: s pecewce terpolto uses polomls ech tervl [, + ] uses low-degree polomls curs smller error th ler terpolto d the terpolt s smoother the terpolt s eser to evlute th hgh-degree poloml such s the terpolt does ot suffer from Ruge's pheomeo.
Sple terpolto I cubc sple ech pece s thrd-degree poloml It s es to compute Ech pece of the sple s poloml of the form p = 3 + b + c + d Sce we hve to determe the four coeffcets, b, c d d, we eed four equtos
Sple terpolto Two codtos re obted b mposg the pots belog to the poloml, tht s: = 3 + b + c + d + = + 3 + b + + c + + d The other two codtos re obted b usg the dervtves For emple we c mpose the frst dervtves mtch t the pots the secod dervtves mtch t the pots Note tht the dervtve of the poloml s ver smple d s: p' = 3 + b + c
Appromto If vlble dt re: lrge set ffected b errors t s possble cpturg the tred the dt b ssgg sgle fucto cross the etre rge. I the process we eplot the formto gve b dt, tg to ccout tht dt re ffected b errors We eed:. To choose the tpe of ppromtg fucto. To choose mesure of the dfferece betwee dt d ppromtg fucto
Ler ppromto Suppose tht there re prs of dt, {, }, =,,.., d plot of these dt ppers s Wht s plusble mthemtcl model descrbg d relto?
Ler ppromto Suppose vrble s relted to vrble d ther reltoshps c be epressed, geerl, s = g where g s the geerl epresso for fucto; s the depedet or respose vrble; s the depedet or epltor vrbles. If vlble dt show ler depedece t s possble to cosder regresso le For ech pot we hve: = + b + resdul tht s = + b + ε 8 6 4 4 5 6 7 8 9
Ler ppromto The questos re: Whch le s the most represettve? How c we chhose the coeffcets of the le? We m to mmse the resduls or errors: Resduls should be smll both postve d egtve resduls We eed fucto of resduls depedet of the sg, such s the bsolute vlue or the squre
Lest squre method The lest squres LS crtero requres tht the sum of the squres of resduls or errors, devtos s mmum tht s, b [ b]
Lest squre method Hece we wt determe d such tht the qutt s mmum tht s we wt to solve the sstem of orml equtos: ~ b ~ b b b, ] [ m ~ ~, b b b ] [ ] [
Lest squre method Ths results sstem wth two equtos d two uows Ths mmzto problem hs uque soluto The soluto of the sstem gves the coeffcets of the le relzg the best dt fttg the lest squre sese mb b
Lest squre method Dt c be ppromted wth poloml sted of le The poloml of secod degree gvg the best ft the lest squre sese s poloml the form: p ~ ~ b c~ where the coeffcets re determed b mposg: ~ ~, b, c ~ m, b, c [ m, b, c [ b p ] c]
Lest squre method Ths results the followg sstem of orml equtos: The soluto of the sstem gves the coeffcets of the prbol relzg the best dt fttg the lest squre sese c b c b c b c b 3 3 4
Lest squre method If the reltoshp betwee the depedet vrble d the depedet vrble s modelled s th order poloml the the sstem of orml equtos s: Poloml regresso fts oler reltoshp betwee the vlue of d the correspodg ~ ~ ~ ~ p
Lest squre method The poloml regresso model c be epressed mtr form Cosderg the mtr A The coeffcet mtr of the sstem of orml equtos s gve b: T A A......... A.....
Lest squre method The vector o the rght hd sde s gve b: The mtr form of the sstem of orml equtos s A T *A =A t To vod tht A T *A gves ll-codtoed sstem, severl methods of fctorzto re used. T A....
Lest squre method Emple of ler regresso d poloml regresso wth degree =, 3, 4.
Lest squre method A poloml wth hgher degree does ot ecessrl provde better ppromto. Aother pproch cosder ppromto fucto: tht uses fuctos φ d the mtr f A
Lest squre method As emple we c cosder the trgoometrc poloml T gvg the best ft the lest squre sese: T s s s I ths cse the mtr A s: A s s s s 3 s s s s 3 s s s s 3
Mtlb The Mtlb fucto polft gves both the terpolt poloml the lest squre sese ppromto poloml The st of polft s polft,, where d re the coordte vectors d s the degree of the poloml If = legth-, the we obt the terpolt poloml If < legth-, the we obt the lest squre sese ppromto poloml