Presentation is loading. Please wait.

Presentation is loading. Please wait.

Curve fit metrics When we fit a curve to data we ask: –What is the error metric for the best fit? –What is more accurate, the data or the fit? This lecture.

Similar presentations


Presentation on theme: "Curve fit metrics When we fit a curve to data we ask: –What is the error metric for the best fit? –What is more accurate, the data or the fit? This lecture."— Presentation transcript:

1

2 Curve fit metrics When we fit a curve to data we ask: –What is the error metric for the best fit? –What is more accurate, the data or the fit? This lecture deals with the following case: –The data is noisy. –The functional form of the true function is known. –The data is dense enough to allow us some noise filtering. The objective is to answer the two questions.

3 Curve fit We sample the function y=x (in red) at x=1,2,…,30, add noise with standard deviation 1 and fit a linear polynomial (blue). How would you check the statement that fit is more accurate than the data? With dense data, functional form is clear. Fit serves to filter out noise

4 Regression The process of fitting data with a curve by minimizing the mean square difference from the data is known as regression Term originated from first paper to use regression dealt with a phenomenon called regression to the mean http://www.jcu.edu.au/cgc/RegMean.html http://www.jcu.edu.au/cgc/RegMean.html The polynomial regression on the previous slide is a simple regression, where we know or assume the functional shape and need to determine only the coefficients.

5 Surrogate (metamodel) The algebraic function we fit to data is called surrogate, metamodel or approximation. Polynomial surrogates were invented in the 1920s to characterize crop yields in terms of inputs such as water and fertilizer. They were called then “response surface approximations.” The term “surrogate” captures the purpose of the fit: using it instead of the data for prediction. Most important when data is expensive and noisy, especially for optimization.

6 Surrogates for fitting simulations Great interest now in fitting computer simulations Computer simulations are also subject to noise (numerical) Simulations are exactly repeatable, so noise is hidden. Some surrogates (e.g. polynomial response surfaces) cater mostly to noisy data. Some (e.g. Kriging) interpolate data.

7 Surrogates of given functional form Noisy response Linear approximation Rational approximation Data from n y experiments Error (fit) metrics

8 Linear Regression Functional form For linear approximation Error or difference between data and surrogate Rms error Minimize rms error e T e=(y-Xb T ) T (y-Xb T ) Differentiate to obtain Beware of ill-conditioning !

9 Example

10 Other metric fits Rms fitAv. Err. fitMax err. fit RMS error0.4710.5770.5 Av. error0.4440.3330.5 Max error0.66710.5

11 Three lines

12 Original 30-point curve fit With dense data difference due to metrics is small. Rms fitAv. Err. fitMax err. fit RMS error1.2781.2831.536 Av. error0.9580.9511.234 Max error3.0072.9872.934

13 problems 1.Find other metrics for a fit beside the three discussed in this lecture. 2.Redo the 30-point example with the surrogate y=bx. Use the same data. 3. Redo the 30-point example using only every third point (x=3,6,…). You can consider the other 20 points as test points used to check the fit. Compare the difference between the fit and the data points to the difference between the fit and the test points. It is sufficient to do it for one fit metric. Source: Smithsonian Institution Number: 2004-57325


Download ppt "Curve fit metrics When we fit a curve to data we ask: –What is the error metric for the best fit? –What is more accurate, the data or the fit? This lecture."

Similar presentations


Ads by Google