1 / 10

# Curve fit - PowerPoint PPT Presentation

Curve fit. noise= randn (1,30); x=1:1:30; y= x+noise 3.908 2.825 4.379 2.942 4.5314 5.7275 8.098 …………………………………25.84 27.47 27.00 30.96 [ p,s ]= polyfit (x,y,1); yfit = polyval ( p,x ); plot (x,y,'+',x,x,'r',x, yfit ,'b').

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about 'Curve fit' - kanan

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

• noise=randn(1,30); x=1:1:30; y=x+noise

• 3.908 2.825 4.379 2.942 4.5314 5.7275 8.098 …………………………………25.84 27.47 27.00 30.96

• [p,s]=polyfit(x,y,1); yfit=polyval(p,x); plot(x,y,'+',x,x,'r',x,yfit,'b')

With dense data, functional form is clear. Fit serves to filter out noise

• The process of fitting data with a curve by minimizing root mean square error is known as regression

• Term originated from first paper to use regression “regression of heights to the mean” http://www.jcu.edu.au/cgc/RegMean.html

• Can get the same curve from a lot of data or very little. So confidence in fit is major concern.

• Originated from experimental optimization where measurements are very noisy

• In the 1920s it was used to maximize crop yields by changing inputs such as water and fertilizer

• With a lot of data, can use curve fit to filter out noise

• “Approximation” can be then more accurate than data!

• The term “surrogate” captures the purpose of the fit: using it instead of the data for prediction.

• Most important when data is expensive

• Great interest now in applying these techniques to computer simulations

• Computer simulations are also subject to noise (numerical)

• However, simulations are exactly repeatable, and if noise is small may be viewed as exact.

• Some surrogates (e.g. polynomial response surfaces) cater mostly to noisy data. Some (e.g. Kriging) to exact data.

• Data is assumed to be “contaminated” with normally distributed error of zero mean and standard deviation 

• Response surface approximation has no bias error, and by having more points than polynomial coefficients it filters out some of the noise.

• Consequently, approximation may be more accurate than data

• Noisy response model

• Data from ny experiments

• Linear approximation

• Rational approximation

• Error measures

• Functional form

• For linear approximation

• Estimate of coefficient vector denoted as b

• Rms error

• Minimize rms error

eTe=(y-XbT)T(y-XbT)

• Differentiate to obtain

Beware of ill-conditioning!

• Data: y(0)=0, y(1)=1, y(2)=0

• Fit linear polynomial y=b0+b1x

• Then

• Obtain b0=1/3, b1=0.

• Errors for regression fit

• To minimize maximum error obviously y=0.5. Then eav=erms=emax=0.5

• To minimize average error, y=0 eav=1/3, emax=1, erms=0.577

• What should be the order of the progression from low to high?