Machine Learning
On this page

Book

10 Machine Learning

87 min read

The term machine learning refers to the automatic detection of behavioral patterns present in data sets. Due to the complexity of the problems involved with data, usual computer programs cannot extract details about the behavior of the data. When we take human behavior as an example, we know that much of our behavior is learned and improved based on our experience. Machine learning is related to the development of algorithms that have the ability to “learn” and “adapt” with the experience we acquire over time. In this work, we will deal in a simple and rigorous way with the main terms related to machine learning:

  • What is learning;
  • What does it mean for a machine to learn;
  • How to quantify the amount of information needed to learn a concept;
  • Is it always possible to learn?
  • How do you know whether a learning process is a “failure” or a “success”?

The main object of this text is supervised machine learning. This means that we want to develop algorithms capable of “learning” the behavior of a process with data, as shown in Figure 1. In general, learning is the process of transforming experience into knowledge. The input of a learning algorithm is the training data, which represents the experience, and the output provides us with knowledge. In general, knowledge also takes the form of an algorithm that can be used to understand the behavior of the process.

index

Figure 1: Supervised Machine Learning

In supervised machine learning we want to understand the relationship between the input and output of a process. For this, we have a set of labeled data with information about the output (Y)

and the respective input (X), as described in Figure 1. From this, we want to develop an algorithm that relates the data with a predictor. Given the process input X, we want to predict the output Y. The uncontrolled factors Z

they correspond to noise in the process and are not observed, a fact that leads us to propose a probability model to address the machine learning problem. When considering a probability model, the way in which data is generated is crucial for developing algorithms. The most common way is to assume that the data is generated independently and identically distributed (iid). With these hypotheses, the main machine learning algorithms are studied, such as neural networks, support vector machine (Support Vector Machine - SVM), binomial tree, random forest, among others.

As an extension of the hypothesis of generating data in an iid way, we will also treat the case of sequential or online machine learning. In this case, we admit any dependency structure between the data. For example, most industrial processes are observed over time, in which we admit a temporal dependence between the data. In this context, we will present the machine learning problem as a zero-sum game problem and, with this, derive the main sequential machine learning algorithms such as Exponential Weighted (EWA), Having, Winnow, Following the Disturbed Leader and algorithms developed by the authors of the text.

In supervised machine learning and sequential machine learning, the learner does not interact or intervene in the process. In many cases, we want to intervene in the process in order to “optimize” the performance of the process. As a consequence, we want to “control” the input

in such a way as to “optimize” a functional output Y

of the process corresponding to its performance. In this context, we will introduce the concept of reinforcement learning. Here, we will present the research developed by the authors that uses the principle of dynamic programming as a strategy to derive algorithms to address the problem of reinforcement learning. The text presented is based on the following works:

  1. N. Cesa-Bianchi and G. Lugosi. Prediction, Learning, and Games. CambridgeUniversity Press, 2006.

  2. O. Bousquet, S. Boucheron, and G. Lugosi. (2004) - Introduction to Statistical Learning Theory. Advanced Lectures in Machine Learning, pages 169–207. springer.

  3. S. Boucheron, O. Bousquet 2 and G Lugosi (2005) - THEORY OF CLASSIFICATION: A SURVEY OF SOME RECENT ADVANCES.

  4. D. Blackwell and Meyer A. Girshick. Theory of games and statistical decisions. Wiley publications in statistics. Dover Publications, 1979.

  5. D. Leão, J. B. R. do Val, M. Fragoso (2000) - Nonstationary Zero Sum Stochastic Games with Incomplete Observation. In 39 IEEE Conference on Decision and Control, Sydney.

  6. D. Leão, A. Ohashi, A. Simas (2018) - . Weak differentiability of Wiener functionals and occupation times. BULLETIN DES SCIENCES MATHEMATIQUES, v. 149, p. 23-65.

  7. D. Leão, A. Ohashi, A. Simas (2018) - A weak version of path-dependent functional Itô calculus. ANNALS OF PROBABILITY, v. 46, p. 3399-3441.

  8. D. Leão, A. Ohashi, F. Russo (2019) - Discrete-type approximations for non-Markovian optimal stopping problems. Journal of applied probability, vol. 56, pp. 981-1005.

  9. D. Leão, A. Ohashi and F. Souza (2020) - Solving non-Markovian Stochastic Control Problems driven by Wiener Functionals, ArXiv. https://arxiv.org/abs/2003.06981.

  10. E. Rosalino, A. da Silva, J. Baczynski and D. Leão (2018) - Pricing and hedging barrier options. APPLIED STOCHASTIC MODELS IN BUSINESS AND INDUSTRY, v. 34, p. 499-512,

  11. L. G. Valiant. A theory of learnability. Proc. of the 1984 STOC, pages 436–445, 1984.

  12. V. N. Vapnik. Statistical learning theory. J. Wiley, 1998.

  13. A. Wald. Statistical decision functions. John Wiley and Sons, 1950.

Learning

To illustrate the concept of learning, let’s reflect on the learning process of domestic animals. We know that many rats learn to avoid poisoned food. When rats encounter food that looks and smells new, they eat small amounts and wait to assess the consequences. If the food has the right taste and does not cause negative physiological consequences, they use it for food. If the food produces a bad physiological effect, the new food will be associated with a negative effect, and consequently, the rats will not eat it. In this case, we have a learning algorithm in action, the animal uses past experience to design an algorithm for detecting poison in food. If the past experience with the food is negative, the animal predicts that this food will have a negative effect when encountered in the future.

Inspired by the rat example, suppose we want to predict whether a process will have a yield above 90%

. Suppose we want to program a machine to learn to predict the behavior of this process. A simple solution is given by the rat learning algorithm. The machine monitors the process over a period of time and remembers all process adjustments that led to a yield greater than 90%. In a new process situation, the machine looks for an adjustment equal to the past in which we had a yield greater than 90%. Based on this past experience, it suggests the process behavior for the current situation. If we have the same situation in the past memorized by the machine, the performance will be above 90%. Otherwise, the yield will be below 90%. This learning process is called ``rote learning''.

This type of learning presents some problems. First, the ability to deal with situations different from those encountered in the past. A good learning algorithm must be able to evolve from simple examples to more general situations, called inductive inference. In the example of rats, when they encounter a new type of food, they apply their poison detection algorithm (measurement) to evaluate and classify (positive effect or negative effect) the new food. Likewise, we must measure process characteristics that provide information about its behavior. Thus, when a new situation arises, the machine can predict the process behavior for the current situation with appropriate confidence.

In general, learning corresponds to the process of gaining knowledge of the dependency structure between the input and output observations of a data-based process and/or product. Next, we will establish a formal (mathematical) definition for each of the terms involved in the learning process.

Introduction to Statistical Machine Learning

In this section, we define the components of the statistical learning model. Consider a fermentation process of juice (wine) from sugar cane. The yield of the fermentation process is defined as the percentage of sugar in the juice that is transformed into alcohol. In this case, we can measure several characteristics of the broth to improve the learning algorithm. Suppose we measure the sugar content and pH of sugar cane juice at the entrance to the fermentation process. As we observe the process, we register the tender $z_1, z_2, y$ in which $z_1$ corresponds to the sugar content of the broth, $z_2$ corresponds to the pH of the broth and $y$ is the label (success or failure) related to the input variables $x=(z_1, z_2)$.

Next, we introduce part of the notation that will be used in this work. Be $E$ a complete and separable metric space equipped with the $\sigma$-Borel algebra $\beta(E)$. Given a subset $G \in \beta(E)$, the $\sigma$ trace algebra $G$ is defined by $\beta(G) = (G \cap A: A \in \beta(E) )$. In this case, we say that $G$ is a Borel space equipped with the $\sigma$-dash algebra $\beta(G))$. We denote by $\mathbb{R}$ the set of real numbers with their respective $\sigma$-Borel algebra $\beta (\mathbb{R})$. For any measurable space $(Y, \beta (Y))$, we denote by $Y^n$ for $n=1,2, \cdots, \infty$ the Cartesian product of Y with itself $n$-times and for $(\beta(Y) )^n$ to $\sigma$-algebra of measurable cylinders $Y^n$ based on $(1, \cdots , n)$ (a $\sigma$-product algebra). Furthermore, we know that $(\beta(Y))^n = \beta(Y^n)$ for everyone $n=1,2, \cdots, \infty$. For readers unfamiliar with Borel space terminology, consider Borel space as a subset of Euclidean space $\mathbb{R}^d$, for some $d=1,2,3, \cdots, \infty$. The elements of $Y^n$ are denoted by ${\bf y}_n= (y_1, y_2 , \cdots , y_n)$. In general, the input to the learning process is composed of three elements: domain space, label space and the data set.

  1. Domain space: Consider $(\chi, \beta(\chi))$ a Borel space corresponding to the domain space, in which $\beta(\chi)$ corresponds to $\sigma$-Borel algebra of subsets of $\chi$. In many examples, we take $\chi$ a subset of the $\mathbb{R}^d$ with $d=1,2,3, \ldots$ . The elements $x \in \chi$ are the random inputs with probability distribution $\mathbb{P_{\chi}}$ defined about $(\chi, \beta(\chi))$. In general, we do not know the probability $\mathbb{P_\chi}$. In the example of the fermentation process, we have $\chi = (x=(z_1, z_2) : 0 < z_1 < 1, ~ z_2 > 0 ) \subset \mathbb{R}^2$;

  2. Label Space: Consider $(\mathcal{Y}, \beta(\mathcal{Y}))$ a Borel space corresponding to the label space. For each $x \in \chi$ we associate a label $y \in \mathcal{Y}$ corresponding to the process output. For example, in the fermentation process, we have to $\mathcal{Y}=(0,1)$, in which $1$ represents a fermentation process with a yield above $90(porcentagem)$ (success) and $0$ the opposite (failure).

  3. Training dataset: We denote by ${\bf o_n} = ((x_1,y_1) , \cdots , (x_n , y_n))$ the sequence of labeled points corresponding to the training data. This is the input we have available to drive the learning process. For example, when following the fermentation process we observe ${\bf o_n} = (((z_{11},z_{21}),y_1), \ldots , ((z_{1n},z_{2n}),y_n)).$ For a sample size $n$, we denote by $\mathbb{O}^n = (\chi \times \mathcal{Y})^n$ the space in which data takes values, which will be equipped with $\sigma$-Borel algebra $\beta(\mathbb{O}^n)$, for all $n=1,2, \ldots$. How $\mathbb{O}=\chi \times \mathcal{Y}$ is a Borel space, we know that $\mathbb{O}^n$ is also a Borel space, for everyone $n=1,2, \ldots , \infty$. The space of all data sets is denoted by $\mathbb{O}^\infty$ and equipped with the $\sigma$-Borel algebra $\beta(\mathbb{O}^\infty)$. In general, any data set ${\bf o_n}$ in size $n$ can be defined as an element of $\mathbb{O}^\infty$ through coordinated projection $\pi^n: \mathbb{O}^\infty \rightarrow \mathbb{O}^n$, which carries the sequences $(o_1, o_2 , \ldots) \in \mathbb{O}^\infty$ in the first $n$-coordinates $(o_1, \ldots , o_n) \in \mathbb{O}^n$.

The machine learning problem consists of developing a learning rule (algorithm) capable of predicting the future label of the process $y \in \mathcal{Y}$ based on input data $x \in \chi$. Such a rule is given by a function $h : \chi \rightarrow \mathcal{Y}$. This function is called a predictor or a hypothesis or a classifier. The predictor will be used to predict new labels based on the entry points $(x \in \chi)$. In the example, this rule $h$ will be used to predict the behavior of the process (success or failure) based on the input variables (sugar content and pH). We denote by $\bar{\mathcal{H}} := ( h: \chi \rightarrow \mathcal{Y}, ~ \text{Borel mensurável})$ the class of possible predictors and $\mathcal{H} \subset \bar{\mathcal{H}}$ a subclass of admissible predictors. Let’s assume that $\mathcal{H}$ is also a Borel space equipped with the $\sigma$-algebra $\beta(\mathcal{H})$. A learning algorithm is a measurable Borel function $A: \mathbb{O}^n \rightarrow \mathcal{H}$, such that for each sample ${\bf o}_n \in \mathbb{O}^n$ associates a predictor $A({\bf o}_n) = h({\bf o}_n , \cdot) \in \mathcal{H}$ in the class of admissible predictors, for all $n \geq 1$.

The data generation process is critical for understanding the learning structure. We assume that there is a probability $\mathbb{P_\chi}$ defined about $(\chi , \beta(\chi))$. It is important to comment that we do not have any knowledge about this probability distribution $\mathbb{P}_\chi$. With respect to labels, we assume that there is a transition probability $\nu(\cdot \mid \cdot): \beta(\mathcal{Y}) \times \chi \rightarrow [0,1]$, which relates the input $x \in \chi$ of the process with the label $y \in \mathcal{Y}$ corresponding to the process output. Obviously, the transition probability $\nu$ is also unknown. From these components, we admit that each element $ (x,y) \in \mathbb{O}$ is sampled from a joint probability distribution given by

$$\mathbb{P} (A \times B)= \int_B \nu (A \mid x) \mathbb{P}_{\chi} (dx), \quad A\in \beta(\mathcal{Y}) , B \in \beta(\chi),$$

defined about $(\chi \times \mathcal{Y} , \beta(\chi) \times \beta(\mathcal{Y}))$. The critical point is that we do not know the joint probability $\mathbb{P}$. The only information we have about the probability $\mathbb{P}$ it’s in the training data. A simple way to arrive at the transition probability $\nu$ consists of admitting that there is a function $f: \chi \rightarrow \mathcal{Y}$ Measurable borel that corresponds to the “true” label generating function. In this case, for each $x \in \chi$ there is a single label $y=f(x)$. So, we have to

Screenshot_1

From these elements of the learning system, we need to develop a strategy to choose predictors in the class $\mathcal{H}$ of admissible predictors. In this sense, we need a function that evaluates the performance of predictors. A measurable and bounded Borel function $\ell : \mathbb{O} \times \mathcal{H} \rightarrow [0, \bar{a}]$ is called a loss function, in which $\bar{a}$ is a positive constant. The risk function is given by the expected value of the loss function related to a predictor $h \in \mathcal{H}$ and with a probability distribution $\mathbb{P}$ about $(\mathbb{O} , \beta(\mathbb{O}))$, in which

$$L(\mathbb{P} , h) = \mathbb{E}_{\mathbb{P}} \left[ \ell (\cdot , h) \right], \quad \mathbb{P} \in \mathcal{P}(\mathbb{O}), ~ ~ h \in \mathcal{H},$$

$\mathcal{P}(\mathbb{O})$ corresponds to the space of all probabilities defined over $(\mathbb{O} , \beta (\mathbb{O}))$ and $\mathbb{E}_{\mathbb{P}}$ is hope taken with respect to probability $\mathbb{P}$. Formally, we want to find a predictor $h^\star \in \mathcal{H}$ that minimizes the risk function $L(\mathbb{P}, \cdot)$,

Screenshot_2

Since $(\mathbb{O} , \beta(\mathbb{O}))$ is a Borel space, we know that $\mathcal{P}(\mathbb{O})$ it is also a Borel space equipped with the weak convergence topology. Furthermore, if the risk function $L: \mathcal{P}(\mathbb{O}) \times \mathcal{H}$ is semicontinuous inferiorly and the space of admissible predictors $\mathcal{H}$ is compact, there is a function $\Phi: \mathcal{P}(\mathbb{O}) \rightarrow \mathcal{H}$ which is measurable Borel such that

$$L(\mathbb{P}, \Phi(\mathbb{P})) = \inf_{h\in \mathcal{H}} L(\mathbb{P} , h).$$

With that, we just need to take $h^\star = \Phi(\mathbb{P})$. Now, notice that $h^\star$ is a function of probability $\mathbb{P}$, which is unknown. Therefore, we cannot use $h^\star$ in practice.

To illustrate the scope of the machine learning problem formulation proposed above, we consider the following examples.

  1. Regression: We take $\chi$ and $\mathcal{Y}$ as a subset of $\mathbb{R}^d$ and $\mathbb{R}$, respectively. The class of admissible predictors $\mathcal{H}$ corresponds to the set of functions $h:\chi \rightarrow \mathbb{R}$ Measurable and limited Borel. In this case, the loss function is given by $\ell ((x,y),h) = (y - h(x))^2$.

Screenshot_4

In the process yield example we have the pair $(X,Y)$, in which the domain is given by $X=(Z_1 , Z_2)$ with $Z_1$ the sugar content and $Z_2$ the pH of the broth. In this case, the label space is binary $\mathcal{Y}= (0,1)$. Given a probability $\mathbb{P} \in \mathcal{P}(\mathbb{O})$ and a predictor $h \in \bar{\mathcal{H}}$ any, the risk function is given by the probability of classification error in the form

Screenshot_3

If the probability distribution $\mathbb{P}$ is known, the Bayes classifier $h^{\star}$ is the one with the lowest classification error. In practice, we only have access to the training data set ${\bf o}_n=((x_i , y_i) : i=1, \cdots , n)$ that are sampled from the probability distribution $\mathbb{P}$ unknown. Therefore, we cannot use the Bayes classifier in practice. Next, we will introduce the first basic principle of machine learning theory.

Empirical Risk Minimization

The machine learning algorithm $A: \mathbb{O}^n \rightarrow \mathcal{H}$ has as input (domain) a set of labeled data ${\bf o_n}$ sampled from an unknown probability distribution $\mathbb{P}$ defined about $(\mathbb{O} , \beta(\mathbb{O}))$. From the on∈On training data, the learning algorithm provides us with a predictor as output $h({\bf o_n} , \cdot) \in \mathcal{H}$. The objective of the algorithm is to provide a predictor that minimizes the risk function with respect to the probability $\mathbb{P}$ unknown.

Since we don’t know the probability $\mathbb{P}$, the risk function cannot be directly accessed. One way to get around this problem is to use the empirical risk function. For every data sample ${\bf o}_n = ((x_1,y_1) , \ldots , (x_n , y_n)) \in \mathbb{O}^n$, the empirical risk function is defined by:

$$L_E({\bf o_n} , h) := \frac{1}{n} \sum_{i=1}^n \ell \left( (x_i , y_i) , h \right), \quad n \geq 1.$$

How the labeled sample ${\bf o_n}$ is available and represents the process under study, it makes sense to look for a solution that fits well with the training data. Thus, we introduce the following machine learning principle “Empirical Risk Minimization” (MRE). The learning algorithm given by the MRE principle provides us with a predictor $h_E({\bf o}_n , \cdot)$ which minimizes the empirical risk function, that is,

$$L_E({\bf o_n} , h_E({\bf o_n})) = \inf_{h \in \mathcal{H}} L_E({\bf o_n} , h), \quad {\bf o_n} \in \mathbb{O}^n.$$

For the binary classification problem, the empirical hazard function corresponds to the classification error of the predictor. In this case, given a training sample ${\bf o}_n = ((x_i , y_i): i=1, \ldots , n)$ and a predictor $h \in \mathcal{H}$, we have to

Screenshot_5

An important point related to the empirical hazard function is that it depends only on the data on and the admissible predictor $h$.

Overfitting - Overfitting

Although the MRE principle is a very natural rule, without due care, this method can easily fail. To demonstrate this failure, let’s return to the problem of classifying batches in the fermentation process. Consider a sample ${\bf o}_n=((x_1,y_1), \cdots , (x_n,y_n))$ evenly distributed in the gray square as shown in figure 1.

index2

Figure 1: Labeled Sample

We assume that the probability $\mathbb{P}_{\chi}$ has uniform distribution over the gray square. In figure 1, suppose that the area of the gray square is equal to 2 and the area of the black square (dashed) is equal to 1. We also admit the existence of a function $ f: \chi \rightarrow (0,1) $ which determines the labels in the form: $ f(x):=1 $ if x belongs to the black square and $ f(x):=0 $ otherwise. Consider the following predictor

Screenshot_6

With this, we obtain that $ L_E({\bf o}_n,h_E({\bf o}_n, x))=0 $ for the entire sample $ {\bf o}_n \in \mathbb{O}^n $ and, consequently, this predictor minimizes the empirical risk function. With this, we say that $ h_E({\bf o}_n, \cdot) $ satisfies the principle of MRE for all $ n=1,2, \ldots $.

How does the probability distribution $ \mathbb{P_\chi} $ is uniform in the gray square, we know that a predictor that takes 1 in a finite number of points and zero in the rest, is equal to zero $\mathbb{P_\chi}$-almost certainly. Thus, we obtain that

$$L(\mathbb{P} , h_E({\bf o_n}))= \mathbb{E_{\mathbb{P}}} [\ell (\cdot , h_E({\bf o_n})) ] = \mathbb{E_{\mathbb{P}}} [\ell(\cdot , 0) ] = \frac{1}{2}.$$

Therefore, we found a predictor $h_E({\bf o_n})$ which performs very well with data, but its practical performance is poor. This phenomenon is known as overfitting. Intuitively, this phenomenon occurs when the predictor fits the training data very well.

PAC Learning Algorithm

We have just shown that the MRE principle can lead us to the overfitting problem. Despite this problem, the idea is not to abandon this principle, but to propose ways to solve the problem of overfitting. From this section, we will propose conditions so that the MRE principle does not lead us to overfitting. In this sense, we want conditions so that if a predictor has good performance for empirical risk, then this predictor also has good performance for risk function with arbitrary probability $\mathbb{P} \in \mathcal{P}(\mathbb{O})$.

A common solution is to restrict the class of admissible predictors $\mathcal{H}$ to apply the MRE principle. Formally, we choose an appropriate class of predictors $\mathcal{H}$ which depends on the process and characteristics we study. Given a class of admissible predictors $\mathcal{H} \subset \bar{\mathcal{H}}$ and a training data set ${\bf o_n} \in \mathbb{O}^n$, we want a predictor $h_E({\bf o_n})$ which minimizes the empirical risk function restricted to the class $\mathcal{H}$,

$$L_E ({\bf o_n} , h_E({\bf o_n})) = \inf_{h \in \mathcal{H}} L_E ({\bf o_n} , h), \quad n \geq 1.$$

Note that the predictor $h_E({\bf o_n} , \cdot)$ which minimizes the empirical hazard function does not depend on the probability P, it depends on the training data set ${\bf o_n} \in \mathbb{O}^n$ and the class of permissible controls $\mathcal{H}$. The learning algorithm defined by the MRE principle is denoted by $A_E$. In this case, we have to $A_E({\bf o_n}) = h_E({\bf o_n} , \cdot)$.

By restricting the class of admissible predictors, we introduce a bias to the MRE principle, which is called inductive bias. Therefore, a fundamental issue in machine learning theory consists of choosing the class of admissible predictors $\mathcal{H}$

in which the MRE principle does not lead to an overfitting problem. Intuitively, the more restricted the class of admissible predictors, the lower the possibility of overfitting, but the greater the inductive bias.

Obviously, the question of the existence of a predictor that minimizes the empirical risk function must be evaluated. Suppose the loss function $\ell: \mathbb{O} \times \mathcal{H} \rightarrow [0,\bar{a}]$ be inferior semicontinuous and H be a separable compact space. So, we have to $L_E: \mathbb{O}^n \times \mathcal{H} \rightarrow [0,\bar{a}]$ is also a semicontinuous function. Thus, it follows from the Borel measurable selection theorem that there exists a function $h_E : \mathbb{O}^n \rightarrow \mathcal{H}$ which is Borel measurable and satisfies the principle of empirical risk minimization.

In the case of the classification problem, we prove that the Bayes predictor has the lowest risk in the class of all possible predictors $(\bar{\mathcal{H}})$. However, the fact that we do not know the probability $\mathbb{P}$ makes the application of the Bayes predictor unfeasible. To overcome this situation, we will relax the assumption that the predictor proposed by the learning algorithm minimizes the risk function. In this sense, we want our learning algorithm to find an admissible predictor whose hazard function is not much larger than the hazard function of some reference predictor, such as the Bayes predictor. The maximum performance difference corresponds to the bias parameter of the learning algorithm.

To continue with this section, let’s make a hypothesis about data generation. We assume that the samples are taken independently and identically distributed (iid) based on the probability $\mathbb{P}$. Thus, for a data set of size $n\geq 1$, the joint probability is determined by the product probability and denoted by $\mathbb{P}^n$.

Be $A: \mathbb{O}^n \rightarrow \mathcal{H}$ a learning algorithm and $\mathbb{P} \in \mathcal{P}(\mathbb{O})$. Since the risk function $L(\mathbb{P} , A({\bf o_n}))$ depends on the training dataset on and this dataset is a simple random sample (iid) of the probability $\mathbb{P}$, we conclude that the predictor A(on) is a random element and, consequently, the risk function $L(\mathbb{P} , A({\bf o_n}))$ is a random variable. We interpret the random variable $L(\mathbb{P} , A({\bf o_n}))$

like conditional hope

Screenshot_7

From a probabilistic point of view, we are not sure that the training data set ${\bf o_n}$ is representative of the probability $\mathbb{P}$. If we return to the process yield example, we have (even if small) the possibility that all selected observations result in yield above 90% (success). In this case, the MRE principle leads us to a constant predictor in which all returns are “success”. As a consequence, we need to manage the probability of obtaining a sample that is not representative.

For this, we propose that the probability of selecting a training data set ${\bf o_n}$ for which $L(\mathbb{P} , A({\bf o_n}))$ It’s not too big, be controlled. In general, we denote by δ the probability of obtaining a non-representative sample and by (1−δ) the confidence parameter. On the other hand, we do not necessarily reach the performance of the reference predictor, as we do not know the probability $\mathbb{P} \in \mathcal{P}(\mathbb{O})$. Thus, we introduce a bias parameter $\epsilon \in (0,1)$, which corresponds to the maximum performance difference between the proposed predictor and the reference predictor. For this, we admit that $(\mathcal{H} , \beta(\mathcal{H}))$ be a Borel space and that the learning algorithm $A: \mathbb{O}^n \rightarrow \mathcal{H}$ be a Borel function measurable for all $n \geq 1$. So, we have to $L(\mathbb{P}, A(\cdot)): \mathbb{O} \rightarrow [0,\bar{a}]$ is a random variable.

PAC Learning: A class of predictors $\mathcal{H}$ has the property PAC (Probably Approximately Correct) if there is a function $m_{\mathcal{H}} : (0,1)^2 \rightarrow \mathbb{N}$ and a learning algorithm A with the following property: For all $\epsilon , \delta \in (0,1)$ and all probability $\mathbb{P} \in \mathcal{P}(\mathbb{O})$, learning algorithm A returns a predictor such that,

$$\mathbb{P}^n \left[ {\bf o_n} \in \mathbb{O}^n : L(\mathbb{P} , A({\bf o_n})) \leq \inf_{h \in \mathcal{H}} L(\mathbb{P} , h) + \epsilon \right] \geq 1- \delta , \quad \forall ~ n \geq m_{\mathcal{H}}(\epsilon , \delta).$$

We say that $1-\delta \in(0,1)$ corresponds to the confidence parameter of the forecast, while $\epsilon$ corresponds to the bias parameter. The function $m_{\mathcal{H}}$ is called the PAC complexity of the class of admissible predictors $\mathcal{H}$.

With the PAC learning definition, the predictor proposed by the learning algorithm is optimal if its risk is not much greater than the smallest risk among all admissible predictors in $\mathcal{H} \subset \bar{\mathcal{H}}$. We also require that the predictor be admissible $(h \in \mathcal{H})$, which brings us to the concept of self-learning.

Uniform Convergence

The idea of the learning strategy described in this text is very simple. First, we restrict the class of admissible predictors $\mathcal{H} \subset \bar{\mathcal{H}}$ to avoid overfitting. Next, we apply the MRE principle restricted to the subclass $\mathcal{H}$. From a training data set ${\bf o}_n \in \mathbb{O}^n$, the idea behind the MRE principle is to evaluate the empirical risk of all admissible predictors $(h \in \mathcal{H})$ and, choose the predictor $h_E \in \mathcal{H}$ which presents the lowest empirical risk.

With the MRE principle, we expect the predictor $h_E \in \mathcal{H}$ has a risk function close to the minimum of the risk function with respect to the class of admissible predictors. In other words, we want the class of admissible predictors $\mathcal{H}$ admit PAC property with learning algorithm $A_E$ given by the MRE principle. To do this, we must ensure that the empirical risk function of all members of $\mathcal{H}$ are good approximations for the risk function of the respective member.

Dataset $\epsilon$-representative: Consider $\epsilon \in (0,1)$. A training data set ${\bf o}_n \in \mathbb{O}^n$ is called $\epsilon$-representative, with respect to the space of observations $\mathbb{O}$, the class of admissible predictors $\mathcal{H}$, the loss function $\ell$ and the probability $\mathbb{P}$ if,

$$\sup_{h \in \mathcal{H}} ~ \big| L_E ({\bf o}_n , h) - L(\mathbb{P} , h) \big| \leq \epsilon .$$

Next, we show that if a training data set is $\epsilon/2$-representative, learning algorithm $A_E$ obtained by the MRE principle has a good return.

Lemma 1: We assume that the training data set ${\bf o}_n$ is $\epsilon/2$-representative. So, any output from the learning algorithm $A_E ({\bf o}_n)$ obtained by the MRE principle satisfies

$$L(\mathbb{P} , A_E ({\bf o_n})) - \inf_{h \in \mathcal{H}} L(\mathbb{P} , h) \leq \epsilon.$$

Proof:

For all $h \in \mathcal{H}$, we have to

$$L(\mathbb{P} , A_E ({\bf o_n}));\leq; L_E ({\bf o_n} , A_E ({\bf o_n})) + \frac{\epsilon}{2} \leq L_E ({\bf o_n} , h) + \frac{\epsilon}{2} \leq ;L(\mathbb{P} , h) + \frac{\epsilon}{2} + \frac{\epsilon}{2} = L(\mathbb{P} , h) + \epsilon$$

in which the first and third inequality are consequences of the definition of the data set $\epsilon$-representative and the second inequality is a consequence of the MRE principle.

Lemma 1 tells us that an algorithm $A_E$ given by the MRE principle is a PAC learning if, with probability at least $1- \delta$, we can choose a data set $\epsilon$-representative. The following uniform convergence condition formalizes this requirement.

Definition of Uniform Convergence: We say that a class of admissible predictors $\mathcal{H} \subset \bar{\mathcal{H}}$ has the property of uniform convergence if, there is a function $m_{\mathcal{H}}^{UC} : (0,1)^2 \rightarrow \mathbb{N}$ such that:

$$\sup_{\mathbb{P} \in \mathcal{P}(\mathbb{O})} ~\mathbb{P}^n \left[ {\bf o}_n \in \mathbb{O}^n : \sup_{h \in \mathcal{H}} \big| L_E ({\bf o}_n , h) - L(\mathbb{P} , h) \big| \leq \epsilon \right] \geq 1- \delta , \quad n \geq m_{\mathcal{H}}^{UC}(\epsilon , \delta),$$

for everyone $\epsilon , \delta \in (0,1)$.

The term uniform refers to the fact that the complexity function $m_{\mathcal{H}}^{UC}$ defines an admissible predictor-independent sample size $(h \in \mathcal{H})$ and the probability $\mathbb{P} \in \mathcal{P}(\mathbb{O})$. Similar to defining complexity for PAC learning $(m_{\mathcal{H}})$, the function $m_{\mathcal{H}}^{UC}$ establishes the lowest complexity of a sample to obtain uniform convergence. In this case, we define the minimum dataset size ($m_{\mathcal{H}}^{UC}$) which guarantees with probability at least $1-\delta$ that the training data set will be $\epsilon$-representative. Data $\epsilon , \delta \in (0,1)$ and $n \geq m_{\mathcal{H}}^{UC} (\epsilon , \delta)$, the property of uniform convergence tells us that

$$\mathbb{P}^n \left[ {\bf o_n} \in \mathbb{O}^n : \sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| \leq \epsilon \right] \geq 1- \delta,$$

for all probability $\mathbb{P} \in \mathcal{P}(\mathbb{O})$. As a consequence of lemma 1, we obtain that

$$({\bf o_n} \in \mathbb{O}^n: \sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| \leq \frac{\epsilon}{2} ) \subset ( {\bf o_n} \in \mathbb{O}^n: L(\mathbb{P} , h_E({\bf o_n})) - \inf_{h \in \mathcal{H}} L(\mathbb{P} , h) \leq \epsilon )$$

Thus, we derive the following Theorem.

Theorem 1: If a class $\mathcal{H}$ has the property of uniform convergence with complexity function $m_{\mathcal{H}}^{UC}$, then this class also has the PAC learning property with $m_{\mathcal{H}} (\epsilon , \delta) \leq m_{\mathcal{H}}^{UC} (\epsilon/2 , \delta)$. Furthermore, the MRE principle provides us with a PAC learning algorithm with the class $\mathcal{H}$.

Proof:

As a consequence of the uniform convergence property, we have

$$\mathbb{P}^n ({\bf o_n} \in \mathbb{O}^n: L(\mathbb{P} , h_E({\bf o_n})) - \inf_{h \in \mathcal{H}} L(\mathbb{P} , h) \leq \epsilon ) \geq \mathbb{P}^n ( {\bf o_n} \in \mathbb{O}^n: \sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| \leq \frac{\epsilon}{2} ) \geq 1-\delta,$$

for everyone $n \geq m_{\mathcal{H}}^{UC} (\frac{\epsilon}{2} , \delta)$

From Theorem 1 we conclude that the uniform convergence property is sufficient to show that a given class $\mathcal{H}$ of admissible predictors has the PAC property. When we take the complement in relation to the uniform convergence property, we obtain that

$$\mathbb{P}^n [ {\bf o_n} \in \mathbb{O}^n : \sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| \geq \epsilon ] \leq \delta.$$

By Kolmogorov’s extension theorem, we know that there is a single probability $\mathbb{P}^\infty$ defined about $(\mathbb{O}^\infty , \beta (\mathbb{O}^\infty))$ such that the projection in $(\mathbb{O}^n , \beta (\mathbb{O}^n))$ coincides with $\mathbb{P}^n$, for all $n \geq 1$. With this, we obtain that

$$\sup_{\mathbb{P}^\infty \in \mathcal{P}(\mathbb{O}^\infty)} \mathbb{P}^\infty \left[ {\bf o} \in \mathbb{O}^\infty : \sup_{h \in \mathcal{H}} \big| L_E (\pi_n ({\bf o}) , h) - L(\mathbb{P} , h) \big| \geq \epsilon \right] \leq \delta, \quad n \geq m_{\mathcal{H}}^{UC} (\epsilon , \delta),$$

in which $\pi_n : \mathbb{O}^\infty \rightarrow \mathbb{O}^n $denotes the coordinate projection for the entire $n \geq 1$. As a consequence, we obtain that $L_E (\pi_n ({\bf o}) , h)$ converges uniformly in probability for $L(\mathbb{P} , h)$.

Classes of Finite Predictors

As a consequence of the PAC Theorem for uniform convergence (Theorem 1), to show that every finite class is a PAC learning, we simply need to prove that the uniform convergence property is valid. Pinned $\epsilon , \delta \in (0,1)$, we need to find a sample size $m (\epsilon, \delta)$ such that for all probability $\mathbb{P}$, we have to

$$\mathbb{P}^n \left( {\bf o_n} \in \mathbb{O}^n : \sup_{h \in \mathcal{H}} \big|L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| \leq \epsilon, ~ \forall ~ h \in \mathcal{H} \right) \geq 1- \delta , \quad n \geq m (\epsilon, \delta).$$

When we take the complement, we obtain that

$$\mathbb{P}^n \left( {\bf o_n} \in \mathbb{O}^n : \sup_{h \in \mathcal{H}} \big|L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| > \epsilon \right) < \delta .$$

Since $\mathcal{H} = (h_1, h_2, \cdots , h_N)$ is a finite set $(N\in \mathbb{N})$, we obtain that

$$( {\bf o_n} \in \mathbb{O}^n : \sup_{h \in \mathcal{H}} \big|L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| > \epsilon ) = \bigcup_{h \in \mathcal{H}} ( {\bf o_n} \in \mathbb{O}^n : \big|L_E ({\bf o_n}, h) - L(\mathbb{P} , h) \big| > \epsilon ) \in \beta(\mathbb{O}^n)$$

and consequently

$$ \mathbb{P}^n \left( {\bf o_n} \in \mathbb{O}^n : \sup_{h \in \mathcal{H}} \big|L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| > \epsilon \right) \leq \sum_{h \in \mathcal{H}} \mathbb{P}^n \left({\bf o_n} \in \mathbb{O}^n : \big|L_E ({\bf o_n}, h) - L(\mathbb{P} , h) \big| > \epsilon \right). $$

Next, we will show that each component of the sum in the equation above is small enough for a given size of the data set. We know that

$$ L(\mathbb{P} , h ) = \mathbb{E_{\mathbb{P}}} \left(\ell (\cdot , h) \right) \quad \text{e} \quad L_E ({\bf o_n} , h) = \frac{1}{n} \sum_{i=1}^n \ell ((x_i , y_i) , h). $$

Since ${\bf o_n}$ is a simple random sample (iid), we conclude that

$$ \mathbb{E_{\mathbb{P}}} \left[ L_E ({\bf o_n} , h) \right] = \left[ \frac{1}{n} \sum_{i=1}^n \ell (\cdot , h) \right] = \mathbb{E_{\mathbb{P}}} \left[ \ell (\cdot , h) \right] = L(\mathbb{P} , h ) . $$ Therefore, the quantity $\mid L_E (\mathbb{S} , h) - L(\mathbb{P} , h) \mid$ expresses the deviation of the random variable $L_E ({\bf o_n} , h)$ around its expected value $L(\mathbb{P} , h )$. Since ${\bf o_n}$ is a simple random sample, the law of large numbers guarantees us that the random variable $L_E ({\bf o_n} , h)$ converges in probability to its expected value $L(\mathbb{P} , h )$, for all $h \in \mathcal{H}$. However, the law of large numbers does not provide us with a convergence rate. To do this, we will use Hoeffding’s inequality which quantifies the difference between empirical averages and their expected value.

Lemma 1: Hoeffding inequality

Consider $(\Omega , \mathcal{F}, \mu)$ a probability space. Be $Z_1 , Z_2 , \cdots$ a sequence of iid random variables defined over $\Omega , \mathcal{F}, \mu$ with $\mathbb{E} (Z_i)=\theta$ and $\mu \left(a \leq Z_i \leq b \right)=1$. So, for all $\epsilon > 0$, we have to

$$ \mu \left[ \left| \frac{1}{n} \sum_{i=1}^n Z_i - \theta \right| > \epsilon \right] \leq 2 \exp \left(\frac{-2 n \epsilon^2}{(b-a)^2}\right). $$

Since the loss function $\ell$ is non-negative and limited by $\bar{a}$ and the dataset ${\bf o_n}$ is a simple random sample, it follows from Hoeffding’s inequality that

$$\mathbb{P}^n \left( {\bf o_n} \in \mathbb{O}^n : \big|L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| > \epsilon \right) \leq 2 \exp \left(\frac{-2 n \epsilon^2}{(\bar{a})^2}\right).$$

From these equations, we conclude that

$$ \mathbb{P}^n \left( {\bf o_n} \in \mathbb{O}^n : \sup_{h \in \mathcal{H}} \big|L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| > \epsilon \right) \leq \sum_{h \in \mathcal{H}} 2 \exp \left(\frac{-2 n \epsilon^2}{(\bar{a})^2}\right) = 2 Card \left( \mathcal{H} \right) \exp \left(\frac{-2 n \epsilon^2}{(\bar{a})^2}\right) , $$ in which $ Card (\cdot)$ represents the cardinality of the set. When we choose,

$$ n \geq \bar{a}^2 \frac{Ln(2 Card (\mathcal{H})/\delta)}{2 \epsilon^2 }, $$ we get that

$$ \mathbb{P}^n \left( {\bf o_n} \in \mathbb{O}^n : \sup_{h \in \mathcal{H}} \big|L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| > \epsilon \right) \leq \delta . $$

Theorem 1: Finite Classes

Be $\mathcal{H}$ a finite class of admissible predictors and $\ell : \mathbb{O} \times \mathcal{H} \rightarrow [0, \bar{a}]$ the loss function. So, the class $\mathcal{H}$ satisfies the uniform convergence property with complexity function

$$ m_{\mathcal{H}}^{UC} (\epsilon , \delta) \leq \bar{a}^2 \frac{Ln(2 Card (\mathcal{H})/\delta)}{2 \epsilon^2 }. $$ In particular, we have that the class $\mathcal{H}$ also satisfies the PAC property with complexity function

$$ m_{\mathcal{H}} (\epsilon , \delta) \leq m_{\mathcal{H}}^{UC} (\epsilon , \delta) \leq \bar{a}^2 \frac{Ln(2 Card (\mathcal{H})/\delta)}{2 \epsilon^2 }. $$

From Theorem 1, we conclude that PAC learning depends on the cardinality of the class of admissible predictors $\mathcal{H}$.

Risk Decomposition

Given a training data set ${\bf o}_n$ and a learning algorithm $A_E({\bf o}_n)$ obtained via the MRE principle, we can decompose the risk function in the form:

$$ L(\mathbb{P} ,A_E({\bf o_n})) = \epsilon_{app} + \epsilon_{est}, \quad \text{nos quais} \quad \epsilon_{app} := \inf_{h \in \mathcal{H}} L(\mathbb{P} , h), \quad \epsilon_{est} := L(\mathbb{P} , A_E({\bf o_n})) - \inf_{h \in \mathcal{H}} L(\mathbb{P} , h). $$

The approximation error $(\epsilon_{app})$ is the lowest risk achieved by a predictor in the class $\mathcal{H}$ of admissible predictors. This term measures the risk of restricting the class of predictors and is called inductive bias. The approximation error does not depend on the sample size, being determined by the class $\mathcal{H}$. The broader the class of admissible predictors $\mathcal{H}$, the smaller the approximation error will be. Even without imposing restrictions on the class of admissible predictors, the approximation error will not necessarily be zero. For example, in the case of binary classification, we will always have the error of the Bayes predictor.

The estimation error $(\epsilon_{est})$ corresponds to the difference between the approximation error and the error obtained by the learning algorithm derived from the MRE principle. The estimation error is a consequence of the fact that the empirical risk is an estimate of the risk function. In this way, the predictor that minimizes the empirical risk is also an estimate of the predictor that minimizes the risk function. The estimation quality depends on the sample size and the complexity (size) of the class of admissible predictors. As we showed in the Classes of Finite Predictors section, if the class of admissible predictors $\mathcal{H}$ is finite, the estimation error $(\epsilon_{est})$ is directly proportional to the cardinality of the class $\mathcal{H}$ and inversely proportional to the sample size. Thus, we can interpret the cardinality of the class of admissible predictors as a measure of complexity.

In general, our main objective is to minimize the risk function. In view of this, we deal with the paradigm of inductive bias and the complexity of the class of admissible predictors. On the one hand, if we choose the class $\mathcal{H}$ very rich (complex) we reduce the approximation error, but increase the estimation error, which can lead to the problem of overfitting. On the other hand, if we choose $\mathcal{H}$ less rich (less complex) we can reduce the estimation error, but we increase the approximation error, which leads to the problem of poor fit (underfitting).

The approximation error depends on the prior knowledge we have of the class of admissible predictors and the unknown probability $\mathbb{P}$. Furthermore, PAC learning requires that the estimation error be uniformly bounded over the set of all probabilities $\mathbb{P} \in \mathcal{P}(\mathbb{O})$. Our objective is to characterize which classes of admissible predictors $\mathcal{H}$ has the PAC property and consequently determines the sampling complexity $(m_{\mathcal{H}})$ to apply the learning algorithm given by the MRE principle.

Binary Classification

In the Class of Finite Predictors section, we show that any finite class of admissible predictors is a learning PAC. However, many interesting classes are not finite. In the case of finite predictor classes, the complexity of PAC learning is determined by the cardinality (complexity) of the class. So, to broaden our class of admissible predictors, we need to find a better way to measure the complexity of a class of functions. To do this, we will introduce the Rademacher complexity and then use it to deduce the Vapnik–Chervonenkis (VC) dimension applied to the binary classification problem. In general, the complexity measure of the class of admissible predictors defines how many different labelings we can produce for a finite sample. From the VC dimension, we will establish necessary and sufficient conditions for PAC learning. In this chapter, we will address the issue of PAC learning in the context of binary classifiers.

Screenshot_8

Lemma 1: Bayes Classifier

For any possible predictor $h \in \bar{\mathcal{H}}$, we have to

Screenshot_9

as a consequence of the definition of the Bayes predictor $h^\star$. When we integrate in relation to $\mathbb{P}_{\chi}$ we complete the motto.

As a consequence of lemma 1, we have

Screenshot_10

Lemma 2: Class of Predictors with threshold value

Screenshot_11 Thus, a sufficient condition for $L(\mathbb{P}, h_E) \leq \epsilon$ is that $b_0 ({\bf o_n}) \geq a_0$ and $b_1 ({\bf o_n}) \leq a_1$. With this, we obtain that

$$ \mathbb{P}^n \left[ {\bf o_n} \in \mathbb{O}^n : L\left(\mathbb{P} , h_E ({\bf o_n}) \right) > \epsilon \right] \leq $$

$$ \mathbb{P}^n \left[ ( {\bf o}_n \in \mathbb{O}^n: b_0 ({\bf o}_n) < a_0) \cup ( {\bf o}_n \in \mathbb{O}^n: b_1 ({\bf o}_n) > a_1) \right] \leq $$

$$ \mathbb{P}^n \left[ ( {\bf o_n} \in \mathbb{O}^n: b_0 ({\bf o_n}) < a_0) \right] + \mathbb{P}^n \left[ ( {\bf o_n} \in \mathbb{O}^n: b_1 ({\bf o_n}) > a_1) \right]. $$

The event $( {\bf o}_n \in \mathbb{O}^n: b_0 ({\bf o}_n) < a_0)$ occurs if and only if all observations in the data set ${\bf o}_n$ are not in range $(a_0 , a^\star)$. In this way, we have to

$$ \mathbb{P}^n \left[ ( {\bf o_n} \in \mathbb{O}^n: b_0 ({\bf o_n}) < a_0) \right] = \mathbb{P}^n \left[{\bf o_n} \in \mathbb{O}^n : x_i \not \in (a_0,a^\star) \right] = (1-\epsilon)^n \leq \exp^{-\epsilon n} . $$ As a consequence of the above equations, we conclude that

$$ \mathbb{P}^n \left[ {\bf o_n} \in \mathbb{O}^n : L\left(\mathbb{P} , h_E ({\bf o_n}) \right) > \epsilon \right] \leq \exp^{-\epsilon n} + \exp^{-\epsilon n} = 2 \exp^{-\epsilon n}. $$ When we take $n > \frac{Ln(2/\delta)}{\epsilon}$, we obtain that

$$ \mathbb{P}^n \left[ {\bf o_n} \in \mathbb{O}^n : L\left(\mathbb{P} , h_E ({\bf o_n}) \right) > \epsilon \right] < \delta. $$ Follow the motto.

With this lemma, we show that the PAC learning property is not restricted to finite classes of admissible predictors. In this module, we will establish necessary and sufficient conditions for a class of admissible predictors to be $\mathcal{H}$ be PAC for a binary classification problem.

Rademacher complexity

In the statistical machine learning model we have a set of data $ {\bf o}_n = ((x_1,y_1), \cdots (x_n , y_n))$, in which we admit to be a simple random sample (iid) of the probability $\mathbb{P}$. A strategy is a function $A$ defined over the data space $\mathbb{O}^n$ to values in the space of admissible predictors $\mathcal{H}$ which is measurable Borel. The performance of a strategy $A$ is measured by the conditional probability of the classification error given the sample, i.e.

$$L(\mathbb{P} , A({\bf o}_n )) = \mathbb{P} \left[(x,y) \in \mathbb{O}: y \neq A({\bf o}_n , x) \right], ~ {\bf o}_n \in \mathbb{O}^n.$$

To maintain as much generality as possible, we will deal with a more comprehensive risk function during this module. Consider $\ell: \mathbb{O} \times \mathcal{H} \rightarrow [0,1]$ any measurable Borel function. The objective of binary classification theory is to find predictors whose expected risk function is as close as possible to the risk of the Bayes predictor. Since we do not have access to probability $\mathbb{P}$, a simple and natural strategy is given by the principle of empirical risk minimization. Consider $\mathcal{H}$ a subclass of admissible predictors, we denote by $A_E$ the strategy that minimizes empirical risk

$$ L_E ({\bf o_n} , A_E({\bf o_n})) = \inf_{h \in \mathcal{H}}\frac{1}{n} \sum_{i=1}^n \ell (o_i , h) , ~ {\bf o_n} \in \mathbb{O}^n. $$ The expected risk of the strategy $A_E$ that minimizes empirical risk satisfies

$$ L(\mathbb{P}, A_E({\bf o_n})) - \inf_{h \in \mathcal{H}} L(\mathbb{P} , h) = $$ $$ L(\mathbb{P}, A_E({\bf o_n})) - L_E ({\bf o_n} , h^\star) + L_E ({\bf o_n} , h^\star) - L(\mathbb{P} , h^\star) \leq $$ $$ L(\mathbb{P}, A_E({\bf o_n})) - L_E ({\bf o_n} , A_E({\bf o_n})) + L_E ({\bf o_n} , h^\star) - L(\mathbb{P} , h^\star) \leq $$ $$ 2 \sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big|, ~ ~ (\text{Desigualdade 1}), $$ in which $h^\star$ is the Bayes classifier. Furthermore, we have to

$$ \mid L(\mathbb{P}, A_E({\bf o_n})) - L_E ({\bf o_n}, A_E({\bf o_n})) \mid ~ \leq ~ \sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big|, ~ ~ (\text{Desigualdade 2}), $$ for everyone ${\bf o_n} \in \mathbb{O}^n$ and $\mathbb{P} \in \mathcal{P}(\mathbb{O})$. From inequalities 1 and 2, we conclude that if we have estimates for the probability of the uniform difference

$$\sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| = \sup_{h \in \mathcal{H}} \big| \frac{1}{n} \sum_{i=1}^n \ell (o_i , h) - \mathbb{E_{\mathbb{P}}} \ell (\cdot , h) \big| $$ sufficiently low, we guarantee that the probability of error (expected risk) of the strategy $A_E$ is not much greater than the error probability of the Bayes estimator in the class $\mathcal{H}$. Furthermore, the empirical estimate $L_E (\cdot, A_E(\cdot))$ is also a good approximation for $\inf_{h \in \mathcal{H}} L(\mathbb{P} , h)$.

For every admissible predictor $h \in \mathcal{H}$, the function $\ell (\cdot , h): \mathbb{O} \rightarrow [0,1]$ Measurable Borel. In this way, we define the following class of functions $\mathcal{W} = (\ell (\cdot,h) : h \in \mathcal{H} )$ as a composition of the risk function $\ell$ with the class of admissible predictors $\mathcal{H}$. When we take $f \in \mathcal{W}$, $\mathbb{P}(f) = \mathbb{E_{\mathbb{P}}} f((X,Y))$ and $\mathbb{P}_n f= \frac{1}{n} \sum_{i=1}^n f(X_i,Y_i)$, we conclude that the uniform difference is given by

$$\sup_{h \in \mathcal{H}} \big| L_E ({\bf o}_n , h) - L(\mathbb{P} , h) \big| = \sup_{f \in \mathcal{W}} \left| \mathbb{P}_n (f) -\mathbb{P}(f) \right| .$$

As a consequence of the definition, for all $h \in \mathcal{H}$, we have to $L_E(\cdot , h)$ is a random variable with mean $L(\mathbb{P},h)$. Therefore, we have to evaluate the uniform difference between a random variable with values in the range $[0,1]$ and its average. In the particular case of the risk given by classification error, we have to $nL_E(\cdot , h)$ has binomial distribution with parameters $n$ and $L(\mathbb{P},h)$. In this case, we have to study the uniform difference between the Bernoulli distribution and its mean.

Next, we will present some properties related to the supreme that will be used during this section. Be $f_1 , f_2 : \mathbb{O} \rightarrow \mathbb{R}$ two functions satisfying $- \infty < \sup_x f_i(x) < \infty$ for $i=1,2$. So we have to

$$ \sup_x f_1(x) - \sup_x f_2 (x) \leq \sup_x (f_1(x) - f_2 (x)), ~ ~ (\text{Desigualdade 3}). $$

In fact, for all $\epsilon > 0$ exists $x_\epsilon \in \mathbb{O}$ such that $f_1(x_\epsilon) \geq \sup_x f_1 (x) - \epsilon$. So, we have to

$$ \sup_x f_1(x) - \sup_x f_2 (x) \leq \sup_x f_1(x) - f_2 (x_\epsilon) \leq f_1 (x_\epsilon) - f_2 (x_\epsilon) + \epsilon $$ $$ \leq \sup_x \left( f_1(x) - f_2 (x) \right) + \epsilon. $$

How $\epsilon > 0$ is arbitrary, we obtain inequality 3. On the other hand, we have to

$$\sup_x \left(f_1(x) + f_2 (x) \right) \leq \sup_x f_1 (x) + \sup_x f_2 (x) ~ ~ (\text{Desigualdade 4}).$$

As a consequence of inequality 4, we conclude that the supreme is a convex function. Consider $(a_i : i \in I)$ and $(a_i^\prime : i \in I)$ two family of elements $\mathbb{R}$ indexed by $I$. So, we have to

$$\sup_{i \in I} \left( \lambda a_i + (1-\lambda)a^\prime_i \right) \leq \lambda \sup_{i \in I} a_i + (1-\lambda) \sup_{i \in I} a^\prime_i , ~ ~ (\text{Desigualdade 5}),$$

for everyone $0 \leq \lambda \leq 1 $.

Concentration-related inequalities are among the main tools used to study the uniform difference presented in inequality 1 and 2. The simplest and most useful is called bounded differences inequality.

Lemma 1: Bounded Differences Inequality - BDI

Be $g: \mathbb{O}^n \rightarrow \mathbb{R}$ a measurable Borel function of $n$ variables such that there exist non-negative constants satisfying,

$$\sup_{(x_1 , \cdots , x_n) \in \mathbb{O}^n } ~ \sup_{x^\prime_i \in \mathbb{O} }\big| g(x_1, \cdots , x_n) - g(x_1, \cdots , x_{i-1}, x^\prime_i , x_{i+1} , \cdots , x_n) \big| \leq c_i, $$

for everyone $i=1,2, \cdots , n$. Consider $W_1, W_2 , \cdots , W_n$ independent random variables. Then the random variable $Z=g(W_1, \cdots , W_n)$ satisfies

$$\mathbb{P}^n \left[ \big| Z - \mathbb{E} Z \big| > t \right] \leq 2 e^{-2t^2 / C},$$

in which $C = \sum_{i=1}^n c_i^2$.

The function-related limited differences hypothesis $g$ tells us that if we change the ith coordinate and keep the others fixed, the value of the function $g$ does not change more than $c_i$. The example of interest is given by

$$ Z= \sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| = \sup_{f \in \mathcal{W}} \left| \mathbb{P}_n (f) - \mathbb{P}(f) \right|. $$ How does the function $\ell$ assumes values in $[0,1]$, we obtain that $Z$ satisfies the hypothesis of limited differences with $c_i=1/n$. In fact, consider ${\bf o_n}=(o_1, \cdots , o_n)$ and ${\bf o_n}^\prime = (o_1 , \cdots , o_{i-1}, o^{\prime}_i , o_{i+1} , \cdots , o_n)$. As a consequence of inequality 3, we have

$$ \left| \sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| - \sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n}^\prime , h) - L(\mathbb{P} , h) \big| \right| \leq $$

$$ \sup_{h \in \mathcal{H}} \left| ~ \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| - \big| L_E ({\bf o_n}^\prime , h) - L(\mathbb{P} , h) \big| ~ \right| = $$

$$ \sup_{h \in \mathcal{H}} \left| ~ \left| \frac{1}{n} \left( \sum_{j\neq i} \ell (o_j , h) - L(\mathbb{P} , h) \right) + \frac{1}{n} \ell (o_i , h) \right| \right. - $$

$$ \left. \left| \frac{1}{n} \left( \sum_{j\neq i} \ell (o_j , h) - L(\mathbb{P} , h) \right) + \frac{1}{n} \ell (o_i^\prime , h) \right| ~ \right| \leq \frac{1}{n}. $$

As a consequence of the BDI motto, for all $0 < \delta < 1/2$, we obtain that

$$ \mathbb{P}^n \left[ ( Z - \mathbb{E_{\mathbb{P}^n }} Z ) > \sqrt{\frac{\ln (1/ \delta)}{2n}} \right] \leq \mathbb{P}^n \left[ \mid Z - \mathbb{E_{\mathbb{P}^n }} Z \mid > \sqrt{\frac{-\ln (\delta)}{2n}} \right] $$

$$\leq \mathbb{P}^n \left[ \mid Z - \mathbb{E_{\mathbb{P}^n }} Z \mid > \sqrt{\frac{-\ln (2 / \delta )}{2n}} \right] $$

$$\leq 2 e^{-2n \ln(2/ \delta) \frac{1}{2n} } = \delta .$$

Therefore, there is a set $G \in \beta (\mathbb{O}^n)$ with probability $\mathbb{P}^n (G) \geq 1-\delta$, such that

$$ \sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| \leq \mathbb{E_{\mathbb{P}^n }} \sup_{h \in \mathcal{H}} \big| L_E (\cdot , h) - L(\mathbb{P} , h) \big| + \sqrt{\frac{\ln (1/ \delta)}{2n}} ~ ~ (\text{Desigualdade 6}), $$ for everyone ${\bf o_n} \in G$. As a consequence of this result, we can focus on the expected value $EZ$, which can be limited by a symmetrization strategy. We introduce a ``ghost sample'' $({\bf X}^\prime , {\bf Y}^\prime) = ((X_1^\prime, Y_1^\prime), \cdots , (X_n^\prime, Y_n^\prime) )$ iid with probability distribution $\mathbb{P}$ and independent of the original sample $ ({\bf X} , {\bf Y}) = ((X_1 , Y_1), \cdots , (X_n, Y_n) )$. Given that the random vector $( ({\bf X} , {\bf Y}) , ({\bf X}^\prime , {\bf Y}^\prime) )$ is defined in the product probability space $(\mathbb{O}^{2n} , \beta (\mathbb{O}^{2n}), \mathbb{P}^{2n})$, follows from the fact that the supreme function is convex (see inequality 5) and from Jensen’s inequality, which

$$ \mathbb{E_{\mathbb{P}^n }} \sup_{h \in \mathcal{H}} \big| L_E (({\bf X} , {\bf Y}) , h) - L(\mathbb{P} , h) \big| = \mathbb{E_{\mathbb{P}^{2n} }} \sup_{h \in \mathcal{H}} \big| L_E (({\bf X} , {\bf Y}) , h) - L(\mathbb{P} , h) \big| $$ $$= \mathbb{E_{\mathbb{P}^{2n} }} \sup_{h \in \mathcal{H}} \big| L_E (({\bf X} , {\bf Y}) , h) - \mathbb{E_{\mathbb{P}^{2n} }} \left[ L_E (({\bf X}^\prime , {\bf Y}^\prime) , h) \mid ({\bf X} , {\bf Y}) \right] \big| = $$ $$ \mathbb{E_{\mathbb{P}^{2n} }} \sup_{h \in \mathcal{H}} \big| \mathbb{E_{\mathbb{P}^{2n} }} \left[ L_E (({\bf X} , {\bf Y}) , h) - L_E (({\bf X}^\prime , {\bf Y}^\prime) , h) \mid ({\bf X} , {\bf Y}) \right] \big| \leq $$ $$ \mathbb{E_{\mathbb{P}^{2n} }} \sup_{h \in \mathcal{H}} \big| L_E (({\bf X} , {\bf Y}) , h) - L_E (({\bf X}^\prime , {\bf Y}^\prime) , h) \big| ~ ~ (\text{Desigualdade 7}). $$

Consider $\sigma = (\sigma_1, \cdots , \sigma_n)$ independent and identically distributed random variables such that $\mu [\sigma_i= 1 ] = \mu [\sigma_i= -1 ] = 1/2$. Thus, when we take the probability space product $ (\mathbb{O}^{2n} \times (1 , -1)^n , \beta (\mathbb{O}^{2n} \times (1 , -1)^n ) , \mathbb{P}^{2n} \times \mu^n)$, we conclude that the random vectors $(\sigma, ( ({\bf X} , {\bf Y}) , ({\bf X}^\prime , {\bf Y}^\prime) ))$ defined over this probability space are independent. Since the probability distribution of random variables $ L_E (({\bf X} , {\bf Y}) , h) - L_E (({\bf X}^\prime , {\bf Y}^\prime) , h)$ and $ L_E (({\bf X}^\prime , {\bf Y}^\prime) , h)- L_E (({\bf X} , {\bf Y}) , h) $ are identical and $\sigma$ has a symmetric distribution, we conclude that

$$ \mathbb{E_{\mathbb{P}^{2n} }} \sup_{h \in \mathcal{H}} \big| L_E (({\bf X} , {\bf Y}) , h) - L_E (({\bf X}^\prime , {\bf Y}^\prime) , h) \big| = \mathbb{E_{\mathbb{P}^{2n} }} \sup_{h \in \mathcal{H}} \frac{1}{n} \left| \sum_{i=1}^n \left( \ell ((X_i , Y_i) , h) - \ell ((X_i^\prime , Y_i^\prime) , h) \right) \right| = $$ $$ \mathbb{E}_{\mathbb{P}^{2n} \times \mu^n } \sup_{h \in \mathcal{H}} \frac{1}{n} \left| \sum_{i=1}^n \sigma_i \left( \ell ((X_i , Y_i) , h) - \ell ((X_i^\prime , Y_i^\prime) , h) \right) \right| \leq $$ $$ \mathbb{E}_{\mathbb{P}^{2n} \times \mu^n } \sup_{h \in \mathcal{H}} \frac{1}{n} \left| \sum_{i=1}^n \sigma_i \left( \ell ((X_i , Y_i) , h) \right) \right| + \mathbb{E}_{\mathbb{P}^{2n} \times \mu^n } \sup_{h \in \mathcal{H}} \frac{1}{n} \left| \sum_{i=1}^n \sigma_i \left( - \ell ((X_i^\prime , Y_i^\prime) , h) \right) \right| = $$ $$ 2 \mathbb{E}_{\mathbb{P}^{n} \times \mu^n } \sup_{h \in \mathcal{H}} \frac{1}{n} \left| \sum_{i=1}^n \sigma_i \ell ((X_i , Y_i) , h) ) \right|~ ~ (\text{Desigualdade 8}). $$ Rademacher’s empirical complexity of the class $\mathcal{H}$ is given by

$$ \hat{\mathcal{R_n}} ( {\bf o_n} , \mathcal{H} ) := \mathbb{E_{\mu^n }} \sup_{h \in \mathcal{H}} \frac{1}{n} \left| \sum_{i=1}^n \sigma_i \ell (o_i , h) ) \right|, ~ {\bf o_n} = (o_1, \cdots , o_n)\in \mathbb{O}^n . $$

The nomenclature comes from the fact that $(\sigma_1 , \cdots , \sigma_n)$ are called Rademacher random variables. On the other hand, Rademacher complexity (also known as Rademacher Average) is given by

$$ \mathcal{R_n} ( \mathcal{H} ) := \mathbb{E}_{\mathbb{P}^{n} } \hat{\mathcal{R_n}} (\cdot , \mathcal{H} ). $$

Next, we present Rademacher’s complexity theorem.

Theorem 1: Rademacher Complexity

For all $0 < \delta < 1$, there is a set $G \in \beta (\mathbb{O}^n)$ with $\mathbb{P}(G) \geq 1 - \delta$, such that $$ \sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| \leq 2 \mathcal{R}_n ( \mathcal{H} ) + \sqrt{\frac{\ln (1/ \delta)}{2n}}, ~ {\bf o_n} \in G ~ ~ (\text{Desigualdade 10}). $$ For all $0 < \delta < 1/2$, there is a set $\hat{G} \in \beta (\mathbb{O}^n)$ with $\mathbb{P}^n(\hat{G}) \geq 1 - \delta$, such that $$ \sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| \leq 2 \hat{\mathcal{R_n}} ({\bf o_n} , \mathcal{H} ) + 3 \sqrt{\frac{\ln (2/ \delta)}{2n}}, ~ {\bf o_n} \in \hat{G} ~ ~ (\text{Desigualdade 11}). $$

Proof

Inequality 10 is a consequence of inequalities 7, 8 and 9. To demonstrate inequality 11, let’s apply lemma 1 again with $g ({\bf o_n}) = \hat{\mathcal{R_n}} ({\bf o_n} , \mathcal{H} )$ for everyone ${\bf o_n} \in \mathbb{O}^n$. Consider ${\bf o_n}=(o_1, \cdots , o_n)$ and ${\bf o_n}^\prime = (o_1 , \cdots , o_{i-1}, o^{\prime}_i , o_{i+1} , \cdots , o_n)$. As a consequence of inequality 3, we obtain that

$$g ({\bf o_n}) - g ({\bf o_n}^\prime) = \hat{\mathcal{R_n}} ({\bf o_n} , \mathcal{H} ) - \hat{\mathcal{R_n}} ({\bf o_n}^\prime , \mathcal{H} ) =$$

$$\mathbb{E_{\mu^n}} \left[ \sup_{h \in \mathcal{H}} \frac{1}{n} \left| \sum_{j \neq i } \sigma_j \ell (o_j , h) ) + \sigma_i \ell (o_i , h) \right| - \sup_{h \in \mathcal{H}} \frac{1}{n} \left| \sum_{j \neq i} \sigma_j \ell (o_j , h) ) + \sigma_i \ell (o^\prime_i , h) \right| \right] \leq$$

$$\mathbb{E_{\mu^n}} \left[ \sup_{h \in \mathcal{H}} \left( \frac{1}{n} \left| \sum_{j \neq i } \sigma_j \ell (o_j , h) ) + \sigma_i \ell (o_i , h) \right| - \frac{1}{n} \left| \sum_{j \neq i} \sigma_j \ell (o_j , h) ) + \sigma_i \ell (o^\prime_i , h) \right| \right) \right] \leq$$

$$\sup_{h \in \mathcal{H}} \frac{1}{n} \left|\ell (o_i , h) - \ell (o^\prime_i , h) \right| \leq \frac{1}{n} .$$

In a similar way we can show that $ g ({\bf o_n}^\prime) - g ({\bf o_n}) \leq 1/n$ and therefore, we have to $\mid g ({\bf o_n}^\prime) - g ({\bf o_n}) \mid \leq 1/n $. When we apply lemma 1, we obtain the existence of a set $G_1 \in \beta(\mathbb{O}^n)$ with $\mathbb{P}^n (G_1) \geq 1 - \delta/2$ such that

$$\left| \hat{\mathcal{R_n}} ( {\bf o_n} , \mathcal{H} ) - \mathcal{R}_n ( \mathcal{H} ) \right| \leq \sqrt{\frac{\ln (2/ \delta)}{2n}}, ~ {\bf o_n} \in G_1 ~ ~ (\text{Desigualdade 12}).$$

In inequalities 10 and 12 we take $G$ and $G_1$ with a probability of occurrence greater than $1- \delta/2$. Thus, there is $\hat{G} = G \cap G_1$ satisfying

$$\sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| \leq 2 \mathcal{R}_n ( \mathcal{H} ) + \sqrt{\frac{\ln (1/ \delta)}{2n}} = $$

$$2 \left( \mathcal{R}_n ( \mathcal{H} ) - \hat{\mathcal{R_n}} ({\bf o_n} , \mathcal{H} ) \right) + 2 \hat{\mathcal{R_n}} ({\bf o_n} , \mathcal{H} ) + \sqrt{\frac{\ln (2/ \delta)}{2n}} \leq$$

$$ 2 \sqrt{\frac{\ln (2/ \delta)}{2n}} + 2 \hat{\mathcal{R_n}} ({\bf o_n} , \mathcal{H} ) + \sqrt{\frac{\ln (2/ \delta)}{2n}} \leq 2 \hat{\mathcal{R_n}} ({\bf o_n} , \mathcal{H} ) + 3 \sqrt{\frac{\ln (2/ \delta)}{2n}} . $$

Follow the theorem.

Inequality 11 is a limit that depends on the data, as it involves the Rademacher complexity at the point ${\bf o_n} \in \mathbb{O}^n$. Conditioned on data, complexity $\hat{\mathcal{R_n}} ( {\bf o_n} , \mathcal{H} )$ can be calculated, for example, by Monte Carlo simulation. Rademacher complexity $\hat{\mathcal{R_n}} ( \cdot , \mathcal{H} )$ depends on the risk function related to the binary classification problem. Consider the projection $\mathcal{W} ({\bf o_n} )= ((\ell (o_1 , h) , \cdots , \ell (o_n , h)) : h \in \mathcal{H}) \subset [0,1]^n$ of the class of admissible predictors with respect to the data set ${\bf o_n}$. In this way, given a fixed sample ${\bf o_n} \in \mathbb{O}^n$, we can treat the Rademacher complexity as a function over the family of subsets of the space $(0,1)^n$. Given a subset $A \subset [0,1]^n$ with vectors ${\bf a}=(a_1 , \cdots , a_n)$, we introduce the following quantity

Screenshot_12

because the random variables $(\sigma_1, \cdots , \sigma_n)$ are iid and have a symmetric distribution. The function $\hat{\mathcal{R_n}} (A)$ corresponds to the Rademacher complexity related to the set $A$. By definition we have $\hat{\mathcal{R_n}} (\mathcal{W} ({\bf o_n} ))= \hat{\mathcal{R_n}} ({\bf o_n} , \mathcal{H} )$ for everyone ${\bf o_n} \in \mathbb{O}^n$. Therefore, inequality 11 can be written in the form

$$\sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| \leq 2 \hat{\mathcal{R_n}} (\mathcal{W} ({\bf o_n} ) ) + 3 \sqrt{\frac{\ln (2/ \delta)}{2n}}, ~ {\bf o_n} \in \hat{G}, ~ ~ (\text{Desigualdade 14}),$$

with $\mathbb{P}^n(\hat{G}) \geq 1 - \delta$ and $0 < \delta < 1/2$. Next, we present Massart’s inequality for Rademacher complexity.

Theorem 2: Rademacher Complexity Property

Be $A$ and $B$ Borel subsets of space $[0,1]^n$. So, we have to

  • $\hat{\mathcal{R_n}} (A \cup B) \leq \hat{\mathcal{R_n}} (A ) + \hat{\mathcal{R_n}} ( B)$
  • A Massart inequality is valid:

$$\hat{\mathcal{R_n}} (A) \leq r \frac{\sqrt{2 Ln (Card(A))}}{n}, ~ ~ (\text{Desigualdade 15}),$$

in which $r^2 = \max_{a \in A} \sum_{i=1}^n a_i$ represents the norm of the set $A$ and $Card(A)$ their respective cardinality.

  • Ledoux and Talagrand contraction principle: Be $\Phi: \mathbb{R} \rightarrow \mathbb{R}$ a Lipschitz function with constant $C>0$ (i.e. $\mid \Phi(a) - \Phi(b)\mid \leq C \mid a - b \mid$ for everyone $a,b \in \mathbb{R}$). So, we have to

$$ \hat{\mathcal{R_n}} (\Phi \circ A) \leq C ~ \hat{\mathcal{R_n}} (A) ,$$ in which $\Phi \circ A = ( (\Phi(a_1) , \cdots , \Phi(a_n)) : (a_1 , \cdots , a_n) \in A ) $.

Proof

The first property of Rademacher complexity is a consequence of inequality 4. Next, we will derive inequality 15 from Hoeffding’s inequality. Be $Z$ a random variable with zero expected value and limited in the range $[a,b]$. So, for all $s>0$, we have to

$$\mathbb{E} \exp (sZ) \leq \exp\left(s^2 \frac{(b-a)^2}{8} \right).$$

As a consequence of Hoeffding’s inequality and the fact that random variables $(\sigma_1, \cdots , \sigma_n)$ are iid and have a symmetric distribution, we have

$$\exp^{s \mathbb{E_{\sigma}} \sup_{a \in A} \sum_{i=1}^n \sigma_i a_i } \leq \mathbb{E_{\sigma}} \left[ \exp^{\sup_{a \in A} \sum_{i=1}^n \sigma_i a_i } \right] = \mathbb{E_{\sigma}} \sup_{a \in A} \exp^{ \sum_{i=1}^n \sigma_i a_i } \leq$$

$$\sum_{a \in A} \mathbb{E_{\sigma}} \exp^{ \sum_{i=1}^n \sigma_i a_i } = \sum_{a \in A} \prod_{i=1}^n \mathbb{E_{\sigma}} \exp^{ \sigma_i a_i } \leq \sum_{a \in A} \prod_{i=1}^n \exp^{\frac{s^2 a_i}{2}} \leq$$

$$\sum_{a \in A} \exp^{\frac{s^2}{2} \max_{a \in A} \sum_{i=1}^n a_i } = \sum_{a \in A} \exp^{\frac{s^2}{2} r^2 } = Card(A) \exp^{\frac{s^2}{2} r^2 }.$$

With this, we obtain that

$$\mathbb{E_{\sigma}} \sup_{a \in A} \sum_{i=1}^n \sigma_i a_i \leq \frac{1}{s} \ln(Card(A)) + \frac{s}{2} r^2.$$

When we take $s= \frac{\sqrt{2 \ln (Card(A))}}{r}$ we deduce Massart inequality,

$$\frac{1}{n} \mathbb{E_{\mu^n}} \sup_{a \in A} \sum_{i=1}^n \sigma_i a_i \leq r \frac{\sqrt{2 \ln (Card(A))}}{n}.$$

Next, we will demonstrate the principle of Ledoux and Talagrand contraction. Rademacher’s empirical complexity can be written in the form

$$\hat{\mathcal{R_n}} (\Phi \circ A) = \mathbb{E_{\mu^n}} \sup_{a \in A} \frac{1}{n} \sum_{i=1}^n \sigma_i \Phi(a_i) = \mathbb{E}_{\mu^{n-1}} \mathbb{E}_{\mu}\sup_{a \in A} \left[ \frac{1}{n} \sum_{i=1}^{n-1} \sigma_i \Phi(a_i) + \sigma_n \Phi(a_n) \right].$$

Assume that the ultimate exists (otherwise, we use the solution $\epsilon$-great). Thus, there is $c^\star , d^\star \in A$ such that

$$ \frac{1}{n} \sum_{i=1}^{n-1} \sigma_i \Phi(c_i^\star) + \Phi(c_n^\star) = \sup_{a \in A} \left[ \frac{1}{n} \sum_{i=1}^{n-1} \sigma_i \Phi(a_i) + \Phi(a_n) \right] $$ and $$ \frac{1}{n} \sum_{i=1}^{n-1} \sigma_i \Phi(d_i^\star) - \Phi(d_n^\star) = \sup_{a \in A} \left[ \frac{1}{n} \sum_{i=1}^{n-1} \sigma_i \Phi(a_i) - \Phi(a_n) \right] .$$

Since $\sigma_n$ has symmetric distribution in the set $(-1 , 1)$, we conclude that

$$ \mathbb{E_{\mu}}\sup_{a \in A} \left[ \frac{1}{n} \sum_{i=1}^{n-1} \sigma_i \Phi(a_i) + \sigma_n \Phi(a_n) \right] = \frac{1}{2} \sup_{a \in A} \left[ \frac{1}{n} \sum_{i=1}^{n-1} \sigma_i \Phi(a_i) + \Phi(a_n) \right] + \frac{1}{2} \sup_{a \in A} \left[ \frac{1}{n} \sum_{i=1}^{n-1} \sigma_i \Phi(a_i) - \Phi(a_n) \right] = $$

$$ \frac{1}{2} \frac{1}{n} \sum_{i=1}^{n-1} \sigma_i \Phi(c_i^\star) + \Phi(c_n^\star) + \frac{1}{2} \frac{1}{n} \sum_{i=1}^{n-1} \sigma_i \Phi(d_i^\star) - \Phi(d_n^\star) = \frac{1}{2n} \left[ \sum_{i=1}^{n-1} \sigma_i \Phi(c_i^\star) + \sum_{i=1}^{n-1} \sigma_i \Phi(d_i^\star) + \Phi(c_n^\star) - \Phi(d_n^\star) \right] . $$ Next, we take $s=sgn(c_n^\star - d_n^\star )$ in which $sgn$ represents the signal function. With this, we have to

$$ \mathbb{E_{\mu}}\sup_{a \in A} \left[ \frac{1}{n} \sum_{i=1}^{n-1} \sigma_i \Phi(a_i) + \sigma_n \Phi(a_n) \right] \leq \frac{1}{2n} \left[ \sum_{i=1}^{n-1} \sigma_i \Phi(c_i^\star) + \sum_{i=1}^{n-1} \sigma_i \Phi(d_i^\star) + \mid \Phi(c_n^\star) - \Phi(d_n^\star) \mid \right] \leq $$

$$ \frac{1}{2n} \left[ \sum_{i=1}^{n-1} \sigma_i \Phi(c_i^\star) + \sum_{i=1}^{n-1} \sigma_i \Phi(d_i^\star) + C \mid c_n^\star - d_n^\star \mid \right] = \frac{1}{2n} \left[ \sum_{i=1}^{n-1} \sigma_i \Phi(c_i^\star) + \sum_{i=1}^{n-1} \sigma_i \Phi(d_i^\star) + s C \left( c_n^\star - d_n^\star \right) \right] =$$

$$ \frac{1}{2n} \left[ \sum_{i=1}^{n-1} \sigma_i \Phi(c_i^\star) + s C c_n^\star \right] + \frac{1}{2n} \left[ \sum_{i=1}^{n-1} \sigma_i \Phi(d_i^\star) - s C d_n^\star \right] \leq $$

$$\frac{1}{n} \left( \frac{1}{2} \sup_{a \in A} \left[ \sum_{i=1}^{n-1} \sigma_i \Phi(a_i) + s C a_n \right] + \frac{1}{2} \sup_{a \in A} \left[ \sum_{i=1}^{n-1} \sigma_i \Phi(a_i) - s C a_n \right]\right) = $$

$$ \mathbb{E_{\mu}} \sup_{a \in A} \left[ \sum_{i=1}^{n-1} \sigma_i \Phi(a_i) + C \sigma_n a_n \right] ,$$

in which $C$ is the Lipschitz constant of the function $\Phi$. Proceed in the same way for all $i <m$, we obtain the principle of Ledoux and Talagrand contraction.

This result is crucial so that we can connect the Rademacher complexity with the Vapnik and Chervonenkis dimensions.

Vapnik and Chervonenkis Dimension

In the binary classification problem evaluated in the Rademacher Complexity section, every function $f \in \mathcal{W}$ is the indicator of some set of the form $( (x,y) \in \mathbb{O}: y \neq h(x))$ with $h\in \mathcal{H}$. The class projection $\mathcal{W}$ at the point ${\bf o}_n$ is given by

Screenshot_15

From Massart’s inequality, we obtain that

$$ \hat{\mathcal{R_n}} (\mathcal{W} ({\bf o_n} ) ) = \mathbb{E_{\sigma}} \sup_{a \in \mathcal{W} ({\bf o_n} )} \frac{1}{n} \sum_{i=1}^n \sigma_i a_i \leq \sqrt{ \frac{2 \ln (Card(\mathcal{W} ({\bf o_n} )))}{n}}, ~ {\bf o_n} \in \mathbb{O}^n, $$

because $r \leq \sqrt{n}$. Therefore, we need to study the Cardinality of the set $\mathcal{W} ({\bf o_n} )$. Now, the set $\mathcal{W} ({\bf o_n} )$ depends on the risk function $\ell$, from the process input $X$ and the exit $Y$. In the case of binary classification, in which we use the probability of classification error as a risk function, we have the following simplification

$$ \hat{\mathcal{R_n}} (\mathcal{W} ({\bf o_n} ) ) = \hat{\mathcal{R_n}} ( {\bf o_n} , \mathcal{H} ) = \mathbb{E_{\mu^n }} \sup_{h \in \mathcal{H}} \frac{1}{n} \sum_{i=1}^n \sigma_i \ell (o_i , h) ) = $$

Screenshot_19

$$ \mathbb{E_{\mu^n }} \sup_{h \in \mathcal{H}} \frac{1}{n} \sum_{i=1}^n \sigma_i \mid h(x_i) - y_i\mid = \mathbb{E_{\mu^n }} \sup_{h \in \mathcal{H}} \frac{1}{n} \sum_{i=1}^n \sigma_i \left( h(x_i) (1-2y_i) + y_i \right) = $$

$$ \mathbb{E_{\mu^n }} \sup_{h \in \mathcal{H}} \frac{1}{n} \sum_{i=1}^n \sigma_i h(x_i)) , $$

for everyone $ {\bf o_n} = (o_1, \cdots , o_n)\in \mathbb{O}^n$, because we know that $\mid a - b \mid = a(1-2b) + b $ for everyone $a,b \in (0,1)$, $(1-2y_i)\sigma_i$ also has a Rademacher and $\sigma_i y_i$ has zero expected value. With this, we show that the Rademacher complexity depends only on the process input ${\bf x}_n=(x_1, \cdots , x_n)$ composite with the admissible predictor $h$ .

Screenshot_20

$$\mathcal{H} ({\bf x_n}):=( (h(x_1), \cdots , h(x_n)), h \in \mathcal{H} ) \quad \text{e} \quad \hat{\mathcal{R_n}} (\mathcal{H} ({\bf x_n}) ) := \mathbb{E_{\sigma}} \sup_{a \in \mathcal{H} ({\bf x_n})} \frac{1}{n} \sum_{i=1}^n \sigma_i a_i.$$

Therefore, when we apply the Massart inequality, we conclude that

$$ \hat{\mathcal{R_n}} (\mathcal{W} ({\bf o_n} ) ) = \hat{\mathcal{R_n}} (\mathcal{H} ({\bf x}_n) ) \leq \sqrt{ \frac{2 \ln (Card(\mathcal{H} ({\bf x}_n)))}{n}}, ~ {\bf o_n} \in \mathbb{O}^n, ~ ~ (\text{Desigualdade 1}) $$

In this way, from inequality 14 in the “Rademacher Complexity” section and inequality 1, we obtain that

$$ \sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| \leq 2 \sqrt{ \frac{2 \ln (Card(\mathcal{H} ({\bf x}_n )))}{n}} + 3 \sqrt{\frac{\ln (2/ \delta)}{2n}}, ~ {\bf o_n} \in \hat{G}, ~ ~ (\text{Desigualdade 2}). $$ With Rademacher complexity, we summarize the PAC learning problem in the question of evaluating how the size of the class of predictors composed with the input data increases as a function of the sample size. We say that the subset ${\bf x}_n =(x_1, \cdots , x_n) \subset \chi$ is partitioned by $\mathcal{H}$ if the cardinality of $\mathcal{H} ({\bf x}_n)$ is equal to $2^{n}$. In this condition, we have to $\mathcal{H} ({\bf x}_n) = (0,1)^n$. Obviously if ${\bf x}_n$ is partitioned by $\mathcal{H}$, then any subset of ${\bf x}_n$ is also partitioned.

Definition 1: Vapnik and Chervonenkis Dimension

Be $\mathcal{H}$ a class of admissible predictors. The VC-dim of the class $\mathcal{H}$ of admissible predictors is given by

$$VC-dim (\mathcal{H}) = max (n : {\bf x}_n ~ \text{é particionado por} ~ \mathcal{H}, ~ \text{para todo} ~ {\bf x}_n \subset \chi^n).$$

To illustrate, we calculate the Vapnik–Chervonenkis dimension for some usual classes of admissible predictors.

Example 1

Screenshot_13

Example 2

Screenshot_14

Motto 1: Vapnik’s motto - Chervonenkis - Sauer - Shelah

Be $\mathcal{H}$ a class of predictors with $VC-dim(\mathcal{H})=d<\infty$. So for everyone $n$, $\tau_\mathcal{H}(n)\leq \sum_{i=0}^d\binom{n}{i} = (n+1)^d$. In particular, if $n>d$ then $\tau_{\mathcal{H}}(n)\leq \left(\frac{en}{d}\right)^d$

Proof

For $n\leq d$, it trivially follows that $\tau_\mathcal{H}(n)\leq \sum_{i=0}^d\binom{n}{i}$ since in this case $\sum_{i=0}^d\binom{n}{i}=2^n$. With $n> d$ and the set $S=(x_1,\dots,x_n)\subset \chi$ fixed, we define $$\mathcal{B}=\left((x_i\in S:f(x_i)=1), ~i=1, \cdots n :f\in \mathcal{H}\right).$$ So, we have to $Card(\mathcal{B})\leq \sum_{i=0}^d\binom{n}{i}$, since $VC-dim(\mathcal{H})=d$. Now, how $S$ is arbitrary, we have to

$$\tau_\mathcal{H}(n) \leq Card(\mathcal{B})\leq \sum_{i=0}^d\binom{n}{i} .$$

Now, notice that for $0\leq i\leq d$ and $n\geq d$, we have to

$$\frac{(n/d)^d}{(d/n)^i}\geq 1$$

Therefore,

$$\sum_{i=0}^d\binom{n}{i}\leq (n/d)^d\sum_{i=0}^d\binom{n}{i}(d/n)^i$$

$$\leq (n/d)^d(1+(d/n))^n$$

$$\leq \left(\frac{ e n}{d}\right)^d$$

in which the last inequality arises from Euler’s inequality. Follow the motto.

This result shows us that the number of labeling induced by a sample grows polynomially in $n$, if the Vapnik and Chervonenkis dimension of the class of admissible predictors is finite. From Lemma 1, we conclude that

$$ \ln ( Card(\mathcal{H} ({\bf x}_n))) \leq d \ln(n+1), $$ in which $VC-dim(\mathcal{H})=d<\infty$. Thus, as a consequence of inequality 2, we obtain that

$$ \sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| \leq \sqrt{ \frac{16 d \ln(n+1) }{2n}} + \sqrt{\frac{9 \ln (2/ \delta)}{2n}}, ~ {\bf o_n} \in \hat{G}, ~ ~ (\text{Desigualdade 3}), $$ in which $\mathbb{P}^n (\hat{G}) \geq 1 - \delta$ with $0 \leq \delta \leq 1/2$. We know that for $a,b$ non-negative constants $\sqrt{a} + \sqrt{b} \leq 2 \sqrt{a+b} $. With this, we have to

$$ \sup_{h \in \mathcal{H}} \big| L_E ({\bf o_n} , h) - L(\mathbb{P} , h) \big| \leq 2 \sqrt{\frac{16 d \ln(n+1) + 9 \ln (2/ \delta )}{2n}}, ~ {\bf o_n} \in \hat{G}. $$ With this, we obtain the Vapnik and Chervonenkis theorem.

Theorem 1: Vapnik and Chervonenkis Theorem

Screenshot_18

Corollary 1

Assume that the class of admissible predictors $\mathcal{H}$ satisfy $VC-dim(\mathcal{H})=d<\infty$. So, the strategy $A_E$ obtained by the principle of empirical risk minimization is PAC.

Theorem 2

Be $V$ a vector subspace of the space $\mathbb{R}^\chi$ of all real functions over the domain $\chi$. A $VC-dim$ of the class of predictors $\mathcal{H}$ such that $h_f\in \mathcal{H}$ such that

Screenshot_16

Proof

Screenshot_17

Algorithms based on Cost function

From the Vapnik and Chervonenkis Theorem we have to minimize the empirical risk function with respect to a class $\mathcal{H}$ of admissible predictors with a CV dimension much smaller than the sample size. By requiring a low VC dimension, we impose serious limitations regarding the approximation property of the class of admissible predictors. Furthermore, we also have a numerical problem. In the binary classification problem we want to minimize the empirical classification error, which is generally quite complicated from a computational point of view. Even in very simple cases the problem can have NP difficulty.

One of the ways to get around these two problems is to modify the empirical risk function by introducing a cost function. Consider the admissible predictors in the form

Screenshot_21

$$ L(\mathbb{P} , h_f) \leq C(f, \mathbb{P}) = C(f, \mathbb{P}) + C_E ({\bf o}_n , f) - C_E ({\bf o}_n , f) \leq $$

$$ C_E ({\bf o_n} , f) + \sup_{f \in \mathcal{F}} \mid C(f, \mathbb{P}) - C_E ({\bf o_n} , f) \mid ~ ~ (\text{Desigualdade 1}) .$$

For every dataset ${\bf o_n} =((x_1, y_1) , \cdots (x_n , y_n)) \in \mathbb{O}^n$, we denote by

$$\mathcal{C_{\mathcal{F}}}({\bf o_n}) := ( (-(2y_1 - 1) f(x_1) , \cdots , -(2y_n - 1)f(x_n)) : f \in \mathcal{F} ).$$

Class-related Rademacher complexity $\mathcal{H_{\mathcal{F}}}({\bf o_n})$ is given by

$$ \hat{\mathcal{R_n}} (\psi \circ \mathcal{C_{\mathcal{F}}}({\bf o_n})) = \mathbb{E_{\mu^n}} \sup_{f \in \mathcal{F}} \frac{1}{n} \sum_{i=1}^n \sigma_i \psi(-(2y_n - 1)f(x_n)) = \mathbb{E_{\mu^n}} \sup_{a \in \psi \circ \mathcal{C_{\mathcal{F}}}({\bf o_n})} \frac{1}{n} \sum_{i=1}^n \sigma_i a_i ,$$

in which $\psi \circ \mathcal{C_{\mathcal{F}}}({\bf o_n}) = ( (\psi(a_1), \cdots , \psi(a_n)): (a_1, \cdots , a_n) \in \mathcal{C_{\mathcal{F}}}({\bf o_n}) ) $ . For all $0 \leq \delta \leq 1/2$, we obtain from Rademacher’s complexity theorem that there exists a set $\hat{G} \in \beta(\mathbb{O}^n)$ with $\mathbb{P}(\hat{G}) > 1-\delta$ satisfying

$$ \sup_{f \in \mathcal{F}} \mid C(f, \mathbb{P}) - C_E ({\bf o_n} , f) \mid \leq 2 \hat{\mathcal{R_n}} (\psi \circ \mathcal{C_{\mathcal{F}}}({\bf o_n})) + 3 B \sqrt{\frac{\ln(2/\delta)}{2n} }, \quad {\bf o_n} \in \hat{G} ~ ~ (\text{Desigualdade 2}),$$

in which we assume that $$\sup_{ ( (x,y) \in \mathbb{O}) } \psi(-(2y - 1) f(x)) \leq B, $$ with $B$ a positive constant.

Theorem 1

Consider $\psi$ a Lipschitz function with constant $L_{\psi}$. So, we have to $$L(\mathbb{P} , h_f) \leq C_E({\bf o_n} , f ) + 2L_{\psi} \mathbb{E_{\mu^n}} \sup_{f \in \mathcal{F}} \frac{1}{n} \sum_{i=1}^n \sigma_if(x_i) + 3 B \sqrt{\frac{\ln(2/\delta)}{2n} }, \quad {\bf o_n} \in \hat{G}.$$

Proof

As a consequence of inequalities (1) and (2) and the Ledoux and Talagrand contraction theorem, we obtain that $$ L(\mathbb{P} , h_f) \leq C_E({\bf o_n} , f ) + 2L_{\psi} \hat{\mathcal{R_n}} (\mathcal{C_{\mathcal{F}}}({\bf o_n})) + 3 B \sqrt{\frac{\ln(2/\delta)}{2n} }. $$ Now, the Rademacher complexity is given by

$$ \hat{\mathcal{R_n}} (\mathcal{C_{\mathcal{F}}}({\bf o_n})) = \mathbb{E_{\mu^n}} \sup_{f \in \mathcal{F}} \frac{1}{n} \sum_{i=1}^n \sigma_i \left( -(2y_n - 1)f(x_i) \right) = \mathbb{E_{\mu^n}} \sup_{f \in \mathcal{F}} \frac{1}{n} \sum_{i=1}^n (-\sigma_i) (2y_n - 1)f(x_i) = $$

$$ \mathbb{E_{\mu^n}} \sup_{f \in \mathcal{F}} \frac{1}{n} \sum_{i=1}^n \sigma_i (2y_n - 1)f(x_i) = \mathbb{E_{\mu^n}} \sup_{f \in \mathcal{F}} \frac{1}{n} \sum_{i=1}^n \sigma_if(x_i), $$

because the distribution of $\sigma_i$ is symmetric in the set $(-1,1)$. Follow the theorem.

From Theorem 1, we know that the Rademacher complexity of a class of real functions $\mathcal{F}$ limits the performance of admissible predictors $\mathcal{H_{\mathcal{F}}}$.

Classes of Linear Predictors

In this module, we will address the case of linear predictors in binary classification problems. Consider the admissible predictors in the form

Screenshot_22

From Rademacher’s complexity theorem (Theorem 1), we know that

$$L(\mathbb{P} , h_f) \leq C_E({\bf o_n} , f ) + 2L_{\psi} \mathbb{E_{\mu^n}} \sup_{f \in \mathcal{F}} \frac{1}{n} \sum_{i=1}^n \sigma_if(x_i) + 3 B \sqrt{\frac{\ln(2/\delta)}{2n} }, \quad {\bf o_n} \in \hat{G}$$

in which $\hat{G} \in \beta (\mathbb{O}^n)$ with $\mathbb{P}^n(\hat{G}) \geq 1 - \delta$. Thus, we limit the behavior of admissible predictors by the Rademacher complexity of a class of functions $\mathcal{F}$. Next, we will study the Rademacher complexity of the class of linear functions. Initially, we will study the finite dimensional case. For all $p \geq 1$, we define

$$B^d_p = ( a \in \mathbb{R}^d : \parallel a \parallel_p \leq 1 ),$$

the unit ball in $\mathbb{R}^d$ with respect to the standard of order $p$. We know that for two pairs $1 \leq p,q \leq \infty$ conjugates $\frac{1}{p} + \frac{1}{q}=1$, we have to

$$ \parallel a \parallel_p = \sup_{b \in B^d_q} \mid \langle a , b \rangle \mid . $$ As a consequence of Holder’s inequality, we have

$$ \langle a , b \rangle \leq \parallel a \parallel_p ~ \parallel b \parallel_q , ~ ~ a \in B^d_p , ~ ~ b \in B^d_q. $$

Consider $\chi = B^d_2$ the unit ball with inner product $ \langle \cdot , \cdot \rangle_{\chi}$. We say that a function is linear if $f(x)$ is linear in $x$. The class $\mathcal{F}$ consists of all linear functions over $\chi$ with values $\mathbb{R}$. In the finite dimensional case, we can also interpret $f$ as a vector in $B^d_2$ in such a way that $f(x)=\langle f , x \rangle_{\chi}$. Thus, for any input data ${\bf x}_n \in \chi^n$, we have to

$$\mathbb{E_{\mu^n}} \sup_{f \in \mathcal{F}} \frac{1}{n} \sum_{t=1}^n \sigma_t f(x_t) = \mathbb{E_{\mu^\infty}} \sup_{f \in \mathcal{F}} \left[ \frac{1}{n} \sum_{t=1}^n \sigma_t \langle f , x_t \rangle_\chi \right] = \mathbb{E_{\mu^\infty}} \sup_{f \in \mathcal{F}} \langle f , \frac{1}{n} \sum_{t=1}^n \sigma_t x_t) \rangle_\chi = \mathbb{E_{\mu^\infty}} \parallel \frac{1}{n} \sum_{t=1}^n \sigma_t x_t \parallel_2, $$

because $f \in \mathcal{F}$ is a linear function. Thus, we can interpret Rademacher complexity as the norm in $B^d_2$ of the random floor defined by $\sigma_t x_t$ normalized by $n$. As a consequence, we obtain the Kahane and Khintchine inequality

$$ \mathbb{E_{\mu^\infty}} \parallel \sum_{t=1}^n \sigma_t a_t \parallel_2 \leq \left( \mathbb{E_{\mu^\infty}} \parallel \sum_{t=1}^n \sigma_t x_t \parallel_2^2 \right)^{1/2} = $$

$$ \left( \mathbb{E_{\mu^\infty}} \sum_{t,s=1}^n \langle \sigma_t x_t , \sigma_s x_s \rangle \right)^{1/2} = \left( \sum_{t=1}^n \mathbb{E_{\mu^\infty}} \parallel x_t \parallel_2^2 \right)^{1/2} \leq \sqrt{n} . $$

Thus, we obtain that

$$\mathbb{E_{\mu^n}} \sup_{f \in \mathcal{F}} \frac{1}{n} \sum_{t=1}^n \sigma_t f(x_t) \leq \frac{1}{\sqrt{n}}. $$

By using the Kahane and Khintchine inequality we can also obtain a lower bound, in the form

$$\mathbb{E_{\mu^n}} \sup_{f \in \mathcal{F}} \frac{1}{n} \sum_{t=1}^n \sigma_t f(x_t) \geq \frac{1}{2 \sqrt{n}}. $$

In a similar way we can extend this property to Hilbert spaces. Be $\chi$ a separable Hilbert space with inner product $\langle \cdot , \cdot \rangle_\chi$. We denote by $\chi^\star$ the space of all linear functionals over $\chi$ (topological dual). By the Riesz representation theorem we know that for every $f \in \chi^\star$ exists $x^f \in \chi$ such that

$$f(x) = \langle x , x^f \rangle_\chi , \quad x \in \chi.$$

In this way, we identify the topological dual of Hilbert space $\chi$ with Hilbert space itself via the inner product. Typically, the dual norm is given by

$$ \parallel f \parallel_{\chi^\star} = \sup_{x \in \chi} \mid f(x) \mid = \sup_{x \in \chi} \mid \langle x , x^f \rangle_\chi \mid, \quad f \in \chi^\star .$$

Here we take the class of functions $\mathcal{F} = \chi^\star$. When we apply the same arguments as for the unit ball $B^d_2$, we conclude that

$$ \frac{1}{2 \sqrt{n}} \leq \mathbb{E_{\mu^n}} \sup_{f \in \mathcal{F}} \frac{1}{n} \sum_{t=1}^n \sigma_t f(x_t) \leq \frac{1}{\sqrt{n}}. $$

Next, we will extend the theory of classes of linear predictors to Banach spaces. Here, we will use results on convex analysis in Banach spaces presented in the book:

  • J. Peypouquet (2014) - Convex Optimization in Normed Spaces. Springer.

Consider $\chi$ the unitary ball in a separable and reflective Banach space with norm $\parallel \cdot \parallel$. The topological dual of Banach space $\chi$, defined as the space of linear functionals over $\chi$, will be denoted by $\chi^\star$ with dual norm

$$ \parallel f \parallel_{\star} =\sup_{x \in \chi} \mid \langle f , x \rangle \mid,$$

in which $\langle \cdot , \cdot \rangle : \chi^\star \times \chi \rightarrow \mathbb{R}$ a bilinear function such that $\langle f , x \rangle = f(x)$ for every linear functional $f \in \chi^\star$ and every point $x \in \chi$. Be $\Psi^\star$ a strong function $\theta$-convex with respect to the norm $\parallel \cdot \parallel_{\star}$, that is, for all linear functionals $f,g \in \chi^\star$ we have to

$$ \Psi^\star(f) \geq \Psi^\star(g) + \langle f-g , \nabla \Psi^\star (g) \rangle + \frac{\theta}{2} \parallel f-g \parallel_{\star}^2 ,$$

in which $\theta$ is a positive constant and $\nabla : \chi^{\star \star} \rightarrow \mathbb{R}$ is the linear functional given by the Gâteaux derivative, in which $\chi^{\star \star} $ is the topological dual of $\chi^\star$ (see, Peypouquet (2014), Theorem 3.12, pg 39). How $\chi$ is reflective, we know that $\chi^{\star \star} = \chi$.On the other hand, the convex Fenchel conjugate of the function $\Psi^\star$ is given by

$$ \Psi(x) = \sup_{f \in \mathcal{F}} \left( \langle f , x \rangle - \Psi^\star (h) \right), $$

that satisfies the conjugate property. For all $x , x^\prime \in \chi$, we have to

$$ \Psi(x) \leq \Psi(x^\prime) + \langle \nabla \Psi (x^\prime) , x - x^\prime \rangle + \frac{1}{2 \theta} \parallel x - x^\prime \parallel ^2 ~ ~ (\text{Desigualdade 1}) .$$

Be $M^2 = \sup_{h \in \mathcal{H}} \Psi^\star (h)$. Through the definition of conjugate convex above, we obtain that for all $\lambda > 0$,

$$ \mathbb{E_{\mu^n}} \sup_{f \in \mathcal{F}} \frac{1}{n} \sum_{t=1}^n \sigma_t f(x_t) = \frac{\lambda}{\lambda} \mathbb{E_{\mu^\infty}} \sup_{f \in \mathcal{F}} \left[ \frac{1}{n} \sum_{t=1}^n \sigma_t \langle f , x_t \rangle \right] = \frac{1}{\lambda} \mathbb{E_{\mu^\infty}} \sup_{f \in \mathcal{F}} \langle f , \frac{\lambda}{n} \sum_{t=1}^n \sigma_t x_t) \rangle \leq $$

$$ \frac{1}{\lambda} \left[ \sup_{f \in \mathcal{F}} \Psi^\star (f) + \mathbb{E_{\mu^\infty}} \Psi \left( \frac{\lambda}{n} \sum_{t=1}^n \sigma_t x_t \right) \right]. $$

When we denote by

$$Z_k = \frac{\lambda}{n} \sum_{t=1}^k \sigma_t x_t , \quad k=1, \cdots , n,$$

we conclude from inequality 1 that the expected value of the above expression is given by

$$ \mathbb{E_{\mu^\infty}} \Psi \left( Z_n \right) \leq \mathbb{E_{\mu^\infty}} \left[ \Psi \left( Z_{n-1} \right) + \langle \nabla \Psi (Z_{n-1}) , \frac{\lambda}{n} \sigma_n x_n \rangle + \frac{1}{2 \theta} \parallel \frac{\lambda}{n} x_n \parallel^2 \right]. $$

Now, we have to

$$ \mathbb{E_{\mu^\infty}} \langle \nabla \Psi (Z_{n-1}) , \frac{\lambda}{n} \sigma_n x_n \rangle = 0 \quad \text{e} \quad \mathbb{E_{\mu^\infty}} \frac{1}{2 \theta} \parallel \frac{\lambda}{n} x_n \parallel^2 \leq \frac{\lambda^2}{2 \theta n^2} ,$$

because $x_n$ belongs to the unit ball of a Banach space $(\chi)$. In this way, we conclude that

$$\mathbb{E_{\mu^n}} \sup_{f \in \mathcal{F}} \frac{1}{n} \sum_{t=1}^n \sigma_t f(x_t) \leq \frac{M^2}{\lambda} + \frac{\lambda}{2 \theta n} = M \sqrt{\frac{2}{\theta n}}, $$

in which $\lambda = M \sqrt{2 \theta n}$.

Core Method - SVM

The class of linear predictors are attractive both from an algorithmic and theoretical point of view. However, the fact that the predictors are linear may generate some distrust regarding the representativeness of the class. The core technique aims to alleviate this problem. The idea consists of transporting the input data to a larger or infinite dimensional space called “feature space” and then using linear predictors. To illustrate, consider the two-dimensional problem treated in Figure 1.

Figure 1:

index3

Screenshot_26

As we said, the advantage of using kernel as a similarity measure is that we can use linear predictors in infinite dimensional Hilbert spaces. As an example, consider the following algorithm. The idea is to calculate the averages of the two classes in the “feature space” $D$, $$c^{+} = \frac{1}{n^+} \sum_{( i: y_i=1 )} \phi(x_i) \quad \text{e} \quad c^{n} = \frac{1}{n^-} \sum_{( i: y_i=0 )} \phi(x_i),$$ in which $n^+$ is the total of data with positive labels and $n^-$ is the total of data with negative labels. To a new point $x \in \chi$, we choose the label whose mean is “closest” to $\phi(x)$, which leads us to the predictor

Screenshot_25

in which

$$ b = \frac{1}{2} \left(\frac{1}{(n^-)^2} \sum_{{i:y_i=0 }} \langle \phi(x) , \phi(x_i) \rangle_D - \frac{1}{(n^+)^2} \sum_{{i:y_i=1 }} \langle \phi(x) , \phi(x_i) \rangle_D \right)$$

$$ = \frac{1}{2} \left(\frac{1}{(n^-)^2} \sum_{{i:y_i=0 }} \mathcal{K}(x , x_i) - \frac{1}{(n^+)^2} \sum_{{i:y_i=1 }} \mathcal{K}(x , x_i) \right) . $$

Screenshot_27

Next, we will use the RKHS construction process presented in the RKHS Construction module. Consider a kernel function $\mathcal{K} : \chi \times \chi \rightarrow \mathbb{R}$, that is, a symmetric function satisfying

$$ \sum_{i=1}^n \sum_{j=1}^n \alpha_i \alpha_j \mathcal{K} (x_i , x_j) \geq 0 , $$

for any choice of $n \geq 1$, $\alpha_1 , \cdots \alpha_n \in \mathbb{R}$ and $x_1, \cdots , x_n \in \chi$. The similarity function $\mathcal{K}$ naturally gives us a function space in the form

$$ \mathcal{F} = \left( f(\cdot) = \sum_{i=1}^n \alpha_i \mathcal{K} (x_i , \cdot): ~ \sum_{i=1}^n \sum_{j=1}^n \alpha_i \alpha_j \mathcal{K} (x_i , x_j) \leq M^2, ~ n \in \mathbb{N}, ~ \alpha_i \in \mathbb{R}, ~ x_i \in \chi \right). $$

In a simple way, we define the following inner product over the class of linear functions $\mathcal{F}$, $$ \langle \sum_{i=1}^n \alpha_i \mathcal{K} (x_i , \cdot) , \sum_{j=1}^m \beta_j \mathcal{K} (x_j , \cdot) \rangle = \sum_{i=1}^n \alpha_i \beta_j \mathcal{K} (x_i , x_j) .$$ From the inner product $\langle \cdot , \cdot \rangle$ we can complete $\mathcal{F}$ to obtain a Hilbert space $\bar{\mathcal{F}}$, which is called **Reproducing Kernel Hilbert Space** (RKHS). An important property of RKHS is that for every function $f \in \bar{\mathcal{F}}$ we have to

$$f(x) = \langle f , \mathcal{K} (\cdot , x) \rangle_{\bar{\mathcal{F}}}, \quad x \in \chi .$$

Screenshot_24

An important issue in kernel-related algorithms is the introduction of a function that measures the complexity of the function $f \in \bar{\mathcal{F}}$. In general, regularizing the standard of $f$ It is useful for overcoming computational problems. In this sense, we introduce the following optimization problem $$ \min_{f \in \bar{\mathcal{F}}} \left( C_E({\bf o_n} , f ) + R(\parallel f \parallel) \right) ~ ~ ( \text{Equação 1}),$$ in which $R: [0, \infty) \rightarrow \mathbb{R}$ is a non-decreasing function. Typical choice for $R$ is given by $R(a) = \lambda a^2$ with $\lambda$ a positive constant. The following theorem guarantees us that the solution to the Minimization problem above (Equation 1) belongs to the span of the set $(\mathcal{K}(\cdot , x_1) , \cdots , \mathcal{K}( \cdot , x_n) )$.

Theorem 1: Representation Theorem

Suppose there is a solution to the minimization problem presented in equation 1. Then, there is a vector $(\alpha_1^\star, \cdots , \alpha_n^\star) \in \mathbb{R}^n$ such that $$f^\star (\cdot) = \sum_{i=1}^n \alpha_i^\star \mathcal{K}(\cdot , x_i) $$ is an optimal solution to the minimization problem presented in Equation 1.

Proof

Be $g^\star$ a solution to the minimization problem given in equation 1. How $g^\star$ belongs to Hilbert space $\bar{\mathcal{F}}$, we can write $g^\star$ in the form $$g^\star (\cdot)= \sum_{i=1}^n \alpha_i^\star \mathcal{K}(\cdot , x_i) + g (\cdot),$$ in which $\langle g , \mathcal{K}(\cdot , x_i) \rangle = 0$ for everyone $i=1, \cdots , n$. It is $f^\star=g^\star - g$. Obviously, we have to $\parallel g^\star \parallel^2 = \parallel g \parallel^2 + \parallel f^\star \parallel^2$. Therefore, we conclude that $\parallel f^\star \parallel \leq \parallel g^\star \parallel $. Since $R$ is a non-decreasing function, we obtain that $R(\parallel f^\star \parallel) \leq R (\parallel g^\star \parallel)$. Furthermore, for all $i=1, \cdots , n$, we have to

$$ \langle f^\star , \mathcal{K}(\cdot , x_i) \rangle = \langle g^\star - g , \mathcal{K}(\cdot , x_i) \rangle = \langle g^\star , \mathcal{K}(\cdot , x_i) \rangle .$$

In this way, we conclude that

$$C_E ({\bf o_n} , f^\star) = \frac{1}{n} \sum_{i=1}^n \psi(- \langle f^\star , \mathcal{K} (\cdot , x_i) \rangle (2y_i-1)) = \frac{1}{n} \sum_{i=1}^n \psi(- \langle g^\star , \mathcal{K} (\cdot , x_i) \rangle (2y_i-1)) = C_E ({\bf o_n} , g^\star) .$$

With this, we conclude that the objective function of equation 1 at the point $f^\star$ cannot be greater than the objective function at the point $g^\star$ and therefore $f^\star$ is also a great solution. The representation theorem follows.

From the representation theorem, we know that

$$\inf_{f \in \bar{\mathcal{F}}} \left( C_E({\bf o_n} , f ) + R(\parallel f \parallel) \right) = \inf_{f \in \mathcal{F}} \left( C_E({\bf o_n} , f ) + R(\parallel f \parallel) \right) .$$

So we can focus on the class $\mathcal{F}$ of linear functionals, in which

$$L(\mathbb{P} , h_f) \leq C_E({\bf o_n} , f ) + 2L_{\psi} \mathbb{E_{\mu^n}} \sup_{f \in \mathcal{F}} \frac{1}{n} \sum_{i=1}^n \sigma_if(x_i) + 3 B \sqrt{\frac{\ln(2/\delta)}{2n} }, \quad {\bf o_n} \in \hat{G},$$

Screenshot_23

Theorem 2

We have to

$$L(\mathbb{P} , A_C ({\bf o_n})) \leq C_E({\bf o_n} , f_C ({\bf o_n} ) + 2L_{\psi} \frac{M}{n} \sqrt{ \sum_{i=1}^n \mathcal{K}(x_i , x_i) } + 3 B \sqrt{\frac{\ln(2/\delta)}{2n} }, \quad {\bf o_n} \in \hat{G},$$

in which $\mathbb{P}(\hat{G}) > 1 - \delta$ with $0 < \delta < 1/2$.

The minimization problem proposed in equation 2 can be written in the following form

$$ \min_{ ( (\alpha_1 , \cdots , \alpha_n) \in \mathbb{R}^n )} \left( \frac{1}{n} \sum_{i=1}^n \psi(- \langle \sum_{j=1}^n \alpha_j \mathcal{K}(x_j , \cdot) , \mathcal{K} (\cdot , x_i) \rangle (2y_i-1)) + R \left( \sqrt{ \sum_{i=1}^n \sum_{j=1}^n \alpha_i \alpha_j \mathcal{K} (x_i , x_j)} \right) \right) =$$

$$ \min_{ ( (\alpha_1 , \cdots , \alpha_n) \in \mathbb{R}^n )} \left( \frac{1}{n} \sum_{i=1}^n \psi(- (2y_i-1) \sum_{j=1}^n \alpha_j \mathcal{K}(x_j , x_i) ) + R \left( \sqrt{ \sum_{i=1}^n \sum_{j=1}^n \alpha_i \alpha_j \mathcal{K} (x_i , x_j)} \right) \right) ~ ~ (\text{Equação 3}) .$$

To solve the minimization problem proposed in equation 3, we do not need to directly access the elements in the “Feature Space”. The only thing we need to calculate are the inner products in the Feature space, which can be calculated using the kernel function. Therefore, to solve equation 3 we need to know the matrix Gram $G$ in which the elements are given by $G(i,j) = \mathcal{K} (x_i , x_j)$. Once we learn the coefficients $(\alpha_1^\star, \cdots , \alpha_n^\star)$ With equation 3, we can calculate the prediction of a new entry by

Screenshot_28

Example 1: Polynomial Nucleus

The order polynomial nucleus $k$ is given by

$$ \mathcal{K}(x , x^\prime) := \left( 1 + \langle x , x^\prime \rangle \right)^k .$$

Next, we will check that $\mathcal{K}$ It’s really a core. To do this, we will show that there is a function $\phi$ in domain space such that $\mathcal{K}(x , x^\prime) = \langle \phi(x) , \phi(x^\prime) \rangle$. For simplicity, we denote $x_0 = x^\prime_0 =1$. So, we have to

$$\mathcal{K} (x , x^\prime) = \left( 1 + \langle x , x^\prime \rangle \right) \cdots \left( 1 + \langle x , x^\prime \rangle \right) = \left( \sum_{j=0}^n x_j x_j^\prime \right) \cdots \left( \sum_{j=0}^n x_j x_j^\prime \right) =$$

$$ \sum_{J \in (0,1,2 \cdots )^k} \prod_{i=1}^k x_{J_i} x_{J_i}^\prime = \sum_{J \in (0,1,2 \cdots )^k} \prod_{i=1}^k x_{J_i} \prod_{i=1}^k x_{J_i}^\prime .$$

With this, we define a function $\phi: \mathbb{R} \rightarrow \mathbb{R}^{(n+1)^k}$ such that for all $J \in (0,1, 2, \cdots n)^k$ there is an element of $\phi(x)$ which is equal to $\prod_{i=1}^k x_{J_i}$. In this way, we obtain that

$$ \mathcal{K}(x , x^\prime) = \left( 1 + \langle x , x^\prime \rangle \right)^k = \langle \phi(x) , \phi(x^\prime) \rangle .$$

Example 2: Gaussian Nucleus

Initially, suppose that the domain space is given by the straight line $\mathbb{R}$. Consider the function

$$\phi(x) := \frac{x^n}{\sqrt{n !}} e^{- \frac{x^2}{2} } , \quad x \in \mathbb{R}. $$

In this way, we take

$$\langle \phi(x) , \phi(x^\prime) \rangle = \sum_{n=1}^\infty \frac{x^n}{\sqrt{n !}} e^{- \frac{x^2}{2} } \frac{(x^\prime)^n}{\sqrt{n !}} e^{- \frac{(x^\prime)^2}{2} } = e^{\frac{x^2 + (x^\prime)^2}{2}} \sum_{n=1}^\infty \left( \frac{(x x^\prime)^n}{n!} \right) = e^{-\frac{\parallel x - x^\prime \parallel }{2}} .$$

Here, the feature space has infinite dimensions, while calculating the kernel is very simple. In general, given a scalar $\sigma > 0$, the Gaussian kernel is defined by

$$ \mathcal{K}(x , x^\prime) := e^{-\frac{\parallel x - x^\prime \parallel }{2 \sigma}}, \quad x , x^\prime \in \mathbb{R}^d.$$

Support Vector Machine

In this module, we will introduce one of the most important machine learning tools, the support vector machine. The SVM algorithm addresses the challenge of sample complexity through a “large margin” separator. Intuitively, a hyperplane separates the training data set with “high margin” if all examples are on the correct side of the hyperplane and as far away from the data as possible. Restricting the algorithm to provide the hyperplane with the largest margin reduces complexity even with large volumes of data and high dimensions.

Screenshot_29

index4

Figure 1: Separable training dataset

While both hyperplanes (black and green) separate the four examples, our intuition would probably choose the black hyperplane over the green hyperplane. One way to formalize our intuition is the concept of margin. The margin of a hyperplane with respect to the training data set is defined as the smallest distance between a point in the training data set and the hyperplane. If the hyperplane has high margin, then it must separate the data in the training set even if the data is perturbed in each example. Support Vector Machine (SVM) is an algorithm that returns a hyperplane that satisfies the MRE principle with the greatest possible margin. In the Kernel Method module, we derive the following optimization equation for the binary classification problem with kernel.

$$ \min_{ ( (\alpha_1 , \cdots , \alpha_n) \in \mathbb{R}^n )} \left( \frac{1}{n} \sum_{i=1}^n \psi(- (2y_i-1) \sum_{j=1}^n \alpha_j \mathcal{K}(x_j , x_i) ) + R \left( \sqrt{ \sum_{i=1}^n \sum_{j=1}^n \alpha_i \alpha_j \mathcal{K} (x_i , x_j)} \right) \right) ~ ~ (\text{Equação 1}) .$$

Once we learn the coefficients $(\alpha_1^\star, \cdots , \alpha_n^\star)$ With equation 1, we can calculate the prediction of a new entry by

Screenshot_30

Screenshot_31

$$\alpha^\star = (\alpha^\star_1 , \cdots , \alpha^\star_n) = arg \min_{ ( \alpha= (\alpha_1 , \cdots , \alpha_n) \in \mathbb{R}^n )} \left( \frac{1}{n} \sum_{i=1}^n \left( \max( 0, 1- (2y_i -1) [G\alpha]_{i}) \right) + \lambda \alpha^T G \alpha \right) ~ ~ (\text {Equação 2}).$$

To make this optimization problem smooth, we take the following variable $\xi_i = \max( 0, 1- (2y_i -1) [G\alpha]_{i})$ and we rewrite the optimization problem in the form

$$ (\alpha^\star , \xi^\star) = arg \min_{ \alpha , ~ \xi \in \mathbb{R}^n ~ ~ \text{tal que} \ \xi_i \geq 1- (2y_i -1) [G\alpha]_{i} \ \xi \geq 0 } \left( \frac{1}{n} \sum_{i=1}^n \xi_i + \lambda \alpha^T G \alpha \right).$$

This optimization problem is smooth and convex. Therefore, it satisfies the Karush-Khun-Tucker conditions for the Lagrangian dual problem in which

$$ (\alpha^\star , \xi^\star) = arg \min_{ \alpha , ~ \xi \in \mathbb{R}^n ~ ~ \text{tal que} \ \xi_i \geq 1- (2y_i -1) [G\alpha]_{i} \ \xi \geq 0 } \left( \frac{1}{n} \sum_{i=1}^n \xi_i + \lambda \alpha^T G \alpha - \sum_{i=1}^n \left( \eta_i (\xi_i - 1- (2y_i -1) [G\alpha]_{i}) + \theta_i \xi_i \right) \right).$$

Screenshot_32

From the first order conditions we are told that $\alpha^\star_i = \eta_i (2y_i-1) / (2 \lambda)$. Since $f^\star (x_i) = [G \alpha^\star]_i$, the first condition of negligence reinforces that $\alpha_i^\star = 0$ if $(2y_i-1) f^\star(x_i) > 1$. The second neglect condition with the second first-order condition tells us that $\alpha^\star_i = (2y_i -1) / (2 \lambda n)$ if $\xi^\star_i > 0$ and $0 \leq (2y_i -1) \alpha_i^\star \leq 1 / (2 \lambda n) $ otherwise. In this way, we have to $\xi^\star > 0$ then $\alpha^\star_i$ and $\eta_i$ are non-zero and, therefore, we conclude that $(2y_i-1) f^\star(x_i) = 1- \xi^\star_i < 1$ according to the negligence condition. With this, we arrive at the following theorem.

Theorem 1: Support Vector Machine

The solution to equation 2 is given in the form $f^\star (x) = \sum_{i=1}^n \alpha^\star_i \mathcal{K}(x_i , x) $ for $x \in \mathbb{R}^d$, in which

  • $\alpha_i^\star = 0$ if $(2y_i -1) f^\star (x_i) > 1$
  • $\alpha_i^\star = (2y_i-1) / (2 \lambda n)$ if $(2y_i -1) f^\star (x_i) < 1$
  • $0 \leq (2y_i - 1) \alpha^\star_i \leq 1/(2 \lambda n)$ if $(2y_i -1) f^\star (x_i) < 1$

The data vectors $x_i \in \mathbb{R}^d$ with index $i$ such that $\alpha^\star_i \neq 0$ are called support vectors.

Next, we will present a geometric interpretation for the SVM algorithm. Initially, we take the kernel function $\mathcal{K}(x , x^\prime) = \langle x , x^\prime \rangle$ for everyone $x , x^\prime \in \mathbb{R}^d$. The related RKHS is given by the space of linear shapes $\mathcal{F} = ( \langle x , \cdot \rangle: x \in \mathbb{R}^d )$. In this case, we have to $$f^\star (x) = \sum_{i=1}^n \alpha_i^\star \langle x_i , x \rangle = \langle \omega^\star , x \rangle \quad \text{com} \quad \omega^\star = \sum_{i=1}^n \alpha_i^\star x_i .$$

Screenshot_33

index5

Figure 2: Binary Classification with linear SVM.

In figure 2, the hyperplane that separates points $(x \in \mathbb{R}^d: \langle \omega^\star , x \rangle=0 )$ is represented by the black line. On the other hand, the margin hyperplanes $(x \in \mathbb{R}^d: \langle \omega^\star , x \rangle=1 )$ and $(x \in \mathbb{R}^d: \langle \omega^\star , x \rangle=-1 )$ are represented by dashed lines in blue and red, respectively. Furthermore, support vectors are represented by squares. With this, we deduce the following property of the SVM algorithm. If we add a point $x_{n+1}$ to the training data set for which $(2y_{n+1} -1) \langle \omega^\star , x \rangle> 1$, the vector $\omega^\star$ and the predictor $h^\star$ do not change. In other words, only data that is misclassified or classified with low margin (i.e. $(2y_{n+1} -1) \langle \omega^\star , x \rangle \geq 1$) influence the separating hyperplane $(x \in \mathbb{R}^d: \langle \omega^\star , x \rangle=0 )$.

Reproducing Kernel Hilbert Space

In this module, we will generally define the term “Reproducing Kernel Hilbert Space” (RKHS) and related kernel. Be $D$ a Hilbert space of functions $h: \chi \rightarrow \mathbb{R}$. One of the most important properties of an RKHS is that two functions $h$ and $g$ are close to the norm of $D$, then $f(x)$ and $g(x)$ are also close to everyone $x \in \chi$. We write the inner product in $D$ in the form $\langle f , g \rangle_D$ and the norm is given by $ \parallel f \parallel_D = \sqrt{\langle f , f \rangle_D}$. Since $D$ is a space of functions, we have a functional that relates each function $f \in D$ with its value in $x \in \chi$. For each $x \in \chi$, the function $\delta_x : D \rightarrow \mathbb{R}$ defined by $\delta_x (f) = f(x)$ is called the Dirac functional.

The Dirac Functional is linear. In reality, if we take $f,g \in D$ and $c_1 ,c_2 \in \mathbb{R}$, we have to $\delta_x (c_1 f + c_2 g)= (c_1 f + c_2 g)(x) = c_1 f (x) + c_2 g(x) = c_1 \delta_x (f) + c_2 \delta_x (g) $. Naturally, the question is whether the Dirac functional is continuous. This question leads us to the definition of RKHS.

Definition 1: Reproducing Kernel Hilbert Space

A Hilbert space composed of functions $f: \chi \rightarrow \mathbb{R}$ is a RKHS if the Dirac functional $\delta_x$ is continuous throughout $x \in \chi$.

Next, we present a result related to the behavior of an RKHS in relation to the convergence structure.

Lemma 1: Convergence in a norm implies punctual convergence

Be $D$ a RKHS. Suppose the sequence $(f_n)$ converges in $D$ for $f$ $(\parallel f_n - f \parallel_D \rightarrow 0)$, then we obtain that $f_n(x) \rightarrow f(x)$ for everyone $x \in \chi$.

Proof

For all $x \in \chi$, we have to $$ \mid f_n (x) - f(x) \mid = \mid \delta_x (f_n) - \delta_x (f) \mid \leq \parallel \delta_x \parallel_{D^\star} ~ \parallel f_n - f \parallel_D \rightarrow 0 ,$$ in which $\parallel \delta_x \parallel_{D^\star} $ is the dual norm of the linear Dirac functional, which is limited by the fact that $D$ It’s a RKHS. Follow the motto.

In general, the notion of nucleus does not appear directly in the RKHS deinition. Next, we will define the nucleus and establish its RKHS relationship.

Definition 2: Reproductive Nucleus

Be $D$ a Hilbert space composed of functions $f: \chi \rightarrow \mathbb{R}$. A function $\mathcal{K}: \chi \times \chi \rightarrow \mathbb{R}$ It is called the reproductive nucleus if:

  1. For all $x \in D$, we have to $\mathcal{K}( \cdot , x) \in D$;

  2. For all $x \in \chi$ and $f \in D$, we have to $$\langle f , \mathcal{K}(\cdot , x) \rangle_D = f(x) ~~(\text{propriedade reprodutiva}). $$

In particular, for all $x , x^\prime \in \chi$, we have to $$ \mathcal{K}( x , x^\prime) = \langle \mathcal{K}(\cdot , x^\prime) . \mathcal{K}(x , \cdot ) \rangle_D.$$ Based on this definition, we formulate several questions. What is the relationship between the reproductive nucleus and the RKHS? Does such a type of nucleus really exist? If it exists, is it unique? Next, we will evaluate the uniqueness of the reproductive nucleus.

Lemma 2: Uniqueness of the reproductive nucleus

Suppose there is a reproductive nucleus $\mathcal{K}$ in Hilbert space $D$. So this reproductive nucleus is unique.

Proof

We assume that $D$ supports two reproducible nuclei $\mathcal{K}_1$ and $\mathcal{K}_2$. So, for all$x \in \chi$ and $f \in D$, we have to $$ \langle f , \mathcal{K}_1 (\cdot , x) - \mathcal{K}_2 (\cdot , x) \rangle_D = f(x) - f(x) =0.$$ In particular, if we take $f = \mathcal{K}_1 (\cdot , x) - \mathcal{K}_2 (\cdot , x)$, we obtain that $\parallel \mathcal{K}_1 (\cdot , x) - \mathcal{K}_2 (\cdot , x) \parallel_D = 0$ for everyone $x \in \chi$. In this way, we conclude that $\mathcal{K}_1 = \mathcal{K}_2 $.

To show the existence of the reproductive nucleus in a RKHS, we will use the Riesz representation theorem, which tells us every linear functional can be represented through the inner product.

Theorem 1: Existence of the Reproductive Nucleus

A Hilbert space $D$ is a RKHS if, and only if, $D$ admits a reproductive nucleus.

Proof

Consider $D$ a Hilbert space with reproductive nucleus $\mathcal{K}$ . As a consequence of the Cauchy-Schwarz inequality, we obtain that $$\mid \delta_x (f) \mid = \mid f(x) \mid = \mid \langle f , \mathcal{K}(\cdot , x) \rangle_D \mid \leq \parallel \mathcal{K} (\cdot , x) \parallel_D \parallel f \parallel_D = \langle \mathcal{K} (\cdot , x) , \mathcal{K} (\cdot , x) \rangle_{D}^{1/2} \parallel f \parallel_D = \mathcal{K} (x , x)^{1/2} \parallel f \parallel_D.$$ Thus, we conclude that the linear Dirac functional is limited and consequently, $\delta_x$ it is continuous. Therefore, we have to $D$ It’s a RKHS.

On the other hand, we take $D$ a RKHS, in which the linear Dirac functional $\delta_x$ it is continuous. According to the Riesz representation theorem, there is an element $f_{\delta_x} \in D$ such that $$\delta_x (f) = \langle f , f_{\delta_x} \rangle_D, \quad f \in D.$$ With this, we define $\mathcal{K} (x^\prime , x) = f_{\delta_x} (x^\prime)$ for everyone $x , x^\prime \in \chi$. So, we obtain that $\mathcal{K} (\cdot , x) = f_{\delta_x}$ and $\langle f , \mathcal{K} (\cdot , x) = f_{\delta_x} = f(x)$. Therefore $\mathcal{K}$ is a reproductive nucleus.

Next, we will study some properties related to the reproductive nucleus.

Definition 3: Definite Positive Function

A symmetric function $g: \chi \times \chi \rightarrow \mathbb{R}$ is positive definite s for all $n \geq 1$, $(a_1 , \cdots , a_n) \in \mathbb{R}^n$, $(x_1, x_2 , \cdots , x_n) \in \chi^n$, we have to $$\sum_{i=1}^n \sum_{j=1}^n a_i a_j g(x_i , x_j) \geq 0. $$ The function $g$ is strictly positive definite if for $x_i$ distinct, equality is valid only when the values $a_i$ are null.

Every inner product is a positive definite function. In general, we have the following lemma.

Lemma 2

Be $F$ a Hilbert space (not necessarily an RKHS) with inner product $\langle \cdot , \cdot \rangle_F$. Be $\chi$ a Borel space and $\phi: \chi \rightarrow F$ a measurable Borel function. So, we have the function $h(x^\prime , x) := \langle \phi(x^\prime , \phi(x) \rangle_F$ is a positive definite function

Proof

We have to $$\sum_{i=1}^n \sum_{j=1}^n a_i a_j g(x_i , x_j) = \sum_{i=1}^n \sum_{j=1}^n \langle a_i \phi(x_i , a_j \phi(x_j) \rangle_F = \langle \sum_{i=1}^n a_i \phi(x_i ), \sum_{j=1}^n a_j \phi(x_j) \rangle_F = \parallel \sum_{i=1}^n a_i \phi(x_i) \parallel_F^2 \geq 0 .$$

With this, we have the elements to demonstrate the next lemma.

Lemma 3

Every reproductive nucleus is positive definite.

Proof

For every reproductive nucleus $\mathcal{K}$ It’s a RKHS $D$ satisfies $\mathcal{K}(x^\prime , x) = \langle \mathcal{K}(\cdot , x^\prime) , \mathcal{K}(\cdot , x) \rangle_D$. In this way, it is enough to take $\phi : \chi \rightarrow D$ in the form $\phi(x) = \mathcal{K}(\cdot , x)$ for everyone $x \in \chi$.

The next lemma goes in the opposite direction of lemma 3. As a consequence of the Cauchy-Schwarz inequality, we will show that every function is related to the inner product in the “feature space”.

Lemma 4

Se $g$ is a positive definite function, then $\mid h(x , x^\prime) \mid ^2 \leq \mid h(x , x) \mid ~ \mid h(x^\prime , x^\prime) \mid$.

Proof

Se $g(x , x^\prime)=0$, the inequality is obvious. On the other hand, we take $a_1 = a$ and $a_2 = g(x , x^\prime)$. We have to $q(a) = a^2 g(x , x) + 2a \mid g(x , x^\prime) \mid^2 + \mid g(x , x^\prime) \mid^2 g(x^\prime , x^\prime) \geq 0$. Since $q$ is a quadratic function of $a$ the inequality is valid for all $a$, we conclude that $$ \mid h(x , x^\prime) \mid ^4 \leq \mid h(x , x^\prime) \mid ^2 h(x , x) h(x^\prime , x^\prime),$$ which proves the lemma.

Thus, we arrive at the following definition of nucleus.

Definition 4: Core

Be $\chi$ a Borel space. The function $\mathcal{K} : \chi \times \chi \rightarrow \mathbb{R}$ is called a nucleus if there is a Hilbert space $F$ and a function $\phi: \chi \rightarrow F$ measurable borel such that $$\mathcal{K} (x, x^\prime) = \langle \phi(x) , \phi(x^\prime) \rangle_F, \quad x , x^\prime \in \chi .$$ The function $\phi: \chi \rightarrow F$ is called “feature function” and $F$ is called “feature space”.

For the same core, there may be more than one “feature function” as shown in the following example.

Example 1

Consider $\chi = \mathbb{R}$ and $$ \mathcal{K} (x , x^\prime) = x x^\prime = \left(\frac{x}{\sqrt{2}} , \frac{x}{\sqrt{2}} \right) \left(\frac{x^\prime}{\sqrt{2}} , \frac{x^\prime}{\sqrt{2}} \right)^T,$$ in which we define the following “feature functions” $\phi(x) = x$ and $\bar{\phi}(x) = \left(\frac{x}{\sqrt{2}} , \frac{x}{\sqrt{2}} \right)$ with $D = \mathbb{R}$ and $\bar{D} = \mathbb{R}^2$.

We denote by $\ell^2$ the space of all sequences in $\mathbb{R}$ which are square summable, that is, the space of sequences $(a_n : n \geq 1)$ such that $$\sum_{i=1}^\infty a_i^2 < \infty. $$ We know that $\ell^2$ is a Hilbert space with the inner product $$\langle \bar{a} , \bar{b} \rangle = \sum_{i=1}^\infty a_i b_i , \quad \bar{a} = (a_i : i \geq 1) \in \ell^2 ~ ~ \text{e} ~ ~ \bar{b} = (b_i : i \geq 1 ) \in \ell^2.$$

Lemma 5

For all $x \in \chi$, we assume that the sequence $(f_n(x) : n \geq 1) \in \ell^2$, in which $f_n : \chi \rightarrow \mathbb{R}$ is a Borel function measurable for all $n \geq 1$. So, we have $$\mathcal{K} (x , x^\prime) := \sum_{i=1}^\infty f_n(x) f_n (x^\prime) $$ is a nucleus.

Proof

From Holder’s inequality, we have $$ \sum_{i=1} \mid f_n(x) f_n (x^\prime) \mid \leq \parallel f_n(x) \parallel_{\ell^2} \parallel f_n(x^\prime) \parallel_{\ell^2}.$$ Thus, the series that defines $\mathcal{K}$ is absolutely convergent. When we define $D:=\ell^2$ and $\phi (x):= (f_n(x) : n \geq 1)$, follows the motto.

RKHS Construction: Moore - Aronszajn

From a RKHS $D$, we obtain a single reproductive nucleus related to $D$ which is positive definite. In this module we will establish the inverse relationship, for every positive defined function $\mathcal{K}$ there is a single RKHS $D$ for which $\mathcal{K}$ is a reproductive nucleus. Be $\mathcal{K}: \chi \times \chi \rightarrow \mathbb{R}$ a positive definite function. With this, let’s build a pre-RKHS $D_0$, which must satisfy two basic properties:

  1. The Dirac functional $\delta_x$ is continuous in $D_0$;

  2. Any Cauchy sequence $(f_n : n \geq 1)$ in $D_0$ which converges punctually to $0$ also converges on the norm in $D_0$ to zero.

As a consequence of property (2), for any Cauchy sequence $(f_n : n \geq 1)$ in $D_0$ which converges punctually to $f_0 \in D_0$ also converges to $f$ in the norm $\parallel \cdot \parallel_{D_0}$. In fact, we only need to observe that $f_n - f_0$ converges punctually to zero to apply property (2). Next, we applied the Moore and Aronszajn technique to construct the pre-RKHS. Be $\mathcal{K}$ a positive definite function, we take $D_0$ the class of all linear combinations of the class of functions $( \mathcal{K}(\cdot , x): x \in \chi)$. Thus, every function $f \in D_0$ is written in the form $f = \sum_{i=1}^n a_i \mathcal{K} (\cdot , x_i)$ in which $(a_1, \cdots , a_n) \in \mathbb{R}^n$ and $n \geq 1$. The inner product in $D_0$ is defined by

$$ \langle f , g \rangle_{D_0} := \sum_{i=1}^n \sum_{j=1}^m a_i b_j \mathcal{K}(x_i , x_j^\prime), $$

in which $f = \sum_{i=1}^n a_i \mathcal{K} (\cdot , x_i)$ in which $(a_1, \cdots , a_n) \in \mathbb{R}^n$ and $g = \sum_{j=1}^m b_i \mathcal{K} (\cdot , x_j^\prime)$ in which $(b_1, \cdots , b_m) \in \mathbb{R}^m$.

Initially, we need to show that this is a valid inner product. In this case, we need to show that the candidate inner product is independent of the representation of the functions $f,g \in D_0$. Since

$$\langle f , g \rangle_{D_0} = \sum_{i=1}^n \sum_{j=1}^m a_i b_j \mathcal{K}(x_i , x_j^\prime) = \sum_{i=1}^n a_i g(x_i) = \sum_{j=1}^m b_j f(x^\prime_j) ,$$

we conclude that the candidate inner product is independent of representation. As a consequence of this fact, we obtain reproductive property over $D_0$. When we take $g=\mathcal{K}(\cdot , x)$, we have to

$$ \langle f , g \rangle_{D_0} = \sum_{i=1}^n a_i g(x_i) = \sum_{i=1}^n a_i \mathcal{K}(x_i , x) = f(x). $$

Next, we will show that $\langle f , f \rangle_{D_0} = 0 $ implies that $f=0$. Consider $f = \sum_{i=1}^n a_i \mathcal{K} (\cdot , x_i)$ in which $(a_1, \cdots , a_n) \in \mathbb{R}^n$. We fix $x \in \chi$ and we take $c_i= c a_i $ for everyone $i=1, \cdots , n$, $c_{n+1} = f(x)$ and $x_{n+1}=x$. How $\mathcal{K}$ is a positive definite function, we obtain that

$$0 \leq \sum_{i=1}^{n+1} \sum_{j=1}^{n+1} c_i c_j \mathcal{K}(x_i , x_j) = c^2 \langle f , f \rangle_{D_0} + 2c \mid f(x) \mid^2 + \mid a f(x) \mid \mathcal{K}(x,x), $$

which leads us to conclude that

$$\mid f(x) \mid^4 \leq \mid f(x) \mid^2 \mathcal{K}(x,x) \langle f , f \rangle_{D_0}.$$

Thus, the fact that $\langle f , f \rangle_{D_0} = 0$ implies that $f=0$. Therefore, we have to $D_0$ is a space of functions with inner product $\langle \cdot , \cdot \rangle_{D_0}$ generated from the reproductive nucleus $\mathcal{K}$. Next, we will show that $D_0$ satisfies properties (1) and (2). Consider $x \in \chi$ and $f = \sum_{i=1}^n a_i \mathcal{K} (\cdot , x_i)$, then

$$\langle f , \mathcal{K}(\cdot , x) \rangle_{D_0} = \sum_{i=1}^n a_i \mathcal{K}(x,x_i) = f(x).$$

As a consequence, we obtain that

$$\mid \delta_x(f) - \delta_x(g) \mid =\langle f -g, \mathcal{K}(\cdot , x) \rangle_{D_0} \leq \left( \mathcal{K}(x,x) \right)^{1/2} \parallel f - g \parallel_{D_0} ,$$

which implies that $\delta_x$ is continuous in $D_0$. Thus, the first property of a pre-RKHS is valid.

Next, we will show that property (2) is valid for $D_0$ cm the inner product defined by the positive definite function $\mathcal{K}$. Consider $\epsilon > 0$ and $(f_n: n \geq 1 )$ a Cauchy sequence in $D_0$ which converges punctually to zero. Since every Cauchy sequence is bounded, we can find $M>0$ such that $\parallel f_n \parallel_{D_0} < M$ for everyone $n \geq 1$. Furthermore, there is $n_1 \geq 1$ such that

$$\parallel f_n - f_m \parallel_{D_0} < \frac{\epsilon}{2M}, \quad n , m \geq n_1.$$

We take $f_{n_1} =\sum_{j=1}^r a_j \mathcal{K}(\cdot , x_i)$ for some $(a_1, \cdots , a_r) \in \mathbb{R}^r$ and $r \in \mathbb{N}$. Consider $n_2 \geq 1$ such that $\mid f(x_i) \mid \frac{\epsilon}{2 r \mid a_i \mid}$ for everyone $i=1, \cdots , r$. In this way, for all $n \geq \max(n_1 , n_2 )$, we obtain that

$$ \parallel f_n \parallel_{D_0}^2 \leq \big| \langle f_n - f_{n_1} , f_n \rangle_{D_0} \big| + \big| \langle f_{n_1} , f_n \rangle_{D_0} \big| $$

$$ \leq \parallel f_n - f_{n_1} \parallel_{D_0} + \sum_{i=1}^r \mid a_i f_n (x_i) \mid < \epsilon, $$

and consequently, we have to $f_n$ converges to zero at the norm in$D_0$. Therefore, properties (1) and (2) are valid for $D_0$.

We define $D$ as the set of all functions $f : \chi \rightarrow \mathbb{R}$ for which there is a sequence $( f_n : n \geq 1 ) \subset D_0$ What is Cauchy in $D_0$ and converges punctually to $f$. Thus, we define $D$ as the topological completion of $D_0$ with respect to the inner product derived from the positive definite function $\mathcal{R}$. Given two functions $f,g \in D$, we define internal production by

$$\langle f , g \rangle_D : = \lim_{n \rightarrow \infty} \lim_{m \rightarrow \infty} \langle f_n , g_m \rangle_{D_0}.$$

Next, we will show that $D$ is a RKHS with reproductive nucleus $\mathcal{K}$. To show that $\mathcal{K}$ is a reproductive nucleus on $D$, we take $f \in D$ and a sequence $(f_n : n \geq 1 ) \subset D_0$which converges punctually to $f$. So, we have to

$$\langle f , \mathcal{K} (\cdot , x) \rangle_{D} = \lim_{n \rightarrow \infty} \langle f_n , \mathcal{K} (\cdot , x) \rangle_{D_0} = \lim_{n \rightarrow \infty} f_n(x) = f(x).$$

↑