Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE3340 Numerical Fitting, Interpolation and Approximation

Similar presentations


Presentation on theme: "ECE3340 Numerical Fitting, Interpolation and Approximation"— Presentation transcript:

1 ECE3340 Numerical Fitting, Interpolation and Approximation
Prof. Han Q. Le Note: PPT file is the main outline of the chapter topic – associated Mathematica file(s) contain details and assignments

2 Overview

3 A problem-centric perspective
this chapter Linearization Fitting, Interpolation Approximation The problem , , , , , too complex for analytic solution non-linear relationships (not reducible) phenomenological (empirical model) with limited or discrete data Finite element methods (FEM) Finite difference methods (e. g. FDTD)

4 Data (empirical, simulation, or by design)
unknown model known model, but unknown parameters Interpolation Approximation (parameterization) Regression fit Objective: estimate parameters Key considerations: confidence of model, ANOVA Objective: find approximated solutions Key considerations : sanity check; assess model validity

5 Example of model fit Find slope and interception data

6 Example of interpolation/extrapol
data Interpolating function (or extrapolation if outside the range) smooth approximation When we solve a DE numerically, we already create an interpolation function: (remember this?)

7 Example: graphical design

8 Linear Regression

9 Model fit and Regression
Linear regression single variable multiple variables Linearization of non-linear model linear-exponential or log-linear power-relationship: log-log general non-linear General model fit Least squares of linear combination of basis functions

10 Linear regression with single variable

11 Key concepts Model parameters: Linear regression statistics
coefficients, correlation R2 standard error, covariance matrix, correlation matrix confidence ellipsoid Linear regression statistics residuals parameter t-statistics, P-value Analysis of variance (ANOVA): dof, sum of squares, mean squares, F-statistics

12 Covariance matrix of parameters – Confidence ellipsoid
Joint distribution of a and b estimates Estimates for a and b are not independent. They are related by mean x and mean y as shown, hence, the distribution of their values are not independent. in class demo: if we know one coefficient by any other mean, this changes the estimate for the other coefficient (move the planes).

13 Key concepts Model parameters: Linear regression statistics
coefficients, correlation R2 standard error, covariance matrix, correlation matrix confidence ellipsoid Linear regression statistics residuals parameter t-statistics, P-value Analysis of variance (ANOVA): dof, sum of squares, mean squares, F-statistics

14 Find the growth rate using log-scale plotting

15 Find the log-log correlation

16 Another example of correlation

17 Key concepts Model parameters: Linear regression statistics
coefficients, correlation R2 standard error, covariance matrix, correlation matrix confidence ellipsoid Linear regression statistics residuals parameter t-statistics, P-value Analysis of variance (ANOVA): dof, sum of squares, mean squares, F-statistics

18

19 Multivariable linear model example
Consider this example water + glucose + fat simulator (intralipid) laser incident - absorption Guo B , Wang Y, Wang Y, Le H. Q. Mid-infrared laser measurements of aqueous glucose J Biomed Opt Mar-Apr;12(2):024005

20 Example of two-variable linear regression
absorption coefficient fit residuals fat concentration glucose concentration glucose concentration fat concentration The residuals are given as: The plane represents the regression fit: Guo B , Wang Y, Wang Y, Le H. Q. Mid-infrared laser measurements of aqueous glucose J Biomed Opt Mar-Apr;12(2):024005

21 Interpolation/Extrapolation

22 Estimate the function value at a point not in the data set
Extrapolation if the point is outside the data range. It is never a good idea to extrapolate if there is no information or guiding model what the function should behave outside the known range.

23 Common methods for interpolation
data Polynomial: Newton Lagrange Chebyshev Hermite Piece-wise adaptive: Spline These avoid errors of the polynomial method; grow rapidly and widespread in numerous fields, especially with the emergence of computer graphics These have limited use because of potential large errors. Interpolation: globally (over all points) piecewise (by segments)

24

25 Spline introduction

26

27 Model building - Spline and smooth curve design

28 How do we draw with common computer software like ppt?
control knot control one-side derivative A smooth spline curve is generated between knots

29 General concepts An interpolating approximation that: Key ideas:
efficient and avoid the error and deficiency of the polynomial methods (especially to avoid high power-order oscillatory behavior) inspired by the old tried-and-true draftsman technique of spline that is known to be useful. (controllable derivatives) Key ideas: piecewise interpolation: each segment between “knots” (data points) is approximated independently from knots far away a constraint to limit the oscillatory behavior: roughness penalty forces the fit to minimize the highly oscillatory or rough behavior of the approximation: equivalent with minimum spline strain energy for least square data fitting for least “roughness”

30 Applications of Spline
Computer graphics, including curve drawing for least square data fitting for least “roughness” For data fitting and unknown model building: select a criterion for balancing of the two terms (can be subjective) For pure interpolation and design: the first term = 0 criterion on the power order of each segment: cubic (3rd order) is the most tried-and-true spline function smoothness criterion: order of derivative continuity at each knot. basis function for each segment and the total function is a linear combination of basis functions: B-spline many types of spline has been developed for different requirements: especially for design (Bezier spline functions)

31

32 B-spline basis functions
Basic concept: To approximate a function defined by a sequence of knots {x0,x1,x2,….,xn} by treating it as a linear combination of a set of basis functions. Each basis function is localized on a sub-sequence of knots of certain number (which defines a partition) within the global knot sequence. The basis functions are designed for smoothness with increasing order to join the partitions

33 B-spline basis - illustration
m=2 m=3 m=4

34 Spline applications

35

36 Summary (takeaways) Least square regression is used to fit experimental data with models Key metrics: confidence of model parameter estimates (fit coefficients statistics) When data is not available or the solutions are known only at a limited number of points, interpolation/extrapolation can be used to fill in the gaps Interpolation: polynomial and cubic spline are two main methods. Spline allows constraint on derivatives. Extrapolation is intrinsically risky – but can be applied if there is sufficient understanding of the problem For designing a solution, the spline method can be used with considerations for smoothness and minimizing derivatives to mimic physically reasonable solutions.


Download ppt "ECE3340 Numerical Fitting, Interpolation and Approximation"

Similar presentations


Ads by Google