Machine learning: 2. Generalized regression

Fitting polynomials #

We have learned that any continuous function can be approximated by a polynomial. Suppose that we have gathered a data set:

\[\mathcal{D} = \{ (\vec{x_i}, \vec{y}_i) \}_{i \in I} \]

where \(\vec{x}_i\) is the feature vector for the \(i\)th data point and \(\vec{y}_i\) is the coresponding prediction vector. The fundamental questions of this section are:

Questions:

  1. How does one go about finding a polynomial function \(f\) so that \[ f(\vec{x}_i) \approx \vec{y}_i \] for all \(i \in I\); that is, the function fits the data \(\mathcal{D}\)?
  2. Under what circumstances will this function not only fit the data \(\mathcal{D}\), but also make good predictions on yet unobserved data?
  3. Do our methods extend to other families of functions in addition to polynomials?

We will introduce methods and ideas that are important not only for polynomial approximation, but also other machine learning methods that we will discuss later in the course.

Labs and exercises #

1. Fitting a polynomial to data exactly
2. Vandermonde matrix
3. Polynomials of best fit 1
4. Polynomials of best fit 2
5. Non-linear cosine basis functions
6. Coordinates in an orthonormal basis
7. Legendre polynomials
8. Portland tide data
9. Metrics, norms, and inner products
10. Exotic inner products