Chapter 4 Statistical learning

In this chapter we will discuss statistical learning from a mostly theoretical perspective. That is, we will discuss when and why statistical learning can be expected to work.

We begin by defining what we mean by statistical learning and the different types of statistical learning. Then we will display some examples that motivate our theoretical discussion and after that we will see two different theoretical perspectives on learning.

We begin by defining two spaces: \[\begin{align} \mathcal X &= \text{ Input space}\\ \mathcal Y &= \text{ Output space}. \end{align}\]

We assume that there is a distribution on \(\mathcal X \times \mathcal Y\), that we call \(P_{X,Y}\). This means for example that we can calculate, at least in principle, expectations like, \[ E\left[ f(X,Y)\right] = \int f(x,y)p_{X,Y}(x,y)dxdy. \] There is also a loss function \(l:\mathcal Y \times \mathcal Y \mapsto \mathbb R\) that tells how close two points in \(\mathcal Y\) are to each other.

The problem in statistical learning is to find a function \(h:\mathcal X \mapsto \mathcal Y\) that takes an input \(x\in \mathcal X\) and gives and output \(y\in\mathcal Y\). For a given \(h\) we define the out-of-sample error as

\[ E_{out}(h) = E_{X,Y}\left[l(h(X),Y)\right]. \]

This tells us how the function \(h\) performs on average, on random observation from \(P_{X,Y}\). We would like to choose the function \(h\) so that this error is as small as possible. The fundamental problem of learning is that the distribution of \(X,Y\) is unknown and so direct minimization of \(E_{out}\) is not possible.

Methods in statistical learning can be partitioned in various ways. The two main ways is in supervised and unsupervised learning. In supervised learning we are given a set of \(n\) examples \((x_1,y_1),\ldots,(x_n,y_n)\) and the task is to predict \(y\) for a previously unseen point \(x\). In unsupervised learning we are only given \(x_1,\ldots, x_n\) and the goal is to describe the associations and patterns among a set of input measures. A third scenario is reinforcement learning, that we will not cover in this course.

In supervised learning the two main tasks are classification and regression. In classification the task is to assign a class to each item. If it is binary classification then, in the terms defined above, \(\mathcal Y = \{-1,1\}\). Many times the loss is taken to be the 0-1 loss, \[l(y_1,y_2)=1_{y_1\neq y_2}(y_1,y_2):=\begin{cases} 0\text{ if } y_1=y_2,\\ 1\text{ otherwise }. \end{cases} \]

In regression the task is to predict a real value for each item, \(\mathcal Y = \mathbb R\). Many times in regression the squared error is used, \(l(y_1,y_2)=(y_1-y_2)^2\).

Readings for this chapter is:

ISLR 2

ISLR 4.1-2

ISLR 5

ISLR 6.1-2

ISLR 9

The sections on Hoeffding’s inequality, generalization error and VC-dimension is not in the course literature. So it is enough to read these notes.