#### CS3414 Afterclass Notes --- 24 May, 2002

Fitting Data (parts of Chapters 4, 7, 10)
1. Introduction

• Idea: given a discrete set of data points (xi,yi), for i = 1, 2, ..., m; find a function g(x) that either:
• matches exactly (interpolates) the given data, or
• approximates the given date in some sense (e.g., in the least squares sense).

• Method of undetermined coefficients: a generic approach to finding g(x) that satisfies certain properties (like interpolation).

1. Choose a set of basis functions to be used to represent g(x). We will write g(x) as a linear combination of these basis functions, i.e.,
g(x) = a1 b1(x) + a2 b2(x) + ... + an bn(x)

2. Enforce n constraints or conditions that you want g(x) to satisfy. The goal is to derive n linear equations in the n unknowns a1, ..., an. For example, in the case of interpolation, we would want n=m and g(xi) = yi, for i = 1, ..., n.

• What's left to talk about ?
• What are good choices for the basis functions (with respect to cost/efficiency and accuracy)?
• Which is more important---cost to construct g(x) or cost to evaluate g(x)?
• Is it easy to add new data points to my model?
• What if I only want to approximately match the data?