ma3264 mathematical modelling lecture 3 model fitting
TRANSCRIPT
MA3264 Mathematical ModellingLecture 3
Model Fitting
IntroductionAnalysing a set of data may involve 3 tasks
1. Choose an appropriate model (if possible)
Example:
using a
2. Fit each the selected model(s) to the data
3. Make predictions from the data
2Cvdb
Example: estimate C)},{( bdvset data points
Example: interpolate (extrapolate, smooth)
Model Fitting versus Interpolation
Models explain data (observed behavior)
they are theory driven, often derived from laws
Example: )cos()( tatS
Interpolation can be also be used to predict data
and can ALSO be used to predict data
EVEN in the absence of an explanatory model
it is data driven, rather than theory driven andwill be discussed in the next Chapter / Lecture
Breaking Distance Data page 71
>> [v' d'] 20.0000 20.0000 25.0000 28.0000 30.0000 40.5000 35.0000 52.5000 40.0000 72.0000 45.0000 92.5000 50.0000 118.0000 55.0000 148.5000 60.0000 182.0000 65.0000 220.5000 70.0000 266.0000 75.0000 318.0000 80.0000 376.0000
>> v = 20:5:80
v =
20 25 30 35 40 45 50 55 60 65 70 75 80
>> d = [20 28 40.5 52.5 72 92.5 118 148.5 182 220.5 266 318 376]
d =
Columns 1 through 7
20.0000 28.0000 40.5000 52.5000 72.0000 92.5000 118.0000
Columns 8 through 13
148.5000 182.0000 220.5000 266.0000 318.0000 376.0000
Plot of Data Points
20 30 40 50 60 70 800
50
100
150
200
250
300
350
400
v
d
Plot of Transformed Data Points
Analytic Models for Data Fitting
1. Minimize Maximum Absolute Deviation (Chebyshev):
Data
1, 2 require linear programming, simplex-method
2. Minimize Sum of Absolute Deviations
3. Minimize Sum of Squared Deviations (Least-Squares)
)},{( ii yx )(f xy Fit
},..,1:|)(f|{max nixy ii
n
i ii xy1
|)(f|
n
i ii xy1
2))(f(
Parameterized Functions
The function f is to be chosen from a set of functions
),...,,cf(x, 21 mccThat have the same form but depend only on one or more PARAMETERS mcc ,...,,c 21
Example 1. m=1 breaking distance 2
11)cf(x, xc
Example 2. m=2 total distance
22121 ),cf(x, xcxcc
Least-Squares EquationsExample 1. If
211)cf(x, xc
Question. If 2
2121 ),cf(x, xcxcc
21i
n
1i i1 ))c,f(x-(y)( cS
then the quantity
is minimized only if
221
n
1i i1
1i
n
1i i )c-(y2f
))c,f(x-(y2 ii xxc
)(0 11
cSdc
d
Then what are the least-squared equations ?
Suggested Reading&Problems in Textbook
Study the derivations of the Least-Squares Equations on pages 114-117 and think about Problems 3.3
Read pages 97-105 and think about Problems 3.1
Using MATLAB or an equivalent computer environment experiment with least-squares algorithms and plotting and approximating data
Tutorial 3 Due Week 8-12 September
Page 118 Problem 2 a,b,c
Page 105 Problem 3
Page 118 Problem 4
Compute and plot the transformed data
and estimate a and b graphically
Tutorials will NOT be collected. I suggest you to write your solutions to present to the class
Homework 1 Due Friday 12 September
I will collect this homework during the class
Page 50 Problem 6 a, b
Page 124 Problem 1
Plot the data, the transformed data, and use the least-squares method on the transformed data to estimate both a and b
Compute and plot the points 20,...,1),,( nQP nn
Page 83 Problem 3