diff --git a/doc/src/DimRed/chapter8.dlog b/doc/src/DimRed/chapter8.dlog new file mode 100644 index 000000000..9df8b7980 --- /dev/null +++ b/doc/src/DimRed/chapter8.dlog @@ -0,0 +1,75 @@ +*** error: file has a mako construction ${\mathbb{R}' + but seemingly no definition in <%...%>' + (it is not a command-line given mako variable either). + However, if this is a variable in a Makefile or Bash script + run with --no_mako - and you cannot use mako and Makefile or Bash variables + in the same document! + +*** error: file has a mako construction ${\mathbb{R}' + but seemingly no definition in <%...%>' + (it is not a command-line given mako variable either). + However, if this is a variable in a Makefile or Bash script + run with --no_mako - and you cannot use mako and Makefile or Bash variables + in the same document! + +translating doconce text in chapter8.do.txt to ipynb +*** replacing \bm{...} by \boldsymbol{...} (\bm is not supported by MathJax) +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +Failed to remove ans_at_end environment +Failed to remove sol_at_end environment +output in chapter8.ipynb diff --git a/doc/src/DimRed/chapter8.do.txt b/doc/src/DimRed/chapter8.do.txt new file mode 100644 index 000000000..2335493ec --- /dev/null +++ b/doc/src/DimRed/chapter8.do.txt @@ -0,0 +1,1264 @@ +======= Dimensionality Reduction ======= + + +===== Reducing the number of degrees of freedom, overarching view ===== +!bblock + +Many Machine Learning problems involve thousands or even millions of +features for each training instance. Not only does this make training +extremely slow, it can also make it much harder to find a good +solution, as we will see. This problem is often referred to as the +curse of dimensionality. Fortunately, in real-world problems, it is +often possible to reduce the number of features considerably, turning +an intractable problem into a tractable one. + +Here we will discuss some of the most popular dimensionality reduction +techniques: the principal component analysis (PCA), Kernel PCA, and +Locally Linear Embedding (LLE). Furthermore, we will start by looking +at some simple preprocessing of the data which allow us to rescale the +data. + +Principal component analysis and its various variants deal with the +problem of fitting a low-dimensional "affine +subspace":"https://en.wikipedia.org/wiki/Affine_space" to a set of of +data points in a high-dimensional space. With its family of methods it +is one of the most used tools in data modeling, compression and +visualization. + +!eblock + + + +===== Preprocessing our data ===== +!bblock + +Before we proceed however, we will discuss how to preprocess our +data. Till now and in connection with our previous examples we have +not met so many cases where we are too sensitive to the scaling of our +data. Normally the data may need a rescaling and/or may be sensitive +to extreme values. Scaling the data renders our inputs much more +suitable for the algorithms we want to employ. + +_Scikit-Learn_ has several functions which allow us to rescale the +data, normally resulting in much better results in terms of various +accuracy scores. The _StandardScaler_ function in _Scikit-Learn_ +ensures that for each feature/predictor we study the mean value is +zero and the variance is one (every column in the design/feature +matrix). This scaling has the drawback that it does not ensure that +we have a particular maximum or minimum in our data set. Another +function included in _Scikit-Learn_ is the _MinMaxScaler_ which +ensures that all features are exactly between $0$ and $1$. The + + +===== More preprocessing ===== + + +The _Normalizer_ scales each data +point such that the feature vector has a euclidean length of one. In other words, it +projects a data point on the circle (or sphere in the case of higher dimensions) with a +radius of 1. This means every data point is scaled by a different number (by the +inverse of it’s length). +This normalization is often used when only the direction (or angle) of the data matters, +not the length of the feature vector. + +The _RobustScaler_ works similarly to the StandardScaler in that it +ensures statistical properties for each feature that guarantee that +they are on the same scale. However, the RobustScaler uses the median +and quartiles, instead of mean and variance. This makes the +RobustScaler ignore data points that are very different from the rest +(like measurement errors). These odd data points are also called +outliers, and might often lead to trouble for other scaling +techniques. + +!eblock + + +===== Simple preprocessing examples, Franke function and regression ===== + +!bc pycod +# Common imports +import os +import numpy as np +import pandas as pd +import matplotlib.pyplot as plt +import sklearn.linear_model as skl +from sklearn.metrics import mean_squared_error +from sklearn.model_selection import train_test_split +from sklearn.preprocessing import MinMaxScaler, StandardScaler, Normalizer +from sklearn.svm import SVR + +# Where to save the figures and data files +PROJECT_ROOT_DIR = "Results" +FIGURE_ID = "Results/FigureFiles" +DATA_ID = "DataFiles/" + +if not os.path.exists(PROJECT_ROOT_DIR): + os.mkdir(PROJECT_ROOT_DIR) + +if not os.path.exists(FIGURE_ID): + os.makedirs(FIGURE_ID) + +if not os.path.exists(DATA_ID): + os.makedirs(DATA_ID) + +def image_path(fig_id): + return os.path.join(FIGURE_ID, fig_id) + +def data_path(dat_id): + return os.path.join(DATA_ID, dat_id) + +def save_fig(fig_id): + plt.savefig(image_path(fig_id) + ".png", format='png') + + +def FrankeFunction(x,y): + term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2)) + term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1)) + term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2)) + term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2) + return term1 + term2 + term3 + term4 + + +def create_X(x, y, n ): + if len(x.shape) > 1: + x = np.ravel(x) + y = np.ravel(y) + + N = len(x) + l = int((n+1)*(n+2)/2) # Number of elements in beta + X = np.ones((N,l)) + + for i in range(1,n+1): + q = int((i)*(i+1)/2) + for k in range(i+1): + X[:,q+k] = (x**(i-k))*(y**k) + + return X + + +# Making meshgrid of datapoints and compute Franke's function +n = 5 +N = 1000 +x = np.sort(np.random.uniform(0, 1, N)) +y = np.sort(np.random.uniform(0, 1, N)) +z = FrankeFunction(x, y) +X = create_X(x, y, n=n) +# split in training and test data +X_train, X_test, y_train, y_test = train_test_split(X,z,test_size=0.2) + + +svm = SVR(gamma='auto',C=10.0) +svm.fit(X_train, y_train) + +# The mean squared error and R2 score +print("MSE before scaling: {:.2f}".format(mean_squared_error(svm.predict(X_test), y_test))) +print("R2 score before scaling {:.2f}".format(svm.score(X_test,y_test))) + +scaler = StandardScaler() +scaler.fit(X_train) +X_train_scaled = scaler.transform(X_train) +X_test_scaled = scaler.transform(X_test) + +print("Feature min values before scaling:\n {}".format(X_train.min(axis=0))) +print("Feature max values before scaling:\n {}".format(X_train.max(axis=0))) + +print("Feature min values after scaling:\n {}".format(X_train_scaled.min(axis=0))) +print("Feature max values after scaling:\n {}".format(X_train_scaled.max(axis=0))) + +svm = SVR(gamma='auto',C=10.0) +svm.fit(X_train_scaled, y_train) + +print("MSE after scaling: {:.2f}".format(mean_squared_error(svm.predict(X_test_scaled), y_test))) +print("R2 score for scaled data: {:.2f}".format(svm.score(X_test_scaled,y_test))) + +!ec + + + + +===== Simple preprocessing examples, breast cancer data and classification, Support Vector Machines ===== + +We show here how we can use a simple regression case on the breast +cancer data using support vector machines (SVM) as algorithm for +classification. + + +!bc pycod +import matplotlib.pyplot as plt +import numpy as np +from sklearn.model_selection import train_test_split +from sklearn.datasets import load_breast_cancer +from sklearn.svm import SVC +cancer = load_breast_cancer() + +X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0) +print(X_train.shape) +print(X_test.shape) + +svm = SVC(C=100) +svm.fit(X_train, y_train) +print("Test set accuracy: {:.2f}".format(svm.score(X_test,y_test))) + +from sklearn.preprocessing import MinMaxScaler, StandardScaler +scaler = MinMaxScaler() +scaler.fit(X_train) +X_train_scaled = scaler.transform(X_train) +X_test_scaled = scaler.transform(X_test) + +print("Feature min values before scaling:\n {}".format(X_train.min(axis=0))) +print("Feature max values before scaling:\n {}".format(X_train.max(axis=0))) + +print("Feature min values before scaling:\n {}".format(X_train_scaled.min(axis=0))) +print("Feature max values before scaling:\n {}".format(X_train_scaled.max(axis=0))) + + +svm.fit(X_train_scaled, y_train) +print("Test set accuracy scaled data with Min-Max scaling: {:.2f}".format(svm.score(X_test_scaled,y_test))) + +scaler = StandardScaler() +scaler.fit(X_train) +X_train_scaled = scaler.transform(X_train) +X_test_scaled = scaler.transform(X_test) + +svm.fit(X_train_scaled, y_train) +print("Test set accuracy scaled data with Standar Scaler: {:.2f}".format(svm.score(X_test_scaled,y_test))) + +!ec + + +===== More on Cancer Data, now with Logistic Regression ===== + + +!bc pycod +import matplotlib.pyplot as plt +import numpy as np +from sklearn.model_selection import train_test_split +from sklearn.datasets import load_breast_cancer +from sklearn.linear_model import LogisticRegression +cancer = load_breast_cancer() + +# Set up training data +X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0) +logreg = LogisticRegression() +logreg.fit(X_train, y_train) +print("Test set accuracy: {:.2f}".format(logreg.score(X_test,y_test))) + +# Scale data +from sklearn.preprocessing import StandardScaler +scaler = StandardScaler() +scaler.fit(X_train) +X_train_scaled = scaler.transform(X_train) +X_test_scaled = scaler.transform(X_test) +logreg.fit(X_train_scaled, y_train) +print("Test set accuracy scaled data: {:.2f}".format(logreg.score(X_test_scaled,y_test))) + +!ec + + + + + +===== Why should we think of reducing the dimensionality ===== + +In addition to the plot of the features, we study now also the covariance (and the correlation matrix). +We use also _Pandas_ to compute the correlation matrix. +!bc pycod +import matplotlib.pyplot as plt +import numpy as np +from sklearn.model_selection import train_test_split +from sklearn.datasets import load_breast_cancer +from sklearn.linear_model import LogisticRegression +cancer = load_breast_cancer() +import pandas as pd +# Making a data frame +cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names) + +fig, axes = plt.subplots(15,2,figsize=(10,20)) +malignant = cancer.data[cancer.target == 0] +benign = cancer.data[cancer.target == 1] +ax = axes.ravel() + +for i in range(30): + _, bins = np.histogram(cancer.data[:,i], bins =50) + ax[i].hist(malignant[:,i], bins = bins, alpha = 0.5) + ax[i].hist(benign[:,i], bins = bins, alpha = 0.5) + ax[i].set_title(cancer.feature_names[i]) + ax[i].set_yticks(()) +ax[0].set_xlabel("Feature magnitude") +ax[0].set_ylabel("Frequency") +ax[0].legend(["Malignant", "Benign"], loc ="best") +fig.tight_layout() +plt.show() + +import seaborn as sns +correlation_matrix = cancerpd.corr().round(1) +# use the heatmap function from seaborn to plot the correlation matrix +# annot = True to print the values inside the square +sns.heatmap(data=correlation_matrix, annot=True) +plt.show() + +#print eigvalues of correlation matrix +EigValues, EigVectors = np.linalg.eig(correlation_matrix) +print(EigValues) +!ec + +In the above example we note two things. In the first plot we display +the overlap of benign and malignant tumors as functions of the various +features in the Wisconsing breast cancer data set. We see that for +some of the features we can distinguish clearly the benign and +malignant cases while for other features we cannot. This can point to +us which features may be of greater interest when we wish to classify +a benign or not benign tumour. + +In the second figure we have computed the so-called correlation +matrix, which in our case with thirty features becomes a $30\times 30$ +matrix. + +We constructed this matrix using _pandas_ via the statements +!bc pycod +cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names) +!ec +and then +!bc pycod +correlation_matrix = cancerpd.corr().round(1) +!ec + +Diagonalizing this matrix we can in turn say something about which +features are of relevance and which are not. But before we proceed we +need to define covariance and correlation matrices. This leads us to +the classical Principal Component Analysis (PCA) theorem with +applications. + + + + +===== Basic ideas of the Principal Component Analysis (PCA) ===== + +The principal component analysis deals with the problem of fitting a +low-dimensional affine subspace $S$ of dimension $d$ much smaller than +the totaldimension $D$ of the problem at hand (our data +set). Mathematically it can be formulated as a statistical problem or +a geometric problem. In our discussion of the theorem for the +classical PCA, we will stay with a statistical approach. This is also +what set the scene historically which for the PCA. + +We have a data set defined by a design/feature matrix $\bm{X}$ (see below for its definition) +* Each data point is determined by $p$ extrinsic (measurement) variables +* We may want to ask the following question: Are there fewer intrinsic variables (say $d << p$) that still approximately describe the data? +* If so, these intrinsic variables may tell us something important and finding these intrinsic variables is what dimension reduction methods do. + + + +===== Introducing the Covariance and Correlation functions ===== + +Before we discuss the PCA theorem, we need to remind ourselves about +the definition of the covariance and the correlation function. These are quantities + +Suppose we have defined two vectors +$\hat{x}$ and $\hat{y}$ with $n$ elements each. The covariance matrix $\bm{C}$ is defined as +!bt +\[ +\bm{C}[\bm{x},\bm{y}] = \begin{bmatrix} \mathrm{cov}[\bm{x},\bm{x}] & \mathrm{cov}[\bm{x},\bm{y}] \\ + \mathrm{cov}[\bm{y},\bm{x}] & \mathrm{cov}[\bm{y},\bm{y}] \\ + \end{bmatrix}, +\] +!et +where for example +!bt +\[ +\mathrm{cov}[\bm{x},\bm{y}] =\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})(y_i- \overline{y}). +\] +!et +With this definition and recalling that the variance is defined as +!bt +\[ +\mathrm{var}[\bm{x}]=\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})^2, +\] +!et +we can rewrite the covariance matrix as +!bt +\[ +\bm{C}[\bm{x},\bm{y}] = \begin{bmatrix} \mathrm{var}[\bm{x}] & \mathrm{cov}[\bm{x},\bm{y}] \\ + \mathrm{cov}[\bm{x},\bm{y}] & \mathrm{var}[\bm{y}] \\ + \end{bmatrix}. +\] +!et + +The covariance takes values between zero and infinity and may thus +lead to problems with loss of numerical precision for particularly +large values. It is common to scale the covariance matrix by +introducing instead the correlation matrix defined via the so-called +correlation function + +!bt +\[ +\mathrm{corr}[\bm{x},\bm{y}]=\frac{\mathrm{cov}[\bm{x},\bm{y}]}{\sqrt{\mathrm{var}[\bm{x}] \mathrm{var}[\bm{y}]}}. +\] +!et + +The correlation function is then given by values $\mathrm{corr}[\bm{x},\bm{y}] +\in [-1,1]$. This avoids eventual problems with too large values. We +can then define the correlation matrix for the two vectors $\bm{x}$ +and $\bm{y}$ as + +!bt +\[ +\bm{K}[\bm{x},\bm{y}] = \begin{bmatrix} 1 & \mathrm{corr}[\bm{x},\bm{y}] \\ + \mathrm{corr}[\bm{y},\bm{x}] & 1 \\ + \end{bmatrix}, +\] +!et + +In the above example this is the function we constructed using _pandas_. + + +===== Correlation Function and Design/Feature Matrix ===== + +In our derivation of the various regression algorithms like _Ordinary Least Squares_ or _Ridge regression_ +we defined the design/feature matrix $\bm{X}$ as + +!bt +\[ +\bm{X}=\begin{bmatrix} +x_{0,0} & x_{0,1} & x_{0,2}& \dots & \dots x_{0,p-1}\\ +x_{1,0} & x_{1,1} & x_{1,2}& \dots & \dots x_{1,p-1}\\ +x_{2,0} & x_{2,1} & x_{2,2}& \dots & \dots x_{2,p-1}\\ +\dots & \dots & \dots & \dots \dots & \dots \\ +x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \dots & \dots x_{n-2,p-1}\\ +x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \dots & \dots x_{n-1,p-1}\\ +\end{bmatrix}, +\] +!et +with $\bm{X}\in {\mathbb{R}}^{n\times p}$, with the predictors/features $p$ refering to the column numbers and the +entries $n$ being the row elements. +We can rewrite the design/feature matrix in terms of its column vectors as +!bt +\[ +\bm{X}=\begin{bmatrix} \bm{x}_0 & \bm{x}_1 & \bm{x}_2 & \dots & \dots & \bm{x}_{p-1}\end{bmatrix}, +\] +!et +with a given vector +!bt +\[ +\bm{x}_i^T = \begin{bmatrix}x_{0,i} & x_{1,i} & x_{2,i}& \dots & \dots x_{n-1,i}\end{bmatrix}. +\] +!et + +With these definitions, we can now rewrite our $2\times 2$ +correaltion/covariance matrix in terms of a moe general design/feature +matrix $\bm{X}\in {\mathbb{R}}^{n\times p}$. This leads to a $p\times p$ +covariance matrix for the vectors $\bm{x}_i$ with $i=0,1,\dots,p-1$ + +!bt +\[ +\bm{C}[\bm{x}] = \begin{bmatrix} +\mathrm{var}[\bm{x}_0] & \mathrm{cov}[\bm{x}_0,\bm{x}_1] & \mathrm{cov}[\bm{x}_0,\bm{x}_2] & \dots & \dots & \mathrm{cov}[\bm{x}_0,\bm{x}_{p-1}]\\ +\mathrm{cov}[\bm{x}_1,\bm{x}_0] & \mathrm{var}[\bm{x}_1] & \mathrm{cov}[\bm{x}_1,\bm{x}_2] & \dots & \dots & \mathrm{cov}[\bm{x}_1,\bm{x}_{p-1}]\\ +\mathrm{cov}[\bm{x}_2,\bm{x}_0] & \mathrm{cov}[\bm{x}_2,\bm{x}_1] & \mathrm{var}[\bm{x}_2] & \dots & \dots & \mathrm{cov}[\bm{x}_2,\bm{x}_{p-1}]\\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\mathrm{cov}[\bm{x}_{p-1},\bm{x}_0] & \mathrm{cov}[\bm{x}_{p-1},\bm{x}_1] & \mathrm{cov}[\bm{x}_{p-1},\bm{x}_{2}] & \dots & \dots & \mathrm{var}[\bm{x}_{p-1}]\\ +\end{bmatrix}, +\] +!et +and the correlation matrix +!bt +\[ +\bm{K}[\bm{x}] = \begin{bmatrix} +1 & \mathrm{corr}[\bm{x}_0,\bm{x}_1] & \mathrm{corr}[\bm{x}_0,\bm{x}_2] & \dots & \dots & \mathrm{corr}[\bm{x}_0,\bm{x}_{p-1}]\\ +\mathrm{corr}[\bm{x}_1,\bm{x}_0] & 1 & \mathrm{corr}[\bm{x}_1,\bm{x}_2] & \dots & \dots & \mathrm{corr}[\bm{x}_1,\bm{x}_{p-1}]\\ +\mathrm{corr}[\bm{x}_2,\bm{x}_0] & \mathrm{corr}[\bm{x}_2,\bm{x}_1] & 1 & \dots & \dots & \mathrm{corr}[\bm{x}_2,\bm{x}_{p-1}]\\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\mathrm{corr}[\bm{x}_{p-1},\bm{x}_0] & \mathrm{corr}[\bm{x}_{p-1},\bm{x}_1] & \mathrm{corr}[\bm{x}_{p-1},\bm{x}_{2}] & \dots & \dots & 1\\ +\end{bmatrix}, +\] +!et + + + +===== Covariance Matrix Examples ===== + + +The Numpy function _np.cov_ calculates the covariance elements using +the factor $1/(n-1)$ instead of $1/n$ since it assumes we do not have +the exact mean values. The following simple function uses the +_np.vstack_ function which takes each vector of dimension $1\times n$ +and produces a $2\times n$ matrix $\bm{W}$ + + +!bt +\[ +\bm{W} = \begin{bmatrix} x_0 & y_0 \\ + x_1 & y_1 \\ + x_2 & y_2\\ + \dots & \dots \\ + x_{n-2} & y_{n-2}\\ + x_{n-1} & y_{n-1} & + \end{bmatrix}, +\] +!et + +which in turn is converted into into the $2\times 2$ covariance matrix +$\bm{C}$ via the Numpy function _np.cov()_. We note that we can also calculate +the mean value of each set of samples $\bm{x}$ etc using the Numpy +function _np.mean(x)_. We can also extract the eigenvalues of the +covariance matrix through the _np.linalg.eig()_ function. + +!bc pycod +# Importing various packages +import numpy as np +n = 100 +x = np.random.normal(size=n) +print(np.mean(x)) +y = 4+3*x+np.random.normal(size=n) +print(np.mean(y)) +W = np.vstack((x, y)) +C = np.cov(W) +print(C) +!ec + + +===== Correlation Matrix ===== + +The previous example can be converted into the correlation matrix by +simply scaling the matrix elements with the variances. We should also +subtract the mean values for each column. This leads to the following +code which sets up the correlations matrix for the previous example in +a more brute force way. Here we scale the mean values for each column of the design matrix, calculate the relevant mean values and variances and then finally set up the $2\times 2$ correlation matrix (since we have only two vectors). + +!bc pycod +import numpy as np +n = 100 +# define two vectors +x = np.random.random(size=n) +y = 4+3*x+np.random.normal(size=n) +#scaling the x and y vectors +x = x - np.mean(x) +y = y - np.mean(y) +variance_x = np.sum(x@x)/n +variance_y = np.sum(y@y)/n +print(variance_x) +print(variance_y) +cov_xy = np.sum(x@y)/n +cov_xx = np.sum(x@x)/n +cov_yy = np.sum(y@y)/n +C = np.zeros((2,2)) +C[0,0]= cov_xx/variance_x +C[1,1]= cov_yy/variance_y +C[0,1]= cov_xy/np.sqrt(variance_y*variance_x) +C[1,0]= C[0,1] +print(C) +!ec + +We see that the matrix elements along the diagonal are one as they +should be and that the matrix is symmetric. Furthermore, diagonalizing +this matrix we easily see that it is a positive definite matrix. + +The above procedure with _numpy_ can be made more compact if we use _pandas_. + + +===== Correlation Matrix with Pandas ===== + +We whow here how we can set up the correlation matrix using _pandas_, as done in this simple code +!bc pycod +import numpy as np +import pandas as pd +n = 10 +x = np.random.normal(size=n) +x = x - np.mean(x) +y = 4+3*x+np.random.normal(size=n) +y = y - np.mean(y) +X = (np.vstack((x, y))).T +print(X) +Xpd = pd.DataFrame(X) +print(Xpd) +correlation_matrix = Xpd.corr() +print(correlation_matrix) +!ec + + +We expand this model to the Franke function discussed above. + + +===== Correlation Matrix with Pandas and the Franke function ===== + +!bc pycod +# Common imports +import numpy as np +import pandas as pd + + +def FrankeFunction(x,y): + term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2)) + term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1)) + term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2)) + term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2) + return term1 + term2 + term3 + term4 + + +def create_X(x, y, n ): + if len(x.shape) > 1: + x = np.ravel(x) + y = np.ravel(y) + + N = len(x) + l = int((n+1)*(n+2)/2) # Number of elements in beta + X = np.ones((N,l)) + + for i in range(1,n+1): + q = int((i)*(i+1)/2) + for k in range(i+1): + X[:,q+k] = (x**(i-k))*(y**k) + + return X + + +# Making meshgrid of datapoints and compute Franke's function +n = 4 +N = 100 +x = np.sort(np.random.uniform(0, 1, N)) +y = np.sort(np.random.uniform(0, 1, N)) +z = FrankeFunction(x, y) +X = create_X(x, y, n=n) + +Xpd = pd.DataFrame(X) +# subtract the mean values and set up the covariance matrix +Xpd = Xpd - Xpd.mean() +covariance_matrix = Xpd.cov() +print(covariance_matrix) +!ec + +We note here that the covariance is zero for the first rows and +columns since all matrix elements in the design matrix were set to one +(we are fitting the function in terms of a polynomial of degree $n$). + +This means that the variance for these elements will be zero and will +cause problems when we set up the correlation matrix. We can simply +drop these elements and construct a correlation +matrix without these elements. + + + +===== Rewriting the Covariance and/or Correlation Matrix ===== + +We can rewrite the covariance matrix in a more compact form in terms of the design/feature matrix $\bm{X}$ as +!bt +\[ +\bm{C}[\bm{x}] = \frac{1}{n}\bm{X}\bm{X}^T= \mathbb{E}[\bm{X}\bm{X}^T]. +\] +!et + +To see this let us simply look at a design matrix $\bm{X}\in {\mathbb{R}}^{2\times 2}$ +!bt +\[ +\bm{X}=\begin{bmatrix} +x_{00} & x_{01}\\ +x_{10} & x_{11}\\ +\end{bmatrix}=\begin{bmatrix} +\bm{x}_{0} & \bm{x}_{1}\\ +\end{bmatrix}. +\] +!et + +If we then compute the expectation value +!bt +\[ +\mathbb{E}[\bm{X}\bm{X}^T] = \frac{1}{n}\bm{X}\bm{X}^T=\begin{bmatrix} +x_{00}^2+x_{01}^2 & x_{00}x_{10}+x_{01}x_{11}\\ +x_{10}x_{00}+x_{11}x_{01} & x_{10}^2+x_{11}^2\\ +\end{bmatrix}, +\] +!et +which is just +!bt +\[ +\bm{C}[\bm{x}_0,\bm{x}_1] = \bm{C}[\bm{x}]=\begin{bmatrix} \mathrm{var}[\bm{x}_0] & \mathrm{cov}[\bm{x}_0,\bm{x}_1] \\ + \mathrm{cov}[\bm{x}_1,\bm{x}_0] & \mathrm{var}[\bm{x}_1] \\ + \end{bmatrix}, +\] +!et +where we wrote $$\bm{C}[\bm{x}_0,\bm{x}_1] = \bm{C}[\bm{x}]$$ to indicate that this the covariance of the vectors $\bm{x}$ of the design/feature matrix $\bm{X}$. + +It is easy to generalize this to a matrix $\bm{X}\in {\mathbb{R}}^{n\times p}$. + + + +===== Towards the PCA theorem ===== + +We have that the covariance matrix (the correlation matrix involves a simple rescaling) is given as +!bt +\[ +\bm{C}[\bm{x}] = \frac{1}{n}\bm{X}\bm{X}^T= \mathbb{E}[\bm{X}\bm{X}^T]. +\] +!et +Let us now assume that we can perform a series of orthogonal transformations where we employ some orthogonal matrices $\bm{S}$. +These matrices are defined as $\bm{S}\in {\mathbb{R}}^{p\times p}$ and obey the orthogonality requirements $\bm{S}\bm{S}^T=\bm{S}^T\bm{S}=\bm{I}$. The matrix can be written out in terms of the column vectors $\bm{s}_i$ as $\bm{S}=[\bm{s}_0,\bm{s}_1,\dots,\bm{s}_{p-1}]$ and $\bm{s}_i \in {\mathbb{R}}^{p}$. + +Assume also that there is a transformation $\bm{S}\bm{C}[\bm{x}]\bm{S}^T=\bm{C}[\bm{y}]$ such that the new matrix $\bm{C}[\bm{y}]$ is diagonal with elements $[\lambda_0,\lambda_1,\lambda_2,\dots,\lambda_{p-1}]$. + +That is we have +!bt +\[ +\bm{C}[\bm{y}] = \mathbb{E}[\bm{S}\bm{X}\bm{X}^T\bm{S}^T]=\bm{S}\bm{C}[\bm{x}]\bm{S}^T, +\] +!et +since the matrix $\bm{S}$ is not a data dependent matrix. Multiplying with $\bm{S}^T$ from the left we have +!bt +\[ +\bm{S}^T\bm{C}[\bm{y}] = \bm{C}[\bm{x}]\bm{S}^T, +\] +!et +and since $\bm{C}[\bm{y}]$ is diagonal we have for a given eigenvalue $i$ of the covariance matrix that + +!bt +\[ +\bm{S}^T_i\lambda_i = \bm{C}[\bm{x}]\bm{S}^T_i. +\] +!et + +In the derivation of the PCA theorem we will assume that the eigenvalues are ordered in descending order, that is +$\lambda_0 > \lambda_1 > \dots > \lambda_{p-1}$. + + +The eigenvalues tell us then how much we need to stretch the +corresponding eigenvectors. Dimensions with large eigenvalues have +thus large variations (large variance) and define therefore useful +dimensions. The data points are more spread out in the direction of +these eigenvectors. Smaller eigenvalues mean on the other hand that +the corresponding eigenvectors are shrunk accordingly and the data +points are tightly bunched together and there is not much variation in +these specific directions. Hopefully then we could leave it out +dimensions where the eigenvalues are very small. If $p$ is very large, +we could then aim at reducing $p$ to $l << p$ and handle only $l$ +features/predictors. + + +===== The Algorithm before the Theorem ===== + +Here's how we would proceed in setting up the algorithm for the PCA, see also discussion below here. +* Set up the datapoints for the design/feature matrix $\bm{X}$ with $\bm{X}\in {\mathbb{R}}^{n\times p}$, with the predictors/features $p$ referring to the column numbers and the entries $n$ being the row elements. +!bt +\[ +\bm{X}=\begin{bmatrix} +x_{0,0} & x_{0,1} & x_{0,2}& \dots & \dots x_{0,p-1}\\ +x_{1,0} & x_{1,1} & x_{1,2}& \dots & \dots x_{1,p-1}\\ +x_{2,0} & x_{2,1} & x_{2,2}& \dots & \dots x_{2,p-1}\\ +\dots & \dots & \dots & \dots \dots & \dots \\ +x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \dots & \dots x_{n-2,p-1}\\ +x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \dots & \dots x_{n-1,p-1}\\ +\end{bmatrix}, +\] +!et +* Center the data by subtracting the mean value for each column. This leads to a new matrix $\bm{X}\rightarrow \overline{\bm{X}}$. +* Compute then the covariance/correlation matrix $\mathbb{E}[\overline{\bm{X}}\overline{\bm{X}}^T]$. +* Find the eigenpairs of $\bm{C}$ with eigenvalues $[\lambda_0,\lambda_1,\dots,\lambda_{p-1}]$ and eigenvectors $[\bm{s}_0,\bm{s}_1,\dots,\bm{s}_{p-1}]$. +* Order the eigenvalue (and the eigenvectors accordingly) in order of decreasing eigenvalues. +* Keep only those $l$ eigenvalues larger than a selected threshold value, discarding thus $p-l$ features since we expect small variations in the data here. + + + +===== Writing our own PCA code ===== + +We will use a simple example first with two-dimensional data +drawn from a multivariate normal distribution with the following mean and covariance matrix: +!bt +\[ +\mu = (-1,2) \qquad \Sigma = \begin{bmatrix} 4 & 2 \\ +2 & 2 +\end{bmatrix} +\] +!et +Note that the mean refers to each column of data. +We will generate $n = 1000$ points $X = \{ x_1, \ldots, x_N \}$ from +this distribution, and store them in the $1000 \times 2$ matrix $\bm{X}$. + +The following Python code aids in setting up the data and writing out the design matrix. +Note that the function _multivariate_ returns also the covariance discussed above and that it is defined by dividing by $n-1$ instead of $n$. +!bc pycod +import numpy as np +import pandas as pd +import matplotlib.pyplot as plt +from IPython.display import display +n = 10000 +mean = (-1, 2) +cov = [[4, 2], [2, 2]] +X = np.random.multivariate_normal(mean, cov, n) +!ec + +Now we are going to implement the PCA algorithm. We will break it down into various substeps. + +=== Compute the sample mean and center the data === + +The first step of PCA is to compute the sample mean of the data and use it to center the data. Recall that the sample mean is +!bt +\[ +\mu_n = \frac{1}{n} \sum_{i=1}^n x_i +\] +!et +and the mean-centered data $\bar{X} = \{ \bar{x}_1, \ldots, \bar{x}_n \}$ takes the form +!bt +\[ +\bar{x}_i = x_i - \mu_n. +\] +!et +When you are done with these steps, print out $\mu_n$ to verify it is +close to $\mu$ and plot your mean centered data to verify it is +centered at the origin! Compare your code with the functionality from _Scikit-Learn_ discussed above. +The following code elements perform these operations using _pandas_ or using our own functionality for doing so. The latter, using _numpy_ is rather simple through the _mean()_ function. +!bc pycod +df = pd.DataFrame(X) +# Pandas does the centering for us +df = df -df.mean() +# we center it ourselves +X_centered = X - X.mean(axis=0) +!ec + +Alternatively, we could use the functions we discussed +earlier for scaling the data set. That is, we could have used the +_StandardScaler_ function in _Scikit-Learn_, a function which ensures +that for each feature/predictor we study the mean value is zero and +the variance is one (every column in the design/feature matrix). You +would then not get the same results, since we divide by the +variance. The diagonal covariance matrix elements will then be one, +while the non-diagonal ones need to be divided by $2\sqrt{2}$ for our +specific case. + +=== Compute the sample covariance === + +Now we are going to use the mean centered data to compute the sample covariance of the data by using the following equation +!bt +\begin{equation*} +\Sigma_n = \frac{1}{n-1} \sum_{i=1}^n \bar{x}_i^T \bar{x}_i = \frac{1}{n-1} \sum_{i=1}^n (x_i - \mu_n)^T (x_i - \mu_n) +\end{equation*} +!et +where the data points $x_i \in \mathbb{R}^p$ (here in this example $p = 2$) are column vectors and $x^T$ is the transpose of $x$. +We can write our own code or simply use either the functionaly of _numpy_ or that of _pandas_, as follows +!bc pycod +print(df.cov()) +print(np.cov(X_centered.T)) +!ec +Note that the way we define the covariance matrix here has a factor $n-1$ instead of $n$. This is included in the _cov()_ function by _numpy_ and _pandas_. +Our own code here is not very elegant and asks for obvious improvements. It is tailored to this specific $2\times 2$ covariance matrix. +!bc pycod +# extract the relevant columns from the centered design matrix of dim n x 2 +x = X_centered[:,0] +y = X_centered[:,1] +Cov = np.zeros((2,2)) +Cov[0,1] = np.sum(x.T@y)/(n-1.0) +Cov[0,0] = np.sum(x.T@x)/(n-1.0) +Cov[1,1] = np.sum(y.T@y)/(n-1.0) +Cov[1,0]= Cov[0,1] +print("Centered covariance using own code") +print(Cov) +plt.plot(x, y, 'x') +plt.axis('equal') +plt.show() +!ec + +Depending on the number of points $n$, we will get results that are close to the covariance values defined above. +The plot shows how the data are clustered around a line with slope close to one. Is this expected? + +=== Diagonalize the sample covariance matrix to obtain the principal components === + +Now we are ready to solve for the principal components! To do so we +diagonalize the sample covariance matrix $\Sigma$. We can use the +function _np.linalg.eig_ to do so. It will return the eigenvalues and +eigenvectors of $\Sigma$. Once we have these we can perform the +following tasks: + +* We compute the percentage of the total variance captured by the first principal component +* We plot the mean centered data and lines along the first and second principal components +* Then we project the mean centered data onto the first and second principal components, and plot the projected data. +* Finally, we approximate the data as + +!bt +\begin{equation*} +x_i \approx \tilde{x}_i = \mu_n + \langle x_i, v_0 \rangle v_0 +\end{equation*} +!et +where $v_0$ is the first principal component. + +Collecting all these steps we can write our own PCA function and +compare this with the functionality included in _Scikit-Learn_. + +The code here outlines some of the elements we could include in the +analysis. Feel free to extend upon this in order to address the above +questions. + +!bc pycod +# diagonalize and obtain eigenvalues, not necessarily sorted +EigValues, EigVectors = np.linalg.eig(Cov) +# sort eigenvectors and eigenvalues +#permute = EigValues.argsort() +#EigValues = EigValues[permute] +#EigVectors = EigVectors[:,permute] +print("Eigenvalues of Covariance matrix") +for i in range(2): + print(EigValues[i]) +FirstEigvector = EigVectors[:,0] +SecondEigvector = EigVectors[:,1] +print("First eigenvector") +print(FirstEigvector) +print("Second eigenvector") +print(SecondEigvector) +#thereafter we do a PCA with Scikit-learn +from sklearn.decomposition import PCA +pca = PCA(n_components = 2) +X2Dsl = pca.fit_transform(X) +print("Eigenvector of largest eigenvalue") +print(pca.components_.T[:, 0]) + +!ec +This code does not contain all the above elements, but it shows how we can use _Scikit-Learn_ to extract the eigenvector which corresponds to the largest eigenvalue. Try to address the questions we pose before the above code. Try also to change the values of the covariance matrix by making one of the diagonal elements much larger than the other. What do you observe then? + + +===== Classical PCA Theorem ===== + +We assume now that we have a design matrix $\bm{X}$ which has been +centered as discussed above. For the sake of simplicity we skip the +overline symbol. The matrix is defined in terms of the various column +vectors $[\bm{x}_0,\bm{x}_1,\dots, \bm{x}_{p-1}]$ each with dimension +$\bm{x}\in {\mathbb{R}}^{n}$. + +We assume also that we have an orthogonal transformation $\bm{W}\in {\mathbb{R}}^{p\times p}$. We define the reconstruction error (which is similar to the mean squared error we have seen before) as +!bt +\[ +J(\bm{W},\bm{Z}) = \frac{1}{n}\sum_i (\bm{x}_i - \overline{\bm{x}}_i)^2, +\] +!et +with $\overline{\bm{x}}_i = \bm{W}\bm{z}_i$, where $\bm{z}_i$ is a row vector with dimension ${\mathbb{R}}^{n}$ of the matrix +$\bm{Z}\in{\mathbb{R}}^{p\times n}$. When doing PCA we want to reduce this dimensionality. + +The PCA theorem states that minimizing the above reconstruction error +corresponds to setting $\bm{W}=\bm{S}$, the orthogonal matrix which +diagonalizes the empirical covariance(correlation) matrix. The optimal +low-dimensional encoding of the data is then given by a set of vectors +$\bm{z}_i$ with at most $l$ vectors, with $l << p$, defined by the +orthogonal projection of the data onto the columns spanned by the +eigenvectors of the covariance(correlations matrix). + +The proof which follows will be updated by mid January 2020. + + +===== Proof of the PCA Theorem ===== + +To show the PCA theorem let us start with the assumption that there is one vector $\bm{w}_0$ which corresponds to a solution which minimized the reconstruction error $J$. This is an orthogonal vector. It means that we now approximate the reconstruction error in terms of $\bm{w}_0$ and $\bm{z}_0$ as +!bt +\[ +J(\bm{w}_0,\bm{z}_0)= \frac{1}{n}\sum_i (\bm{x}_i - z_{i0}\bm{w}_0)^2=\frac{1}{n}\sum_i (\bm{x}_i^T\bm{x}_i - 2z_{i0}\bm{w}_0^T\bm{x}_i+z_{i0}^2\bm{w}_0^T\bm{w}_0), +\] +!et +which we can rewrite due to the orthogonality of $\bm{w}_i$ as +!bt +\[ +J(\bm{w}_0,\bm{z}_0)=\frac{1}{n}\sum_i (\bm{x}_i^T\bm{x}_i - 2z_{i0}\bm{w}_0^T\bm{x}_i+z_{i0}^2). +\] +!et +Minimizing $J$ with respect to the unknown parameters $z_{0i}$ we obtain that +!bt +\[ +z_{i0}=\bm{w}_0^T\bm{x}_i, +\] +!et +where the vectors on the rhs are known. + + + +===== PCA Proof continued ===== + +We have now found the unknown parameters $z_{i0}$. These correspond to the projected coordinates and we can write +!bt +\[ +J(\bm{w}_0)= \frac{1}{p}\sum_i (\bm{x}_i^T\bm{x}_i - z_{i0}^2)=\mathrm{const}-\frac{1}{n}\sum_i z_{i0}^2. +\] +!et + +We can show that the variance of the projected coordinates defined by $\bm{w}_0^T\bm{x}_i$ are given by +!bt +\[ +\mathrm{var}[\bm{w}_0^T\bm{x}_i] = \frac{1}{n}\sum_i z_{i0}^2, +\] +!et +since the expectation value of +!bt +\[ +\mathbb{E}[\bm{w}_0^T\bm{x}_i] = \mathbb{E}[z_{i0}]= \bm{w}_0^T\mathbb{E}[\bm{x}_i]=0, +\] +!et +where we have used the fact that our data are centered. + +Recalling our definition of the covariance as +!bt +\[ +\bm{C}[\bm{x}] = \frac{1}{n}\bm{X}\bm{X}^T=\mathbb{E}[\bm{X}\bm{X}^T], +\] +!et +we have thus that +!bt +\[ +\mathrm{var}[\bm{w}_0^T\bm{x}_i] = \frac{1}{n}\sum_i z_{i0}^2=\bm{w}_0^T\bm{C}[\bm{x}]\bm{w}_0. +\] +!et + +We are almost there, we have obtained a relation between minimizing +the reconstruction error and the variance and the covariance +matrix. Minimizing the error is equivalent to maximizing the variance +of the projected data. + + +===== The final step ===== + +We could trivially maximize the variance of the projection (and +thereby minimize the error in the reconstruction function) by letting +the norm-2 of $\bm{w}_0$ go to infinity. However, this norm since we +want the matrix $\bm{W}$ to be an orthogonal matrix, is constrained by +$\vert\vert \bm{w}_0 \vert\vert_2^2=1$. Imposing this condition via a +Lagrange multiplier we can then in turn maximize + +!bt +\[ +J(\bm{w}_0)= \bm{w}_0^T\bm{C}[\bm{x}]\bm{w}_0+\lambda_0(1-\bm{w}_0^T\bm{w}_0). +\] +!et +Taking the derivative with respect to $\bm{w}_0$ we obtain + +!bt +\[ +\frac{\partial J(\bm{w}_0)}{\partial \bm{w}_0}= 2\bm{C}[\bm{x}]\bm{w}_0-2\lambda_0\bm{w}_0=0, +\] +!et +meaning that +!bt +\[ +\bm{C}[\bm{x}]\bm{w}_0=\lambda_0\bm{w}_0. +\] +!et +_The direction that maximizes the variance (or minimizes the construction error) is an eigenvector of the covariance matrix_! If we left multiply with $\bm{w}_0^T$ we have the variance of the projected data is +!bt +\[ +\bm{w}_0^T\bm{C}[\bm{x}]\bm{w}_0=\lambda_0. +\] +!et + +If we want to maximize the variance (minimize the construction error) +we simply pick the eigenvector of the covariance matrix with the +largest eigenvalue. This establishes the link between the minimization +of the reconstruction function $J$ in terms of an orthogonal matrix +and the maximization of the variance and thereby the covariance of our +observations encoded in the design/feature matrix $\bm{X}$. + +The proof +for the other eigenvectors $\bm{w}_1,\bm{w}_2,\dots$ can be +established by applying the above arguments and using the fact that +our basis of eigenvectors is orthogonal, see "Murphy chapter +12.2":"https://mitpress.mit.edu/books/machine-learning-1". The +discussion in chapter 12.2 of Murphy's text has also a nice link with +the Singular Value Decomposition theorem. For categorical data, see +chapter 12.4 and discussion therein. + +Additional part of the proof for the other eigenvectors will be added by mid January 2020. + + +===== Geometric Interpretation and link with Singular Value Decomposition ===== + +This material will be added by mid January 2020. + + + +===== Principal Component Analysis ===== + +Principal Component Analysis (PCA) is by far the most popular dimensionality reduction algorithm. +First it identifies the hyperplane that lies closest to the data, and then it projects the data onto it. + +The following Python code uses NumPy’s _svd()_ function to obtain all the principal components of the +training set, then extracts the first two principal components. First we center the data using either _pandas_ or our own code +!bc pycod +import numpy as np +import pandas as pd +from IPython.display import display +np.random.seed(100) +# setting up a 10 x 5 vanilla matrix +rows = 10 +cols = 5 +X = np.random.randn(rows,cols) +df = pd.DataFrame(X) +# Pandas does the centering for us +df = df -df.mean() +display(df) + +# we center it ourselves +X_centered = X - X.mean(axis=0) +# Then check the difference between pandas and our own set up +print(X_centered-df) +#Now we do an SVD +U, s, V = np.linalg.svd(X_centered) +c1 = V.T[:, 0] +c2 = V.T[:, 1] +W2 = V.T[:, :2] +X2D = X_centered.dot(W2) +print(X2D) +!ec + +PCA assumes that the dataset is centered around the origin. Scikit-Learn’s PCA classes take care of centering +the data for you. However, if you implement PCA yourself (as in the preceding example), or if you use other libraries, don’t +forget to center the data first. + +Once you have identified all the principal components, you can reduce the dimensionality of the dataset +down to $d$ dimensions by projecting it onto the hyperplane defined by the first $d$ principal components. +Selecting this hyperplane ensures that the projection will preserve as much variance as possible. +!bc pycod +W2 = V.T[:, :2] +X2D = X_centered.dot(W2) +!ec + + +===== PCA and scikit-learn ===== + +Scikit-Learn’s PCA class implements PCA using SVD decomposition just like we did before. The +following code applies PCA to reduce the dimensionality of the dataset down to two dimensions (note +that it automatically takes care of centering the data): +!bc pycod +#thereafter we do a PCA with Scikit-learn +from sklearn.decomposition import PCA +pca = PCA(n_components = 2) +X2D = pca.fit_transform(X) +print(X2D) +!ec +After fitting the PCA transformer to the dataset, you can access the principal components using the +components variable (note that it contains the PCs as horizontal vectors, so, for example, the first +principal component is equal to +!bc pycod +pca.components_.T[:, 0]. +!ec +Another very useful piece of information is the explained variance ratio of each principal component, +available via the $explained\_variance\_ratio$ variable. It indicates the proportion of the dataset’s +variance that lies along the axis of each principal component. + + +===== Back to the Cancer Data ===== +We can now repeat the above but applied to real data, in this case our breast cancer data. +Here we compute performance scores on the training data using logistic regression. +!bc pycod +import matplotlib.pyplot as plt +import numpy as np +from sklearn.model_selection import train_test_split +from sklearn.datasets import load_breast_cancer +from sklearn.linear_model import LogisticRegression +cancer = load_breast_cancer() + +X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0) + +logreg = LogisticRegression() +logreg.fit(X_train, y_train) +print("Train set accuracy from Logistic Regression: {:.2f}".format(logreg.score(X_train,y_train))) +# We scale the data +from sklearn.preprocessing import StandardScaler +scaler = StandardScaler() +scaler.fit(X_train) +X_train_scaled = scaler.transform(X_train) +X_test_scaled = scaler.transform(X_test) +# Then perform again a log reg fit +logreg.fit(X_train_scaled, y_train) +print("Train set accuracy scaled data: {:.2f}".format(logreg.score(X_train_scaled,y_train))) +#thereafter we do a PCA with Scikit-learn +from sklearn.decomposition import PCA +pca = PCA(n_components = 2) +X2D_train = pca.fit_transform(X_train_scaled) +# and finally compute the log reg fit and the score on the training data +logreg.fit(X2D_train,y_train) +print("Train set accuracy scaled and PCA data: {:.2f}".format(logreg.score(X2D_train,y_train))) + +!ec + +We see that our training data after the PCA decomposition has a performance similar to the non-scaled data. + + +===== More on the PCA ===== + +Instead of arbitrarily choosing the number of dimensions to reduce down to, it is generally preferable to +choose the number of dimensions that add up to a sufficiently large portion of the variance (e.g., 95%). +Unless, of course, you are reducing dimensionality for data visualization — in that case you will +generally want to reduce the dimensionality down to 2 or 3. +The following code computes PCA without reducing dimensionality, then computes the minimum number +of dimensions required to preserve 95% of the training set’s variance: +!bc pycod +pca = PCA() +pca.fit(X) +cumsum = np.cumsum(pca.explained_variance_ratio_) +d = np.argmax(cumsum >= 0.95) + 1 +!ec +You could then set $n\_components=d$ and run PCA again. However, there is a much better option: instead +of specifying the number of principal components you want to preserve, you can set $n\_components$ to be +a float between 0.0 and 1.0, indicating the ratio of variance you wish to preserve: +!bc pycod +pca = PCA(n_components=0.95) +X_reduced = pca.fit_transform(X) +!ec + + +===== Incremental PCA ===== + +One problem with the preceding implementation of PCA is that it requires the whole training set to fit in +memory in order for the SVD algorithm to run. Fortunately, Incremental PCA (IPCA) algorithms have +been developed: you can split the training set into mini-batches and feed an IPCA algorithm one minibatch +at a time. This is useful for large training sets, and also to apply PCA online (i.e., on the fly, as new +instances arrive). + + +===== Randomized PCA ===== + +Scikit-Learn offers yet another option to perform PCA, called Randomized PCA. This is a stochastic +algorithm that quickly finds an approximation of the first d principal components. Its computational +complexity is $O(m \times d^2)+O(d^3)$, instead of $O(m \times n^2) + O(n^3)$, so it is dramatically faster than the +previous algorithms when $d$ is much smaller than $n$. + + + + + +===== Kernel PCA ===== +!bblock + +The kernel trick is a mathematical technique that implicitly maps instances into a +very high-dimensional space (called the feature space), enabling nonlinear classification and regression +with Support Vector Machines. Recall that a linear decision boundary in the high-dimensional feature +space corresponds to a complex nonlinear decision boundary in the original space. +It turns out that the same trick can be applied to PCA, making it possible to perform complex nonlinear +projections for dimensionality reduction. This is called Kernel PCA (kPCA). It is often good at +preserving clusters of instances after projection, or sometimes even unrolling datasets that lie close to a +twisted manifold. +For example, the following code uses Scikit-Learn’s KernelPCA class to perform kPCA with an +!bc pycod +from sklearn.decomposition import KernelPCA +rbf_pca = KernelPCA(n_components = 2, kernel="rbf", gamma=0.04) +X_reduced = rbf_pca.fit_transform(X) +!ec + +!eblock + + + +===== LLE ===== + +Locally Linear Embedding (LLE) is another very powerful nonlinear dimensionality reduction +(NLDR) technique. It is a Manifold Learning technique that does not rely on projections like the previous +algorithms. In a nutshell, LLE works by first measuring how each training instance linearly relates to its +closest neighbors (c.n.), and then looking for a low-dimensional representation of the training set where +these local relationships are best preserved (more details shortly). + + + + +===== Other techniques ===== + + +There are many other dimensionality reduction techniques, several of which are available in Scikit-Learn. + +Here are some of the most popular: +* _Multidimensional Scaling (MDS)_ reduces dimensionality while trying to preserve the distances between the instances. +* _Isomap_ creates a graph by connecting each instance to its nearest neighbors, then reduces dimensionality while trying to preserve the geodesic distances between the instances. +* _t-Distributed Stochastic Neighbor Embedding_ (t-SNE) reduces dimensionality while trying to keep similar instances close and dissimilar instances apart. It is mostly used for visualization, in particular to visualize clusters of instances in high-dimensional space (e.g., to visualize the MNIST images in 2D). +* Linear Discriminant Analysis (LDA) is actually a classification algorithm, but during training it learns the most discriminative axes between the classes, and these axes can then be used to define a hyperplane onto which to project the data. The benefit is that the projection will keep classes as far apart as possible, so LDA is a good technique to reduce dimensionality before running another classification algorithm such as a Support Vector Machine (SVM) classifier discussed in the SVM lectures. + + diff --git a/doc/src/DimRed/chapter8.do.txt~ b/doc/src/DimRed/chapter8.do.txt~ new file mode 100644 index 000000000..c6fd2f3c8 --- /dev/null +++ b/doc/src/DimRed/chapter8.do.txt~ @@ -0,0 +1,1267 @@ +TITLE: Data Analysis and Machine Learning: Preprocessing and Dimensionality Reduction +AUTHOR: Morten Hjorth-Jensen {copyright, 1999-present|CC BY-NC} at Department of Physics, University of Oslo & Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University +DATE: today + + +!split +===== Reducing the number of degrees of freedom, overarching view ===== +!bblock + +Many Machine Learning problems involve thousands or even millions of +features for each training instance. Not only does this make training +extremely slow, it can also make it much harder to find a good +solution, as we will see. This problem is often referred to as the +curse of dimensionality. Fortunately, in real-world problems, it is +often possible to reduce the number of features considerably, turning +an intractable problem into a tractable one. + +Here we will discuss some of the most popular dimensionality reduction +techniques: the principal component analysis (PCA), Kernel PCA, and +Locally Linear Embedding (LLE). Furthermore, we will start by looking +at some simple preprocessing of the data which allow us to rescale the +data. + +Principal component analysis and its various variants deal with the +problem of fitting a low-dimensional "affine +subspace":"https://en.wikipedia.org/wiki/Affine_space" to a set of of +data points in a high-dimensional space. With its family of methods it +is one of the most used tools in data modeling, compression and +visualization. + +!eblock + + +!split +===== Preprocessing our data ===== +!bblock + +Before we proceed however, we will discuss how to preprocess our +data. Till now and in connection with our previous examples we have +not met so many cases where we are too sensitive to the scaling of our +data. Normally the data may need a rescaling and/or may be sensitive +to extreme values. Scaling the data renders our inputs much more +suitable for the algorithms we want to employ. + +_Scikit-Learn_ has several functions which allow us to rescale the +data, normally resulting in much better results in terms of various +accuracy scores. The _StandardScaler_ function in _Scikit-Learn_ +ensures that for each feature/predictor we study the mean value is +zero and the variance is one (every column in the design/feature +matrix). This scaling has the drawback that it does not ensure that +we have a particular maximum or minimum in our data set. Another +function included in _Scikit-Learn_ is the _MinMaxScaler_ which +ensures that all features are exactly between $0$ and $1$. The + +!split +===== More preprocessing ===== + + +The _Normalizer_ scales each data +point such that the feature vector has a euclidean length of one. In other words, it +projects a data point on the circle (or sphere in the case of higher dimensions) with a +radius of 1. This means every data point is scaled by a different number (by the +inverse of it’s length). +This normalization is often used when only the direction (or angle) of the data matters, +not the length of the feature vector. + +The _RobustScaler_ works similarly to the StandardScaler in that it +ensures statistical properties for each feature that guarantee that +they are on the same scale. However, the RobustScaler uses the median +and quartiles, instead of mean and variance. This makes the +RobustScaler ignore data points that are very different from the rest +(like measurement errors). These odd data points are also called +outliers, and might often lead to trouble for other scaling +techniques. + +!eblock + +!split +===== Simple preprocessing examples, Franke function and regression ===== + +!bc pycod +# Common imports +import os +import numpy as np +import pandas as pd +import matplotlib.pyplot as plt +import sklearn.linear_model as skl +from sklearn.metrics import mean_squared_error +from sklearn.model_selection import train_test_split +from sklearn.preprocessing import MinMaxScaler, StandardScaler, Normalizer +from sklearn.svm import SVR + +# Where to save the figures and data files +PROJECT_ROOT_DIR = "Results" +FIGURE_ID = "Results/FigureFiles" +DATA_ID = "DataFiles/" + +if not os.path.exists(PROJECT_ROOT_DIR): + os.mkdir(PROJECT_ROOT_DIR) + +if not os.path.exists(FIGURE_ID): + os.makedirs(FIGURE_ID) + +if not os.path.exists(DATA_ID): + os.makedirs(DATA_ID) + +def image_path(fig_id): + return os.path.join(FIGURE_ID, fig_id) + +def data_path(dat_id): + return os.path.join(DATA_ID, dat_id) + +def save_fig(fig_id): + plt.savefig(image_path(fig_id) + ".png", format='png') + + +def FrankeFunction(x,y): + term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2)) + term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1)) + term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2)) + term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2) + return term1 + term2 + term3 + term4 + + +def create_X(x, y, n ): + if len(x.shape) > 1: + x = np.ravel(x) + y = np.ravel(y) + + N = len(x) + l = int((n+1)*(n+2)/2) # Number of elements in beta + X = np.ones((N,l)) + + for i in range(1,n+1): + q = int((i)*(i+1)/2) + for k in range(i+1): + X[:,q+k] = (x**(i-k))*(y**k) + + return X + + +# Making meshgrid of datapoints and compute Franke's function +n = 5 +N = 1000 +x = np.sort(np.random.uniform(0, 1, N)) +y = np.sort(np.random.uniform(0, 1, N)) +z = FrankeFunction(x, y) +X = create_X(x, y, n=n) +# split in training and test data +X_train, X_test, y_train, y_test = train_test_split(X,z,test_size=0.2) + + +svm = SVR(gamma='auto',C=10.0) +svm.fit(X_train, y_train) + +# The mean squared error and R2 score +print("MSE before scaling: {:.2f}".format(mean_squared_error(svm.predict(X_test), y_test))) +print("R2 score before scaling {:.2f}".format(svm.score(X_test,y_test))) + +scaler = StandardScaler() +scaler.fit(X_train) +X_train_scaled = scaler.transform(X_train) +X_test_scaled = scaler.transform(X_test) + +print("Feature min values before scaling:\n {}".format(X_train.min(axis=0))) +print("Feature max values before scaling:\n {}".format(X_train.max(axis=0))) + +print("Feature min values after scaling:\n {}".format(X_train_scaled.min(axis=0))) +print("Feature max values after scaling:\n {}".format(X_train_scaled.max(axis=0))) + +svm = SVR(gamma='auto',C=10.0) +svm.fit(X_train_scaled, y_train) + +print("MSE after scaling: {:.2f}".format(mean_squared_error(svm.predict(X_test_scaled), y_test))) +print("R2 score for scaled data: {:.2f}".format(svm.score(X_test_scaled,y_test))) + +!ec + + + +!split +===== Simple preprocessing examples, breast cancer data and classification, Support Vector Machines ===== + +We show here how we can use a simple regression case on the breast +cancer data using support vector machines (SVM) as algorithm for +classification. + + +!bc pycod +import matplotlib.pyplot as plt +import numpy as np +from sklearn.model_selection import train_test_split +from sklearn.datasets import load_breast_cancer +from sklearn.svm import SVC +cancer = load_breast_cancer() + +X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0) +print(X_train.shape) +print(X_test.shape) + +svm = SVC(C=100) +svm.fit(X_train, y_train) +print("Test set accuracy: {:.2f}".format(svm.score(X_test,y_test))) + +from sklearn.preprocessing import MinMaxScaler, StandardScaler +scaler = MinMaxScaler() +scaler.fit(X_train) +X_train_scaled = scaler.transform(X_train) +X_test_scaled = scaler.transform(X_test) + +print("Feature min values before scaling:\n {}".format(X_train.min(axis=0))) +print("Feature max values before scaling:\n {}".format(X_train.max(axis=0))) + +print("Feature min values before scaling:\n {}".format(X_train_scaled.min(axis=0))) +print("Feature max values before scaling:\n {}".format(X_train_scaled.max(axis=0))) + + +svm.fit(X_train_scaled, y_train) +print("Test set accuracy scaled data with Min-Max scaling: {:.2f}".format(svm.score(X_test_scaled,y_test))) + +scaler = StandardScaler() +scaler.fit(X_train) +X_train_scaled = scaler.transform(X_train) +X_test_scaled = scaler.transform(X_test) + +svm.fit(X_train_scaled, y_train) +print("Test set accuracy scaled data with Standar Scaler: {:.2f}".format(svm.score(X_test_scaled,y_test))) + +!ec + +!split +===== More on Cancer Data, now with Logistic Regression ===== + + +!bc pycod +import matplotlib.pyplot as plt +import numpy as np +from sklearn.model_selection import train_test_split +from sklearn.datasets import load_breast_cancer +from sklearn.linear_model import LogisticRegression +cancer = load_breast_cancer() + +# Set up training data +X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0) +logreg = LogisticRegression() +logreg.fit(X_train, y_train) +print("Test set accuracy: {:.2f}".format(logreg.score(X_test,y_test))) + +# Scale data +from sklearn.preprocessing import StandardScaler +scaler = StandardScaler() +scaler.fit(X_train) +X_train_scaled = scaler.transform(X_train) +X_test_scaled = scaler.transform(X_test) +logreg.fit(X_train_scaled, y_train) +print("Test set accuracy scaled data: {:.2f}".format(logreg.score(X_test_scaled,y_test))) + +!ec + + + + +!split +===== Why should we think of reducing the dimensionality ===== + +In addition to the plot of the features, we study now also the covariance (and the correlation matrix). +We use also _Pandas_ to compute the correlation matrix. +!bc pycod +import matplotlib.pyplot as plt +import numpy as np +from sklearn.model_selection import train_test_split +from sklearn.datasets import load_breast_cancer +from sklearn.linear_model import LogisticRegression +cancer = load_breast_cancer() +import pandas as pd +# Making a data frame +cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names) + +fig, axes = plt.subplots(15,2,figsize=(10,20)) +malignant = cancer.data[cancer.target == 0] +benign = cancer.data[cancer.target == 1] +ax = axes.ravel() + +for i in range(30): + _, bins = np.histogram(cancer.data[:,i], bins =50) + ax[i].hist(malignant[:,i], bins = bins, alpha = 0.5) + ax[i].hist(benign[:,i], bins = bins, alpha = 0.5) + ax[i].set_title(cancer.feature_names[i]) + ax[i].set_yticks(()) +ax[0].set_xlabel("Feature magnitude") +ax[0].set_ylabel("Frequency") +ax[0].legend(["Malignant", "Benign"], loc ="best") +fig.tight_layout() +plt.show() + +import seaborn as sns +correlation_matrix = cancerpd.corr().round(1) +# use the heatmap function from seaborn to plot the correlation matrix +# annot = True to print the values inside the square +sns.heatmap(data=correlation_matrix, annot=True) +plt.show() + +#print eigvalues of correlation matrix +EigValues, EigVectors = np.linalg.eig(correlation_matrix) +print(EigValues) +!ec + +In the above example we note two things. In the first plot we display +the overlap of benign and malignant tumors as functions of the various +features in the Wisconsing breast cancer data set. We see that for +some of the features we can distinguish clearly the benign and +malignant cases while for other features we cannot. This can point to +us which features may be of greater interest when we wish to classify +a benign or not benign tumour. + +In the second figure we have computed the so-called correlation +matrix, which in our case with thirty features becomes a $30\times 30$ +matrix. + +We constructed this matrix using _pandas_ via the statements +!bc pycod +cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names) +!ec +and then +!bc pycod +correlation_matrix = cancerpd.corr().round(1) +!ec + +Diagonalizing this matrix we can in turn say something about which +features are of relevance and which are not. But before we proceed we +need to define covariance and correlation matrices. This leads us to +the classical Principal Component Analysis (PCA) theorem with +applications. + + + +!split +===== Basic ideas of the Principal Component Analysis (PCA) ===== + +The principal component analysis deals with the problem of fitting a +low-dimensional affine subspace $S$ of dimension $d$ much smaller than +the totaldimension $D$ of the problem at hand (our data +set). Mathematically it can be formulated as a statistical problem or +a geometric problem. In our discussion of the theorem for the +classical PCA, we will stay with a statistical approach. This is also +what set the scene historically which for the PCA. + +We have a data set defined by a design/feature matrix $\bm{X}$ (see below for its definition) +* Each data point is determined by $p$ extrinsic (measurement) variables +* We may want to ask the following question: Are there fewer intrinsic variables (say $d << p$) that still approximately describe the data? +* If so, these intrinsic variables may tell us something important and finding these intrinsic variables is what dimension reduction methods do. + + +!split +===== Introducing the Covariance and Correlation functions ===== + +Before we discuss the PCA theorem, we need to remind ourselves about +the definition of the covariance and the correlation function. These are quantities + +Suppose we have defined two vectors +$\hat{x}$ and $\hat{y}$ with $n$ elements each. The covariance matrix $\bm{C}$ is defined as +!bt +\[ +\bm{C}[\bm{x},\bm{y}] = \begin{bmatrix} \mathrm{cov}[\bm{x},\bm{x}] & \mathrm{cov}[\bm{x},\bm{y}] \\ + \mathrm{cov}[\bm{y},\bm{x}] & \mathrm{cov}[\bm{y},\bm{y}] \\ + \end{bmatrix}, +\] +!et +where for example +!bt +\[ +\mathrm{cov}[\bm{x},\bm{y}] =\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})(y_i- \overline{y}). +\] +!et +With this definition and recalling that the variance is defined as +!bt +\[ +\mathrm{var}[\bm{x}]=\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})^2, +\] +!et +we can rewrite the covariance matrix as +!bt +\[ +\bm{C}[\bm{x},\bm{y}] = \begin{bmatrix} \mathrm{var}[\bm{x}] & \mathrm{cov}[\bm{x},\bm{y}] \\ + \mathrm{cov}[\bm{x},\bm{y}] & \mathrm{var}[\bm{y}] \\ + \end{bmatrix}. +\] +!et + +The covariance takes values between zero and infinity and may thus +lead to problems with loss of numerical precision for particularly +large values. It is common to scale the covariance matrix by +introducing instead the correlation matrix defined via the so-called +correlation function + +!bt +\[ +\mathrm{corr}[\bm{x},\bm{y}]=\frac{\mathrm{cov}[\bm{x},\bm{y}]}{\sqrt{\mathrm{var}[\bm{x}] \mathrm{var}[\bm{y}]}}. +\] +!et + +The correlation function is then given by values $\mathrm{corr}[\bm{x},\bm{y}] +\in [-1,1]$. This avoids eventual problems with too large values. We +can then define the correlation matrix for the two vectors $\bm{x}$ +and $\bm{y}$ as + +!bt +\[ +\bm{K}[\bm{x},\bm{y}] = \begin{bmatrix} 1 & \mathrm{corr}[\bm{x},\bm{y}] \\ + \mathrm{corr}[\bm{y},\bm{x}] & 1 \\ + \end{bmatrix}, +\] +!et + +In the above example this is the function we constructed using _pandas_. + +!split +===== Correlation Function and Design/Feature Matrix ===== + +In our derivation of the various regression algorithms like _Ordinary Least Squares_ or _Ridge regression_ +we defined the design/feature matrix $\bm{X}$ as + +!bt +\[ +\bm{X}=\begin{bmatrix} +x_{0,0} & x_{0,1} & x_{0,2}& \dots & \dots x_{0,p-1}\\ +x_{1,0} & x_{1,1} & x_{1,2}& \dots & \dots x_{1,p-1}\\ +x_{2,0} & x_{2,1} & x_{2,2}& \dots & \dots x_{2,p-1}\\ +\dots & \dots & \dots & \dots \dots & \dots \\ +x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \dots & \dots x_{n-2,p-1}\\ +x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \dots & \dots x_{n-1,p-1}\\ +\end{bmatrix}, +\] +!et +with $\bm{X}\in {\mathbb{R}}^{n\times p}$, with the predictors/features $p$ refering to the column numbers and the +entries $n$ being the row elements. +We can rewrite the design/feature matrix in terms of its column vectors as +!bt +\[ +\bm{X}=\begin{bmatrix} \bm{x}_0 & \bm{x}_1 & \bm{x}_2 & \dots & \dots & \bm{x}_{p-1}\end{bmatrix}, +\] +!et +with a given vector +!bt +\[ +\bm{x}_i^T = \begin{bmatrix}x_{0,i} & x_{1,i} & x_{2,i}& \dots & \dots x_{n-1,i}\end{bmatrix}. +\] +!et + +With these definitions, we can now rewrite our $2\times 2$ +correaltion/covariance matrix in terms of a moe general design/feature +matrix $\bm{X}\in {\mathbb{R}}^{n\times p}$. This leads to a $p\times p$ +covariance matrix for the vectors $\bm{x}_i$ with $i=0,1,\dots,p-1$ + +!bt +\[ +\bm{C}[\bm{x}] = \begin{bmatrix} +\mathrm{var}[\bm{x}_0] & \mathrm{cov}[\bm{x}_0,\bm{x}_1] & \mathrm{cov}[\bm{x}_0,\bm{x}_2] & \dots & \dots & \mathrm{cov}[\bm{x}_0,\bm{x}_{p-1}]\\ +\mathrm{cov}[\bm{x}_1,\bm{x}_0] & \mathrm{var}[\bm{x}_1] & \mathrm{cov}[\bm{x}_1,\bm{x}_2] & \dots & \dots & \mathrm{cov}[\bm{x}_1,\bm{x}_{p-1}]\\ +\mathrm{cov}[\bm{x}_2,\bm{x}_0] & \mathrm{cov}[\bm{x}_2,\bm{x}_1] & \mathrm{var}[\bm{x}_2] & \dots & \dots & \mathrm{cov}[\bm{x}_2,\bm{x}_{p-1}]\\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\mathrm{cov}[\bm{x}_{p-1},\bm{x}_0] & \mathrm{cov}[\bm{x}_{p-1},\bm{x}_1] & \mathrm{cov}[\bm{x}_{p-1},\bm{x}_{2}] & \dots & \dots & \mathrm{var}[\bm{x}_{p-1}]\\ +\end{bmatrix}, +\] +!et +and the correlation matrix +!bt +\[ +\bm{K}[\bm{x}] = \begin{bmatrix} +1 & \mathrm{corr}[\bm{x}_0,\bm{x}_1] & \mathrm{corr}[\bm{x}_0,\bm{x}_2] & \dots & \dots & \mathrm{corr}[\bm{x}_0,\bm{x}_{p-1}]\\ +\mathrm{corr}[\bm{x}_1,\bm{x}_0] & 1 & \mathrm{corr}[\bm{x}_1,\bm{x}_2] & \dots & \dots & \mathrm{corr}[\bm{x}_1,\bm{x}_{p-1}]\\ +\mathrm{corr}[\bm{x}_2,\bm{x}_0] & \mathrm{corr}[\bm{x}_2,\bm{x}_1] & 1 & \dots & \dots & \mathrm{corr}[\bm{x}_2,\bm{x}_{p-1}]\\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\mathrm{corr}[\bm{x}_{p-1},\bm{x}_0] & \mathrm{corr}[\bm{x}_{p-1},\bm{x}_1] & \mathrm{corr}[\bm{x}_{p-1},\bm{x}_{2}] & \dots & \dots & 1\\ +\end{bmatrix}, +\] +!et + + +!split +===== Covariance Matrix Examples ===== + + +The Numpy function _np.cov_ calculates the covariance elements using +the factor $1/(n-1)$ instead of $1/n$ since it assumes we do not have +the exact mean values. The following simple function uses the +_np.vstack_ function which takes each vector of dimension $1\times n$ +and produces a $2\times n$ matrix $\bm{W}$ + + +!bt +\[ +\bm{W} = \begin{bmatrix} x_0 & y_0 \\ + x_1 & y_1 \\ + x_2 & y_2\\ + \dots & \dots \\ + x_{n-2} & y_{n-2}\\ + x_{n-1} & y_{n-1} & + \end{bmatrix}, +\] +!et + +which in turn is converted into into the $2\times 2$ covariance matrix +$\bm{C}$ via the Numpy function _np.cov()_. We note that we can also calculate +the mean value of each set of samples $\bm{x}$ etc using the Numpy +function _np.mean(x)_. We can also extract the eigenvalues of the +covariance matrix through the _np.linalg.eig()_ function. + +!bc pycod +# Importing various packages +import numpy as np +n = 100 +x = np.random.normal(size=n) +print(np.mean(x)) +y = 4+3*x+np.random.normal(size=n) +print(np.mean(y)) +W = np.vstack((x, y)) +C = np.cov(W) +print(C) +!ec + +!split +===== Correlation Matrix ===== + +The previous example can be converted into the correlation matrix by +simply scaling the matrix elements with the variances. We should also +subtract the mean values for each column. This leads to the following +code which sets up the correlations matrix for the previous example in +a more brute force way. Here we scale the mean values for each column of the design matrix, calculate the relevant mean values and variances and then finally set up the $2\times 2$ correlation matrix (since we have only two vectors). + +!bc pycod +import numpy as np +n = 100 +# define two vectors +x = np.random.random(size=n) +y = 4+3*x+np.random.normal(size=n) +#scaling the x and y vectors +x = x - np.mean(x) +y = y - np.mean(y) +variance_x = np.sum(x@x)/n +variance_y = np.sum(y@y)/n +print(variance_x) +print(variance_y) +cov_xy = np.sum(x@y)/n +cov_xx = np.sum(x@x)/n +cov_yy = np.sum(y@y)/n +C = np.zeros((2,2)) +C[0,0]= cov_xx/variance_x +C[1,1]= cov_yy/variance_y +C[0,1]= cov_xy/np.sqrt(variance_y*variance_x) +C[1,0]= C[0,1] +print(C) +!ec + +We see that the matrix elements along the diagonal are one as they +should be and that the matrix is symmetric. Furthermore, diagonalizing +this matrix we easily see that it is a positive definite matrix. + +The above procedure with _numpy_ can be made more compact if we use _pandas_. + +!split +===== Correlation Matrix with Pandas ===== + +We whow here how we can set up the correlation matrix using _pandas_, as done in this simple code +!bc pycod +import numpy as np +import pandas as pd +n = 10 +x = np.random.normal(size=n) +x = x - np.mean(x) +y = 4+3*x+np.random.normal(size=n) +y = y - np.mean(y) +X = (np.vstack((x, y))).T +print(X) +Xpd = pd.DataFrame(X) +print(Xpd) +correlation_matrix = Xpd.corr() +print(correlation_matrix) +!ec + + +We expand this model to the Franke function discussed above. + +!split +===== Correlation Matrix with Pandas and the Franke function ===== + +!bc pycod +# Common imports +import numpy as np +import pandas as pd + + +def FrankeFunction(x,y): + term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2)) + term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1)) + term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2)) + term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2) + return term1 + term2 + term3 + term4 + + +def create_X(x, y, n ): + if len(x.shape) > 1: + x = np.ravel(x) + y = np.ravel(y) + + N = len(x) + l = int((n+1)*(n+2)/2) # Number of elements in beta + X = np.ones((N,l)) + + for i in range(1,n+1): + q = int((i)*(i+1)/2) + for k in range(i+1): + X[:,q+k] = (x**(i-k))*(y**k) + + return X + + +# Making meshgrid of datapoints and compute Franke's function +n = 4 +N = 100 +x = np.sort(np.random.uniform(0, 1, N)) +y = np.sort(np.random.uniform(0, 1, N)) +z = FrankeFunction(x, y) +X = create_X(x, y, n=n) + +Xpd = pd.DataFrame(X) +# subtract the mean values and set up the covariance matrix +Xpd = Xpd - Xpd.mean() +covariance_matrix = Xpd.cov() +print(covariance_matrix) +!ec + +We note here that the covariance is zero for the first rows and +columns since all matrix elements in the design matrix were set to one +(we are fitting the function in terms of a polynomial of degree $n$). + +This means that the variance for these elements will be zero and will +cause problems when we set up the correlation matrix. We can simply +drop these elements and construct a correlation +matrix without these elements. + + +!split +===== Rewriting the Covariance and/or Correlation Matrix ===== + +We can rewrite the covariance matrix in a more compact form in terms of the design/feature matrix $\bm{X}$ as +!bt +\[ +\bm{C}[\bm{x}] = \frac{1}{n}\bm{X}\bm{X}^T= \mathbb{E}[\bm{X}\bm{X}^T]. +\] +!et + +To see this let us simply look at a design matrix $\bm{X}\in {\mathbb{R}}^{2\times 2}$ +!bt +\[ +\bm{X}=\begin{bmatrix} +x_{00} & x_{01}\\ +x_{10} & x_{11}\\ +\end{bmatrix}=\begin{bmatrix} +\bm{x}_{0} & \bm{x}_{1}\\ +\end{bmatrix}. +\] +!et + +If we then compute the expectation value +!bt +\[ +\mathbb{E}[\bm{X}\bm{X}^T] = \frac{1}{n}\bm{X}\bm{X}^T=\begin{bmatrix} +x_{00}^2+x_{01}^2 & x_{00}x_{10}+x_{01}x_{11}\\ +x_{10}x_{00}+x_{11}x_{01} & x_{10}^2+x_{11}^2\\ +\end{bmatrix}, +\] +!et +which is just +!bt +\[ +\bm{C}[\bm{x}_0,\bm{x}_1] = \bm{C}[\bm{x}]=\begin{bmatrix} \mathrm{var}[\bm{x}_0] & \mathrm{cov}[\bm{x}_0,\bm{x}_1] \\ + \mathrm{cov}[\bm{x}_1,\bm{x}_0] & \mathrm{var}[\bm{x}_1] \\ + \end{bmatrix}, +\] +!et +where we wrote $$\bm{C}[\bm{x}_0,\bm{x}_1] = \bm{C}[\bm{x}]$$ to indicate that this the covariance of the vectors $\bm{x}$ of the design/feature matrix $\bm{X}$. + +It is easy to generalize this to a matrix $\bm{X}\in {\mathbb{R}}^{n\times p}$. + + +!split +===== Towards the PCA theorem ===== + +We have that the covariance matrix (the correlation matrix involves a simple rescaling) is given as +!bt +\[ +\bm{C}[\bm{x}] = \frac{1}{n}\bm{X}\bm{X}^T= \mathbb{E}[\bm{X}\bm{X}^T]. +\] +!et +Let us now assume that we can perform a series of orthogonal transformations where we employ some orthogonal matrices $\bm{S}$. +These matrices are defined as $\bm{S}\in {\mathbb{R}}^{p\times p}$ and obey the orthogonality requirements $\bm{S}\bm{S}^T=\bm{S}^T\bm{S}=\bm{I}$. The matrix can be written out in terms of the column vectors $\bm{s}_i$ as $\bm{S}=[\bm{s}_0,\bm{s}_1,\dots,\bm{s}_{p-1}]$ and $\bm{s}_i \in {\mathbb{R}}^{p}$. + +Assume also that there is a transformation $\bm{S}\bm{C}[\bm{x}]\bm{S}^T=\bm{C}[\bm{y}]$ such that the new matrix $\bm{C}[\bm{y}]$ is diagonal with elements $[\lambda_0,\lambda_1,\lambda_2,\dots,\lambda_{p-1}]$. + +That is we have +!bt +\[ +\bm{C}[\bm{y}] = \mathbb{E}[\bm{S}\bm{X}\bm{X}^T\bm{S}^T]=\bm{S}\bm{C}[\bm{x}]\bm{S}^T, +\] +!et +since the matrix $\bm{S}$ is not a data dependent matrix. Multiplying with $\bm{S}^T$ from the left we have +!bt +\[ +\bm{S}^T\bm{C}[\bm{y}] = \bm{C}[\bm{x}]\bm{S}^T, +\] +!et +and since $\bm{C}[\bm{y}]$ is diagonal we have for a given eigenvalue $i$ of the covariance matrix that + +!bt +\[ +\bm{S}^T_i\lambda_i = \bm{C}[\bm{x}]\bm{S}^T_i. +\] +!et + +In the derivation of the PCA theorem we will assume that the eigenvalues are ordered in descending order, that is +$\lambda_0 > \lambda_1 > \dots > \lambda_{p-1}$. + + +The eigenvalues tell us then how much we need to stretch the +corresponding eigenvectors. Dimensions with large eigenvalues have +thus large variations (large variance) and define therefore useful +dimensions. The data points are more spread out in the direction of +these eigenvectors. Smaller eigenvalues mean on the other hand that +the corresponding eigenvectors are shrunk accordingly and the data +points are tightly bunched together and there is not much variation in +these specific directions. Hopefully then we could leave it out +dimensions where the eigenvalues are very small. If $p$ is very large, +we could then aim at reducing $p$ to $l << p$ and handle only $l$ +features/predictors. + +!split +===== The Algorithm before the Theorem ===== + +Here's how we would proceed in setting up the algorithm for the PCA, see also discussion below here. +* Set up the datapoints for the design/feature matrix $\bm{X}$ with $\bm{X}\in {\mathbb{R}}^{n\times p}$, with the predictors/features $p$ referring to the column numbers and the entries $n$ being the row elements. +!bt +\[ +\bm{X}=\begin{bmatrix} +x_{0,0} & x_{0,1} & x_{0,2}& \dots & \dots x_{0,p-1}\\ +x_{1,0} & x_{1,1} & x_{1,2}& \dots & \dots x_{1,p-1}\\ +x_{2,0} & x_{2,1} & x_{2,2}& \dots & \dots x_{2,p-1}\\ +\dots & \dots & \dots & \dots \dots & \dots \\ +x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \dots & \dots x_{n-2,p-1}\\ +x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \dots & \dots x_{n-1,p-1}\\ +\end{bmatrix}, +\] +!et +* Center the data by subtracting the mean value for each column. This leads to a new matrix $\bm{X}\rightarrow \overline{\bm{X}}$. +* Compute then the covariance/correlation matrix $\mathbb{E}[\overline{\bm{X}}\overline{\bm{X}}^T]$. +* Find the eigenpairs of $\bm{C}$ with eigenvalues $[\lambda_0,\lambda_1,\dots,\lambda_{p-1}]$ and eigenvectors $[\bm{s}_0,\bm{s}_1,\dots,\bm{s}_{p-1}]$. +* Order the eigenvalue (and the eigenvectors accordingly) in order of decreasing eigenvalues. +* Keep only those $l$ eigenvalues larger than a selected threshold value, discarding thus $p-l$ features since we expect small variations in the data here. + + +!split +===== Writing our own PCA code ===== + +We will use a simple example first with two-dimensional data +drawn from a multivariate normal distribution with the following mean and covariance matrix: +!bt +\[ +\mu = (-1,2) \qquad \Sigma = \begin{bmatrix} 4 & 2 \\ +2 & 2 +\end{bmatrix} +\] +!et +Note that the mean refers to each column of data. +We will generate $n = 1000$ points $X = \{ x_1, \ldots, x_N \}$ from +this distribution, and store them in the $1000 \times 2$ matrix $\bm{X}$. + +The following Python code aids in setting up the data and writing out the design matrix. +Note that the function _multivariate_ returns also the covariance discussed above and that it is defined by dividing by $n-1$ instead of $n$. +!bc pycod +import numpy as np +import pandas as pd +import matplotlib.pyplot as plt +from IPython.display import display +n = 10000 +mean = (-1, 2) +cov = [[4, 2], [2, 2]] +X = np.random.multivariate_normal(mean, cov, n) +!ec + +Now we are going to implement the PCA algorithm. We will break it down into various substeps. + +=== Compute the sample mean and center the data === + +The first step of PCA is to compute the sample mean of the data and use it to center the data. Recall that the sample mean is +!bt +\[ +\mu_n = \frac{1}{n} \sum_{i=1}^n x_i +\] +!et +and the mean-centered data $\bar{X} = \{ \bar{x}_1, \ldots, \bar{x}_n \}$ takes the form +!bt +\[ +\bar{x}_i = x_i - \mu_n. +\] +!et +When you are done with these steps, print out $\mu_n$ to verify it is +close to $\mu$ and plot your mean centered data to verify it is +centered at the origin! Compare your code with the functionality from _Scikit-Learn_ discussed above. +The following code elements perform these operations using _pandas_ or using our own functionality for doing so. The latter, using _numpy_ is rather simple through the _mean()_ function. +!bc pycod +df = pd.DataFrame(X) +# Pandas does the centering for us +df = df -df.mean() +# we center it ourselves +X_centered = X - X.mean(axis=0) +!ec + +Alternatively, we could use the functions we discussed +earlier for scaling the data set. That is, we could have used the +_StandardScaler_ function in _Scikit-Learn_, a function which ensures +that for each feature/predictor we study the mean value is zero and +the variance is one (every column in the design/feature matrix). You +would then not get the same results, since we divide by the +variance. The diagonal covariance matrix elements will then be one, +while the non-diagonal ones need to be divided by $2\sqrt{2}$ for our +specific case. + +=== Compute the sample covariance === + +Now we are going to use the mean centered data to compute the sample covariance of the data by using the following equation +!bt +\begin{equation*} +\Sigma_n = \frac{1}{n-1} \sum_{i=1}^n \bar{x}_i^T \bar{x}_i = \frac{1}{n-1} \sum_{i=1}^n (x_i - \mu_n)^T (x_i - \mu_n) +\end{equation*} +!et +where the data points $x_i \in \mathbb{R}^p$ (here in this example $p = 2$) are column vectors and $x^T$ is the transpose of $x$. +We can write our own code or simply use either the functionaly of _numpy_ or that of _pandas_, as follows +!bc pycod +print(df.cov()) +print(np.cov(X_centered.T)) +!ec +Note that the way we define the covariance matrix here has a factor $n-1$ instead of $n$. This is included in the _cov()_ function by _numpy_ and _pandas_. +Our own code here is not very elegant and asks for obvious improvements. It is tailored to this specific $2\times 2$ covariance matrix. +!bc pycod +# extract the relevant columns from the centered design matrix of dim n x 2 +x = X_centered[:,0] +y = X_centered[:,1] +Cov = np.zeros((2,2)) +Cov[0,1] = np.sum(x.T@y)/(n-1.0) +Cov[0,0] = np.sum(x.T@x)/(n-1.0) +Cov[1,1] = np.sum(y.T@y)/(n-1.0) +Cov[1,0]= Cov[0,1] +print("Centered covariance using own code") +print(Cov) +plt.plot(x, y, 'x') +plt.axis('equal') +plt.show() +!ec + +Depending on the number of points $n$, we will get results that are close to the covariance values defined above. +The plot shows how the data are clustered around a line with slope close to one. Is this expected? + +=== Diagonalize the sample covariance matrix to obtain the principal components === + +Now we are ready to solve for the principal components! To do so we +diagonalize the sample covariance matrix $\Sigma$. We can use the +function _np.linalg.eig_ to do so. It will return the eigenvalues and +eigenvectors of $\Sigma$. Once we have these we can perform the +following tasks: + +* We compute the percentage of the total variance captured by the first principal component +* We plot the mean centered data and lines along the first and second principal components +* Then we project the mean centered data onto the first and second principal components, and plot the projected data. +* Finally, we approximate the data as + +!bt +\begin{equation*} +x_i \approx \tilde{x}_i = \mu_n + \langle x_i, v_0 \rangle v_0 +\end{equation*} +!et +where $v_0$ is the first principal component. + +Collecting all these steps we can write our own PCA function and +compare this with the functionality included in _Scikit-Learn_. + +The code here outlines some of the elements we could include in the +analysis. Feel free to extend upon this in order to address the above +questions. + +!bc pycod +# diagonalize and obtain eigenvalues, not necessarily sorted +EigValues, EigVectors = np.linalg.eig(Cov) +# sort eigenvectors and eigenvalues +#permute = EigValues.argsort() +#EigValues = EigValues[permute] +#EigVectors = EigVectors[:,permute] +print("Eigenvalues of Covariance matrix") +for i in range(2): + print(EigValues[i]) +FirstEigvector = EigVectors[:,0] +SecondEigvector = EigVectors[:,1] +print("First eigenvector") +print(FirstEigvector) +print("Second eigenvector") +print(SecondEigvector) +#thereafter we do a PCA with Scikit-learn +from sklearn.decomposition import PCA +pca = PCA(n_components = 2) +X2Dsl = pca.fit_transform(X) +print("Eigenvector of largest eigenvalue") +print(pca.components_.T[:, 0]) + +!ec +This code does not contain all the above elements, but it shows how we can use _Scikit-Learn_ to extract the eigenvector which corresponds to the largest eigenvalue. Try to address the questions we pose before the above code. Try also to change the values of the covariance matrix by making one of the diagonal elements much larger than the other. What do you observe then? + +!split +===== Classical PCA Theorem ===== + +We assume now that we have a design matrix $\bm{X}$ which has been +centered as discussed above. For the sake of simplicity we skip the +overline symbol. The matrix is defined in terms of the various column +vectors $[\bm{x}_0,\bm{x}_1,\dots, \bm{x}_{p-1}]$ each with dimension +$\bm{x}\in {\mathbb{R}}^{n}$. + +We assume also that we have an orthogonal transformation $\bm{W}\in {\mathbb{R}}^{p\times p}$. We define the reconstruction error (which is similar to the mean squared error we have seen before) as +!bt +\[ +J(\bm{W},\bm{Z}) = \frac{1}{n}\sum_i (\bm{x}_i - \overline{\bm{x}}_i)^2, +\] +!et +with $\overline{\bm{x}}_i = \bm{W}\bm{z}_i$, where $\bm{z}_i$ is a row vector with dimension ${\mathbb{R}}^{n}$ of the matrix +$\bm{Z}\in{\mathbb{R}}^{p\times n}$. When doing PCA we want to reduce this dimensionality. + +The PCA theorem states that minimizing the above reconstruction error +corresponds to setting $\bm{W}=\bm{S}$, the orthogonal matrix which +diagonalizes the empirical covariance(correlation) matrix. The optimal +low-dimensional encoding of the data is then given by a set of vectors +$\bm{z}_i$ with at most $l$ vectors, with $l << p$, defined by the +orthogonal projection of the data onto the columns spanned by the +eigenvectors of the covariance(correlations matrix). + +The proof which follows will be updated by mid January 2020. + +!split +===== Proof of the PCA Theorem ===== + +To show the PCA theorem let us start with the assumption that there is one vector $\bm{w}_0$ which corresponds to a solution which minimized the reconstruction error $J$. This is an orthogonal vector. It means that we now approximate the reconstruction error in terms of $\bm{w}_0$ and $\bm{z}_0$ as +!bt +\[ +J(\bm{w}_0,\bm{z}_0)= \frac{1}{n}\sum_i (\bm{x}_i - z_{i0}\bm{w}_0)^2=\frac{1}{n}\sum_i (\bm{x}_i^T\bm{x}_i - 2z_{i0}\bm{w}_0^T\bm{x}_i+z_{i0}^2\bm{w}_0^T\bm{w}_0), +\] +!et +which we can rewrite due to the orthogonality of $\bm{w}_i$ as +!bt +\[ +J(\bm{w}_0,\bm{z}_0)=\frac{1}{n}\sum_i (\bm{x}_i^T\bm{x}_i - 2z_{i0}\bm{w}_0^T\bm{x}_i+z_{i0}^2). +\] +!et +Minimizing $J$ with respect to the unknown parameters $z_{0i}$ we obtain that +!bt +\[ +z_{i0}=\bm{w}_0^T\bm{x}_i, +\] +!et +where the vectors on the rhs are known. + + +!split +===== PCA Proof continued ===== + +We have now found the unknown parameters $z_{i0}$. These correspond to the projected coordinates and we can write +!bt +\[ +J(\bm{w}_0)= \frac{1}{p}\sum_i (\bm{x}_i^T\bm{x}_i - z_{i0}^2)=\mathrm{const}-\frac{1}{n}\sum_i z_{i0}^2. +\] +!et + +We can show that the variance of the projected coordinates defined by $\bm{w}_0^T\bm{x}_i$ are given by +!bt +\[ +\mathrm{var}[\bm{w}_0^T\bm{x}_i] = \frac{1}{n}\sum_i z_{i0}^2, +\] +!et +since the expectation value of +!bt +\[ +\mathbb{E}[\bm{w}_0^T\bm{x}_i] = \mathbb{E}[z_{i0}]= \bm{w}_0^T\mathbb{E}[\bm{x}_i]=0, +\] +!et +where we have used the fact that our data are centered. + +Recalling our definition of the covariance as +!bt +\[ +\bm{C}[\bm{x}] = \frac{1}{n}\bm{X}\bm{X}^T=\mathbb{E}[\bm{X}\bm{X}^T], +\] +!et +we have thus that +!bt +\[ +\mathrm{var}[\bm{w}_0^T\bm{x}_i] = \frac{1}{n}\sum_i z_{i0}^2=\bm{w}_0^T\bm{C}[\bm{x}]\bm{w}_0. +\] +!et + +We are almost there, we have obtained a relation between minimizing +the reconstruction error and the variance and the covariance +matrix. Minimizing the error is equivalent to maximizing the variance +of the projected data. + +!split +===== The final step ===== + +We could trivially maximize the variance of the projection (and +thereby minimize the error in the reconstruction function) by letting +the norm-2 of $\bm{w}_0$ go to infinity. However, this norm since we +want the matrix $\bm{W}$ to be an orthogonal matrix, is constrained by +$\vert\vert \bm{w}_0 \vert\vert_2^2=1$. Imposing this condition via a +Lagrange multiplier we can then in turn maximize + +!bt +\[ +J(\bm{w}_0)= \bm{w}_0^T\bm{C}[\bm{x}]\bm{w}_0+\lambda_0(1-\bm{w}_0^T\bm{w}_0). +\] +!et +Taking the derivative with respect to $\bm{w}_0$ we obtain + +!bt +\[ +\frac{\partial J(\bm{w}_0)}{\partial \bm{w}_0}= 2\bm{C}[\bm{x}]\bm{w}_0-2\lambda_0\bm{w}_0=0, +\] +!et +meaning that +!bt +\[ +\bm{C}[\bm{x}]\bm{w}_0=\lambda_0\bm{w}_0. +\] +!et +_The direction that maximizes the variance (or minimizes the construction error) is an eigenvector of the covariance matrix_! If we left multiply with $\bm{w}_0^T$ we have the variance of the projected data is +!bt +\[ +\bm{w}_0^T\bm{C}[\bm{x}]\bm{w}_0=\lambda_0. +\] +!et + +If we want to maximize the variance (minimize the construction error) +we simply pick the eigenvector of the covariance matrix with the +largest eigenvalue. This establishes the link between the minimization +of the reconstruction function $J$ in terms of an orthogonal matrix +and the maximization of the variance and thereby the covariance of our +observations encoded in the design/feature matrix $\bm{X}$. + +The proof +for the other eigenvectors $\bm{w}_1,\bm{w}_2,\dots$ can be +established by applying the above arguments and using the fact that +our basis of eigenvectors is orthogonal, see "Murphy chapter +12.2":"https://mitpress.mit.edu/books/machine-learning-1". The +discussion in chapter 12.2 of Murphy's text has also a nice link with +the Singular Value Decomposition theorem. For categorical data, see +chapter 12.4 and discussion therein. + +Additional part of the proof for the other eigenvectors will be added by mid January 2020. + +!split +===== Geometric Interpretation and link with Singular Value Decomposition ===== + +This material will be added by mid January 2020. + + +!split +===== Principal Component Analysis ===== + +Principal Component Analysis (PCA) is by far the most popular dimensionality reduction algorithm. +First it identifies the hyperplane that lies closest to the data, and then it projects the data onto it. + +The following Python code uses NumPy’s _svd()_ function to obtain all the principal components of the +training set, then extracts the first two principal components. First we center the data using either _pandas_ or our own code +!bc pycod +import numpy as np +import pandas as pd +from IPython.display import display +np.random.seed(100) +# setting up a 10 x 5 vanilla matrix +rows = 10 +cols = 5 +X = np.random.randn(rows,cols) +df = pd.DataFrame(X) +# Pandas does the centering for us +df = df -df.mean() +display(df) + +# we center it ourselves +X_centered = X - X.mean(axis=0) +# Then check the difference between pandas and our own set up +print(X_centered-df) +#Now we do an SVD +U, s, V = np.linalg.svd(X_centered) +c1 = V.T[:, 0] +c2 = V.T[:, 1] +W2 = V.T[:, :2] +X2D = X_centered.dot(W2) +print(X2D) +!ec + +PCA assumes that the dataset is centered around the origin. Scikit-Learn’s PCA classes take care of centering +the data for you. However, if you implement PCA yourself (as in the preceding example), or if you use other libraries, don’t +forget to center the data first. + +Once you have identified all the principal components, you can reduce the dimensionality of the dataset +down to $d$ dimensions by projecting it onto the hyperplane defined by the first $d$ principal components. +Selecting this hyperplane ensures that the projection will preserve as much variance as possible. +!bc pycod +W2 = V.T[:, :2] +X2D = X_centered.dot(W2) +!ec + +!split +===== PCA and scikit-learn ===== + +Scikit-Learn’s PCA class implements PCA using SVD decomposition just like we did before. The +following code applies PCA to reduce the dimensionality of the dataset down to two dimensions (note +that it automatically takes care of centering the data): +!bc pycod +#thereafter we do a PCA with Scikit-learn +from sklearn.decomposition import PCA +pca = PCA(n_components = 2) +X2D = pca.fit_transform(X) +print(X2D) +!ec +After fitting the PCA transformer to the dataset, you can access the principal components using the +components variable (note that it contains the PCs as horizontal vectors, so, for example, the first +principal component is equal to +!bc pycod +pca.components_.T[:, 0]. +!ec +Another very useful piece of information is the explained variance ratio of each principal component, +available via the $explained\_variance\_ratio$ variable. It indicates the proportion of the dataset’s +variance that lies along the axis of each principal component. + +!split +===== Back to the Cancer Data ===== +We can now repeat the above but applied to real data, in this case our breast cancer data. +Here we compute performance scores on the training data using logistic regression. +!bc pycod +import matplotlib.pyplot as plt +import numpy as np +from sklearn.model_selection import train_test_split +from sklearn.datasets import load_breast_cancer +from sklearn.linear_model import LogisticRegression +cancer = load_breast_cancer() + +X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0) + +logreg = LogisticRegression() +logreg.fit(X_train, y_train) +print("Train set accuracy from Logistic Regression: {:.2f}".format(logreg.score(X_train,y_train))) +# We scale the data +from sklearn.preprocessing import StandardScaler +scaler = StandardScaler() +scaler.fit(X_train) +X_train_scaled = scaler.transform(X_train) +X_test_scaled = scaler.transform(X_test) +# Then perform again a log reg fit +logreg.fit(X_train_scaled, y_train) +print("Train set accuracy scaled data: {:.2f}".format(logreg.score(X_train_scaled,y_train))) +#thereafter we do a PCA with Scikit-learn +from sklearn.decomposition import PCA +pca = PCA(n_components = 2) +X2D_train = pca.fit_transform(X_train_scaled) +# and finally compute the log reg fit and the score on the training data +logreg.fit(X2D_train,y_train) +print("Train set accuracy scaled and PCA data: {:.2f}".format(logreg.score(X2D_train,y_train))) + +!ec + +We see that our training data after the PCA decomposition has a performance similar to the non-scaled data. + +!split +===== More on the PCA ===== + +Instead of arbitrarily choosing the number of dimensions to reduce down to, it is generally preferable to +choose the number of dimensions that add up to a sufficiently large portion of the variance (e.g., 95%). +Unless, of course, you are reducing dimensionality for data visualization — in that case you will +generally want to reduce the dimensionality down to 2 or 3. +The following code computes PCA without reducing dimensionality, then computes the minimum number +of dimensions required to preserve 95% of the training set’s variance: +!bc pycod +pca = PCA() +pca.fit(X) +cumsum = np.cumsum(pca.explained_variance_ratio_) +d = np.argmax(cumsum >= 0.95) + 1 +!ec +You could then set $n\_components=d$ and run PCA again. However, there is a much better option: instead +of specifying the number of principal components you want to preserve, you can set $n\_components$ to be +a float between 0.0 and 1.0, indicating the ratio of variance you wish to preserve: +!bc pycod +pca = PCA(n_components=0.95) +X_reduced = pca.fit_transform(X) +!ec + +!split +===== Incremental PCA ===== + +One problem with the preceding implementation of PCA is that it requires the whole training set to fit in +memory in order for the SVD algorithm to run. Fortunately, Incremental PCA (IPCA) algorithms have +been developed: you can split the training set into mini-batches and feed an IPCA algorithm one minibatch +at a time. This is useful for large training sets, and also to apply PCA online (i.e., on the fly, as new +instances arrive). + +!split +===== Randomized PCA ===== + +Scikit-Learn offers yet another option to perform PCA, called Randomized PCA. This is a stochastic +algorithm that quickly finds an approximation of the first d principal components. Its computational +complexity is $O(m \times d^2)+O(d^3)$, instead of $O(m \times n^2) + O(n^3)$, so it is dramatically faster than the +previous algorithms when $d$ is much smaller than $n$. + + + + +!split +===== Kernel PCA ===== +!bblock + +The kernel trick is a mathematical technique that implicitly maps instances into a +very high-dimensional space (called the feature space), enabling nonlinear classification and regression +with Support Vector Machines. Recall that a linear decision boundary in the high-dimensional feature +space corresponds to a complex nonlinear decision boundary in the original space. +It turns out that the same trick can be applied to PCA, making it possible to perform complex nonlinear +projections for dimensionality reduction. This is called Kernel PCA (kPCA). It is often good at +preserving clusters of instances after projection, or sometimes even unrolling datasets that lie close to a +twisted manifold. +For example, the following code uses Scikit-Learn’s KernelPCA class to perform kPCA with an +!bc pycod +from sklearn.decomposition import KernelPCA +rbf_pca = KernelPCA(n_components = 2, kernel="rbf", gamma=0.04) +X_reduced = rbf_pca.fit_transform(X) +!ec + +!eblock + + +!split +===== LLE ===== + +Locally Linear Embedding (LLE) is another very powerful nonlinear dimensionality reduction +(NLDR) technique. It is a Manifold Learning technique that does not rely on projections like the previous +algorithms. In a nutshell, LLE works by first measuring how each training instance linearly relates to its +closest neighbors (c.n.), and then looking for a low-dimensional representation of the training set where +these local relationships are best preserved (more details shortly). + + + +!split +===== Other techniques ===== + + +There are many other dimensionality reduction techniques, several of which are available in Scikit-Learn. + +Here are some of the most popular: +* _Multidimensional Scaling (MDS)_ reduces dimensionality while trying to preserve the distances between the instances. +* _Isomap_ creates a graph by connecting each instance to its nearest neighbors, then reduces dimensionality while trying to preserve the geodesic distances between the instances. +* _t-Distributed Stochastic Neighbor Embedding_ (t-SNE) reduces dimensionality while trying to keep similar instances close and dissimilar instances apart. It is mostly used for visualization, in particular to visualize clusters of instances in high-dimensional space (e.g., to visualize the MNIST images in 2D). +* Linear Discriminant Analysis (LDA) is actually a classification algorithm, but during training it learns the most discriminative axes between the classes, and these axes can then be used to define a hyperplane onto which to project the data. The benefit is that the projection will keep classes as far apart as possible, so LDA is a good technique to reduce dimensionality before running another classification algorithm such as a Support Vector Machine (SVM) classifier discussed in the SVM lectures. + + diff --git a/doc/src/How2ReadData/chapter3.dlog b/doc/src/How2ReadData/chapter3.dlog new file mode 100644 index 000000000..ed18adf7b --- /dev/null +++ b/doc/src/How2ReadData/chapter3.dlog @@ -0,0 +1,22 @@ +translating doconce text in chapter3.do.txt to ipynb +*** replacing \bm{...} by \boldsymbol{...} (\bm is not supported by MathJax) +collected all required additional files in ipynb-chapter3-src.tar.gz which must be distributed with the notebook +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{bmatrix} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +*** warning: latex envir \begin{cases} does not work well in Markdown. + Stick to \[ ... \], equation, equation*, align, or align* + environments in math environments. + +Failed to remove ans_at_end environment +Failed to remove sol_at_end environment +output in chapter3.ipynb diff --git a/doc/src/How2ReadData/chapter3.do.txt b/doc/src/How2ReadData/chapter3.do.txt new file mode 100644 index 000000000..a5d332464 --- /dev/null +++ b/doc/src/How2ReadData/chapter3.do.txt @@ -0,0 +1,1341 @@ + +======= Getting started, our first data and Machine Learning encounters ======= + +===== Introduction ===== + +Our emphasis throughout this series of lectures +is on understanding the mathematical aspects of +different algorithms used in the fields of data analysis and machine learning. + +However, where possible we will emphasize the +importance of using available software. We start thus with a hands-on +and top-down approach to machine learning. The aim is thus to start with +relevant data or data we have produced +and use these to introduce statistical data analysis +concepts and machine learning algorithms before we delve into the +algorithms themselves. The examples we will use in the beginning, start with simple +polynomials with random noise added. We will use the Python +software package "Scikit-Learn":"http://scikit-learn.org/stable/" and +introduce various machine learning algorithms to make fits of +the data and predictions. We move thereafter to more interesting +cases such as data from say experiments (below we will look at experimental nuclear binding energies as an example). +These are examples where we can easily set up the data and +then use machine learning algorithms included in for example +_Scikit-Learn_. + +These examples will serve us the purpose of getting +started. Furthermore, they allow us to catch more than two birds with +a stone. They will allow us to bring in some programming specific +topics and tools as well as showing the power of various Python +libraries for machine learning and statistical data analysis. + +Here, we will mainly focus on two +specific Python packages for Machine Learning, Scikit-Learn and +Tensorflow (see below for links etc). Moreover, the examples we +introduce will serve as inputs to many of our discussions later, as +well as allowing you to set up models and produce your own data and +get started with programming. + + + +===== What is Machine Learning? ===== + +Statistics, data science and machine learning form important fields of +research in modern science. They describe how to learn and make +predictions from data, as well as allowing us to extract important +correlations about physical process and the underlying laws of motion +in large data sets. The latter, big data sets, appear frequently in +essentially all disciplines, from the traditional Science, Technology, +Mathematics and Engineering fields to Life Science, Law, education +research, the Humanities and the Social Sciences. + +It has become more +and more common to see research projects on big data in for example +the Social Sciences where extracting patterns from complicated survey +data is one of many research directions. Having a solid grasp of data +analysis and machine learning is thus becoming central to scientific +computing in many fields, and competences and skills within the fields +of machine learning and scientific computing are nowadays strongly +requested by many potential employers. The latter cannot be +overstated, familiarity with machine learning has almost become a +prerequisite for many of the most exciting employment opportunities, +whether they are in bioinformatics, life science, physics or finance, +in the private or the public sector. This author has had several +students or met students who have been hired recently based on their +skills and competences in scientific computing and data science, often +with marginal knowledge of machine learning. + +Machine learning is a subfield of computer science, and is closely +related to computational statistics. It evolved from the study of +pattern recognition in artificial intelligence (AI) research, and has +made contributions to AI tasks like computer vision, natural language +processing and speech recognition. Many of the methods we will study are also +strongly rooted in basic mathematics and physics research. + +Ideally, machine learning represents the science of giving computers +the ability to learn without being explicitly programmed. The idea is +that there exist generic algorithms which can be used to find patterns +in a broad class of data sets without having to write code +specifically for each problem. The algorithm will build its own logic +based on the data. You should however always keep in mind that +machines and algorithms are to a large extent developed by humans. The +insights and knowledge we have about a specific system, play a central +role when we develop a specific machine learning algorithm. + +Machine learning is an extremely rich field, in spite of its young +age. The increases we have seen during the last three decades in +computational capabilities have been followed by developments of +methods and techniques for analyzing and handling large date sets, +relying heavily on statistics, computer science and mathematics. The +field is rather new and developing rapidly. Popular software packages +written in Python for machine learning like +"Scikit-learn":"http://scikit-learn.org/stable/", +"Tensorflow":"https://www.tensorflow.org/", +"PyTorch":"http://pytorch.org/" and "Keras":"https://keras.io/", all +freely available at their respective GitHub sites, encompass +communities of developers in the thousands or more. And the number of +code developers and contributors keeps increasing. Not all the +algorithms and methods can be given a rigorous mathematical +justification, opening up thereby large rooms for experimenting and +trial and error and thereby exciting new developments. However, a +solid command of linear algebra, multivariate theory, probability +theory, statistical data analysis, understanding errors and Monte +Carlo methods are central elements in a proper understanding of many +of algorithms and methods we will discuss. + + + +===== Types of Machine Learning ===== + + +The approaches to machine learning are many, but are often split into +two main categories. In *supervised learning* we know the answer to a +problem, and let the computer deduce the logic behind it. On the other +hand, *unsupervised learning* is a method for finding patterns and +relationship in data sets without any prior knowledge of the system. +Some authours also operate with a third category, namely +*reinforcement learning*. This is a paradigm of learning inspired by +behavioral psychology, where learning is achieved by trial-and-error, +solely from rewards and punishment. + +Another way to categorize machine learning tasks is to consider the +desired output of a system. Some of the most common tasks are: + + * Classification: Outputs are divided into two or more classes. The goal is to produce a model that assigns inputs into one of these classes. An example is to identify digits based on pictures of hand-written ones. Classification is typically supervised learning. + + * Regression: Finding a functional relationship between an input data set and a reference data set. The goal is to construct a function that maps input data to continuous output values. + + * Clustering: Data are divided into groups with certain common traits, without knowing the different groups beforehand. It is thus a form of unsupervised learning. + + +The methods we cover have three main topics in common, irrespective of +whether we deal with supervised or unsupervised learning. The first +ingredient is normally our data set (which can be subdivided into +training and test data), the second item is a model which is normally a +function of some parameters. The model reflects our knowledge of the system (or lack thereof). As an example, if we know that our data show a behavior similar to what would be predicted by a polynomial, fitting our data to a polynomial of some degree would then determin our model. + +The last ingredient is a so-called _cost_ +function which allows us to present an estimate on how good our model +is in reproducing the data it is supposed to train. +At the heart of basically all ML algorithms there are so-called minimization algorithms, often we end up with various variants of _gradient_ methods. + + + + + + + +===== Software and needed installations ===== + +We will make extensive use of Python as programming language and its +myriad of available libraries. You will find +Jupyter notebooks invaluable in your work. You can run _R_ +codes in the Jupyter/IPython notebooks, with the immediate benefit of +visualizing your data. You can also use compiled languages like C++, +Rust, Julia, Fortran etc if you prefer. The focus in these lectures will be +on Python. + + +If you have Python installed (we strongly recommend Python3) and you feel +pretty familiar with installing different packages, we recommend that +you install the following Python packages via _pip_ as + +o pip install numpy scipy matplotlib ipython scikit-learn mglearn sympy pandas pillow + +For Python3, replace _pip_ with _pip3_. + +For OSX users we recommend, after having installed Xcode, to +install _brew_. Brew allows for a seamless installation of additional +software via for example + +o brew install python3 + +For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution, +you can use _pip_ as well and simply install Python as + +o sudo apt-get install python3 (or python for pyhton2.7) + +etc etc. + + + +===== Python installers ===== + +If you don't want to perform these operations separately and venture +into the hassle of exploring how to set up dependencies and paths, we +recommend two widely used distrubutions which set up all relevant +dependencies for Python, namely + +* "Anaconda":"https://docs.anaconda.com/", + +which is an open source +distribution of the Python and R programming languages for large-scale +data processing, predictive analytics, and scientific computing, that +aims to simplify package management and deployment. Package versions +are managed by the package management system _conda_. + +* "Enthought canopy":"https://www.enthought.com/product/canopy/" + +is a Python +distribution for scientific and analytic computing distribution and +analysis environment, available for free and under a commercial +license. + +Furthermore, "Google's Colab":"https://colab.research.google.com/notebooks/welcome.ipynb" is a free Jupyter notebook environment that requires +no setup and runs entirely in the cloud. Try it out! + +===== Useful Python libraries ===== +Here we list several useful Python libraries we strongly recommend (if you use anaconda many of these are already there) + +* "NumPy":"https://www.numpy.org/" is a highly popular library for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays +* "The pandas":"https://pandas.pydata.org/" library provides high-performance, easy-to-use data structures and data analysis tools +* "Xarray":"http://xarray.pydata.org/en/stable/" is a Python package that makes working with labelled multi-dimensional arrays simple, efficient, and fun! +* "Scipy":"https://www.scipy.org/" (pronounced “Sigh Pie”) is a Python-based ecosystem of open-source software for mathematics, science, and engineering. +* "Matplotlib":"https://matplotlib.org/" is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. +* "Autograd":"https://github.com/HIPS/autograd" can automatically differentiate native Python and Numpy code. It can handle a large subset of Python's features, including loops, ifs, recursion and closures, and it can even take derivatives of derivatives of derivatives +* "SymPy":"https://www.sympy.org/en/index.html" is a Python library for symbolic mathematics. +* "scikit-learn":"https://scikit-learn.org/stable/" has simple and efficient tools for machine learning, data mining and data analysis +* "TensorFlow":"https://www.tensorflow.org/" is a Python library for fast numerical computing created and released by Google +* "Keras":"https://keras.io/" is a high-level neural networks API, written in Python and capable of running on top of TensorFlow, CNTK, or Theano +* And many more such as "pytorch":"https://pytorch.org/", "Theano":"https://pypi.org/project/Theano/" etc + +===== Installing R, C++, cython or Julia ===== + +You will also find it convenient to utilize _R_. We will mainly +use Python during our lectures and in various projects and exercises. +Those of you +already familiar with _R_ should feel free to continue using _R_, keeping +however an eye on the parallel Python set ups. Similarly, if you are a +Python afecionado, feel free to explore _R_ as well. Jupyter/Ipython +notebook allows you to run _R_ codes interactively in your +browser. The software library _R_ is really tailored for statistical data analysis +and allows for an easy usage of the tools and algorithms we will discuss in these +lectures. + +To install _R_ with Jupyter notebook +"follow the link here":"https://mpacer.org/maths/r-kernel-for-ipython-notebook" + + + + +===== Installing R, C++, cython, Numba etc ===== + + +For the C++ aficionados, Jupyter/IPython notebook allows you also to +install C++ and run codes written in this language interactively in +the browser. Since we will emphasize writing many of the algorithms +yourself, you can thus opt for either Python or C++ (or Fortran or other compiled languages) as programming +languages. + +To add more entropy, _cython_ can also be used when running your +notebooks. It means that Python with the jupyter notebook +setup allows you to integrate widely popular softwares and tools for +scientific computing. Similarly, the +"Numba Python package":"https://numba.pydata.org/" delivers increased performance +capabilities with minimal rewrites of your codes. With its +versatility, including symbolic operations, Python offers a unique +computational environment. Your jupyter notebook can easily be +converted into a nicely rendered _PDF_ file or a Latex file for +further processing. For example, convert to latex as + +!bc +pycod jupyter nbconvert filename.ipynb --to latex +!ec + +And to add more versatility, the Python package "SymPy":"http://www.sympy.org/en/index.html" is a Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) and is entirely written in Python. + +Finally, if you wish to use the light mark-up language +"doconce":"https://github.com/hplgit/doconce" you can convert a standard ascii text file into various HTML +formats, ipython notebooks, latex files, pdf files etc with minimal edits. These lectures were generated using _doconce_. + + + +===== Numpy examples and Important Matrix and vector handling packages ===== + +There are several central software libraries for linear algebra and eigenvalue problems. Several of the more +popular ones have been wrapped into ofter software packages like those from the widely used text _Numerical Recipes_. The original source codes in many of the available packages are often taken from the widely used +software package LAPACK, which follows two other popular packages +developed in the 1970s, namely EISPACK and LINPACK. We describe them shortly here. + + * LINPACK: package for linear equations and least square problems. + * LAPACK:package for solving symmetric, unsymmetric and generalized eigenvalue problems. From LAPACK's website URL: "http://www.netlib.org" it is possible to download for free all source codes from this library. Both C/C++ and Fortran versions are available. + * BLAS (I, II and III): (Basic Linear Algebra Subprograms) are routines that provide standard building blocks for performing basic vector and matrix operations. Blas I is vector operations, II vector-matrix operations and III matrix-matrix operations. Highly parallelized and efficient codes, all available for download from URL: "http://www.netlib.org". + + +===== Basic Matrix Features ===== + +!bblock Matrix properties reminder +!bt +\[ + \mathbf{A} = + \begin{bmatrix} a_{11} & a_{12} & a_{13} & a_{14} \\ + a_{21} & a_{22} & a_{23} & a_{24} \\ + a_{31} & a_{32} & a_{33} & a_{34} \\ + a_{41} & a_{42} & a_{43} & a_{44} + \end{bmatrix}\qquad +\mathbf{I} = + \begin{bmatrix} 1 & 0 & 0 & 0 \\ + 0 & 1 & 0 & 0 \\ + 0 & 0 & 1 & 0 \\ + 0 & 0 & 0 & 1 + \end{bmatrix} +\] +!et + + + +The inverse of a matrix is defined by + +!bt +\[ +\mathbf{A}^{-1} \cdot \mathbf{A} = I +\] +!et + + +|----------------------------------------------------------------------| +| Relations | Name | matrix elements | +|----------------------------------------------------------------------| +| $A = A^{T}$ | symmetric | $a_{ij} = a_{ji}$ | +| $A = \left (A^{T} \right )^{-1}$ | real orthogonal | $\sum_k a_{ik} a_{jk} = \sum_k a_{ki} a_{kj} = \delta_{ij}$ | +| $A = A^{ * }$ | real matrix | $a_{ij} = a_{ij}^{ * }$ | +| $A = A^{\dagger}$ | hermitian | $a_{ij} = a_{ji}^{ * }$ | +| $A = \left (A^{\dagger} \right )^{-1}$ | unitary | $\sum_k a_{ik} a_{jk}^{ * } = \sum_k a_{ki}^{ * } a_{kj} = \delta_{ij}$ | +|----------------------------------------------------------------------| + +!eblock + + +=== Some famous Matrices === + + * Diagonal if $a_{ij}=0$ for $i\ne j$ + * Upper triangular if $a_{ij}=0$ for $i > j$ + * Lower triangular if $a_{ij}=0$ for $i < j$ + * Upper Hessenberg if $a_{ij}=0$ for $i > j+1$ + * Lower Hessenberg if $a_{ij}=0$ for $i < j+1$ + * Tridiagonal if $a_{ij}=0$ for $|i -j| > 1$ + * Lower banded with bandwidth $p$: $a_{ij}=0$ for $i > j+p$ + * Upper banded with bandwidth $p$: $a_{ij}=0$ for $i < j+p$ + * Banded, block upper triangular, block lower triangular.... + + +=== More Basic Matrix Features === + +!bblock Some Equivalent Statements +For an $N\times N$ matrix $\mathbf{A}$ the following properties are all equivalent + + * If the inverse of $\mathbf{A}$ exists, $\mathbf{A}$ is nonsingular. + * The equation $\mathbf{Ax}=0$ implies $\mathbf{x}=0$. + * The rows of $\mathbf{A}$ form a basis of $R^N$. + * The columns of $\mathbf{A}$ form a basis of $R^N$. + * $\mathbf{A}$ is a product of elementary matrices. + * $0$ is not eigenvalue of $\mathbf{A}$. +!eblock + + +===== Numpy and arrays ===== +"Numpy":"http://www.numpy.org/" provides an easy way to handle arrays in Python. The standard way to import this library is as + +!bc pycod +import numpy as np +!ec +Here follows a simple example where we set up an array of ten elements, all determined by random numbers drawn according to the normal distribution, +!bc pycod +n = 10 +x = np.random.normal(size=n) +print(x) +!ec +We defined a vector $x$ with $n=10$ elements with its values given by the Normal distribution $N(0,1)$. +Another alternative is to declare a vector as follows +!bc pycod +import numpy as np +x = np.array([1, 2, 3]) +print(x) +!ec +Here we have defined a vector with three elements, with $x_0=1$, $x_1=2$ and $x_2=3$. Note that both Python and C++ +start numbering array elements from $0$ and on. This means that a vector with $n$ elements has a sequence of entities $x_0, x_1, x_2, \dots, x_{n-1}$. We could also let (recommended) Numpy to compute the logarithms of a specific array as +!bc pycod +import numpy as np +x = np.log(np.array([4, 7, 8])) +print(x) +!ec + +In the last example we used Numpy's unary function $np.log$. This function is +highly tuned to compute array elements since the code is vectorized +and does not require looping. We normaly recommend that you use the +Numpy intrinsic functions instead of the corresponding _log_ function +from Python's _math_ module. The looping is done explicitely by the +_np.log_ function. The alternative, and slower way to compute the +logarithms of a vector would be to write + +!bc pycod +import numpy as np +from math import log +x = np.array([4, 7, 8]) +for i in range(0, len(x)): + x[i] = log(x[i]) +print(x) +!ec +We note that our code is much longer already and we need to import the _log_ function from the _math_ module. +The attentive reader will also notice that the output is $[1, 1, 2]$. Python interprets automagically our numbers as integers (like the _automatic_ keyword in C++). To change this we could define our array elements to be double precision numbers as +!bc pycod +import numpy as np +x = np.log(np.array([4, 7, 8], dtype = np.float64)) +print(x) +!ec +or simply write them as double precision numbers (Python uses 64 bits as default for floating point type variables), that is +!bc pycod +import numpy as np +x = np.log(np.array([4.0, 7.0, 8.0]) +print(x) +!ec +To check the number of bytes (remember that one byte contains eight bits for double precision variables), you can use simple use the _itemsize_ functionality (the array $x$ is actually an object which inherits the functionalities defined in Numpy) as +!bc pycod +import numpy as np +x = np.log(np.array([4.0, 7.0, 8.0]) +print(x.itemsize) +!ec + + +===== Matrices in Python ===== + +Having defined vectors, we are now ready to try out matrices. We can +define a $3 \times 3 $ real matrix $\hat{A}$ as (recall that we user +lowercase letters for vectors and uppercase letters for matrices) + +!bc pycod +import numpy as np +A = np.log(np.array([ [4.0, 7.0, 8.0], [3.0, 10.0, 11.0], [4.0, 5.0, 7.0] ])) +print(A) +!ec +If we use the _shape_ function we would get $(3, 3)$ as output, that is verifying that our matrix is a $3\times 3$ matrix. We can slice the matrix and print for example the first column (Python organized matrix elements in a row-major order, see below) as +!bc pycod +import numpy as np +A = np.log(np.array([ [4.0, 7.0, 8.0], [3.0, 10.0, 11.0], [4.0, 5.0, 7.0] ])) +# print the first column, row-major order and elements start with 0 +print(A[:,0]) +!ec +We can continue this was by printing out other columns or rows. The example here prints out the second column +!bc pycod +import numpy as np +A = np.log(np.array([ [4.0, 7.0, 8.0], [3.0, 10.0, 11.0], [4.0, 5.0, 7.0] ])) +# print the first column, row-major order and elements start with 0 +print(A[1,:]) +!ec +Numpy contains many other functionalities that allow us to slice, subdivide etc etc arrays. We strongly recommend that you look up the "Numpy website for more details":"http://www.numpy.org/". Useful functions when defining a matrix are the _np.zeros_ function which declares a matrix of a given dimension and sets all elements to zero +!bc pycod +import numpy as np +n = 10 +# define a matrix of dimension 10 x 10 and set all elements to zero +A = np.zeros( (n, n) ) +print(A) +!ec +or initializing all elements to +!bc pycod +import numpy as np +n = 10 +# define a matrix of dimension 10 x 10 and set all elements to one +A = np.ones( (n, n) ) +print(A) +!ec +or as unitarily distributed random numbers (see the material on random number generators in the statistics part) +!bc pycod +import numpy as np +n = 10 +# define a matrix of dimension 10 x 10 and set all elements to random numbers with x \in [0, 1] +A = np.random.rand(n, n) +print(A) +!ec + +As we will see throughout these lectures, there are several extremely useful functionalities in Numpy. +As an example, consider the discussion of the covariance matrix. Suppose we have defined three vectors +$\hat{x}, \hat{y}, \hat{z}$ with $n$ elements each. The covariance matrix is defined as +!bt +\[ +\hat{\Sigma} = \begin{bmatrix} \sigma_{xx} & \sigma_{xy} & \sigma_{xz} \\ + \sigma_{yx} & \sigma_{yy} & \sigma_{yz} \\ + \sigma_{zx} & \sigma_{zy} & \sigma_{zz} + \end{bmatrix}, +\] +!et +where for example +!bt +\[ +\sigma_{xy} =\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})(y_i- \overline{y}). +\] +!et +The Numpy function _np.cov_ calculates the covariance elements using the factor $1/(n-1)$ instead of $1/n$ since it assumes we do not have the exact mean values. +The following simple function uses the _np.vstack_ function which takes each vector of dimension $1\times n$ and produces a $3\times n$ matrix $\hat{W}$ +!bt +\[ +\hat{W} = \begin{bmatrix} x_0 & y_0 & z_0 \\ + x_1 & y_1 & z_1 \\ + x_2 & y_2 & z_2 \\ + \dots & \dots & \dots \\ + x_{n-2} & y_{n-2} & z_{n-2} \\ + x_{n-1} & y_{n-1} & z_{n-1} + \end{bmatrix}, +\] +!et + +which in turn is converted into into the $3\times 3$ covariance matrix +$\hat{\Sigma}$ via the Numpy function _np.cov()_. We note that we can also calculate +the mean value of each set of samples $\hat{x}$ etc using the Numpy +function _np.mean(x)_. We can also extract the eigenvalues of the +covariance matrix through the _np.linalg.eig()_ function. + +!bc pycod +# Importing various packages +import numpy as np + +n = 100 +x = np.random.normal(size=n) +print(np.mean(x)) +y = 4+3*x+np.random.normal(size=n) +print(np.mean(y)) +z = x**3+np.random.normal(size=n) +print(np.mean(z)) +W = np.vstack((x, y, z)) +Sigma = np.cov(W) +print(Sigma) +Eigvals, Eigvecs = np.linalg.eig(Sigma) +print(Eigvals) +!ec + + +!bc pycod +import numpy as np +import matplotlib.pyplot as plt +from scipy import sparse +eye = np.eye(4) +print(eye) +sparse_mtx = sparse.csr_matrix(eye) +print(sparse_mtx) +x = np.linspace(-10,10,100) +y = np.sin(x) +plt.plot(x,y,marker='x') +plt.show() +!ec + + +===== Meet the Pandas ===== + + +FIGURE: [fig/pandas.jpg, width=600 frac=0.8] + +Another useful Python package is +"pandas":"https://pandas.pydata.org/", which is an open source library +providing high-performance, easy-to-use data structures and data +analysis tools for Python. _pandas_ stands for panel data, a term borrowed from econometrics and is an efficient library for data analysis with an emphasis on tabular data. +_pandas_ has two major classes, the _DataFrame_ class with two-dimensional data objects and tabular data organized in columns and the class _Series_ with a focus on one-dimensional data objects. Both classes allow you to index data easily as we will see in the examples below. +_pandas_ allows you also to perform mathematical operations on the data, spanning from simple reshapings of vectors and matrices to statistical operations. + +The following simple example shows how we can, in an easy way make tables of our data. Here we define a data set which includes names, place of birth and date of birth, and displays the data in an easy to read way. We will see repeated use of _pandas_, in particular in connection with classification of data. + +!bc pycod +import pandas as pd +from IPython.display import display +data = {'First Name': ["Frodo", "Bilbo", "Aragorn II", "Samwise"], + 'Last Name': ["Baggins", "Baggins","Elessar","Gamgee"], + 'Place of birth': ["Shire", "Shire", "Eriador", "Shire"], + 'Date of Birth T.A.': [2968, 2890, 2931, 2980] + } +data_pandas = pd.DataFrame(data) +display(data_pandas) +!ec + +In the above we have imported _pandas_ with the shorthand _pd_, the latter has become the standard way we import _pandas_. We make then a list of various variables +and reorganize the aboves lists into a _DataFrame_ and then print out a neat table with specific column labels as *Name*, *place of birth* and *date of birth*. +Displaying these results, we see that the indices are given by the default numbers from zero to three. +_pandas_ is extremely flexible and we can easily change the above indices by defining a new type of indexing as +!bc pycod +data_pandas = pd.DataFrame(data,index=['Frodo','Bilbo','Aragorn','Sam']) +display(data_pandas) +!ec +Thereafter we display the content of the row which begins with the index _Aragorn_ +!bc pycod +display(data_pandas.loc['Aragorn']) +!ec + +We can easily append data to this, for example +!bc pycod +new_hobbit = {'First Name': ["Peregrin"], + 'Last Name': ["Took"], + 'Place of birth': ["Shire"], + 'Date of Birth T.A.': [2990] + } +data_pandas=data_pandas.append(pd.DataFrame(new_hobbit, index=['Pippin'])) +display(data_pandas) +!ec + + +Here are other examples where we use the _DataFrame_ functionality to handle arrays, now with more interesting features for us, namely numbers. We set up a matrix +of dimensionality $10\times 5$ and compute the mean value and standard deviation of each column. Similarly, we can perform mathematial operations like squaring the matrix elements and many other operations. +!bc pycod +import numpy as np +import pandas as pd +from IPython.display import display +np.random.seed(100) +# setting up a 10 x 5 matrix +rows = 10 +cols = 5 +a = np.random.randn(rows,cols) +df = pd.DataFrame(a) +display(df) +print(df.mean()) +print(df.std()) +display(df**2) +!ec + +Thereafter we can select specific columns only and plot final results +!bc pycod +df.columns = ['First', 'Second', 'Third', 'Fourth', 'Fifth'] +df.index = np.arange(10) + +display(df) +print(df['Second'].mean() ) +print(df.info()) +print(df.describe()) + +from pylab import plt, mpl +plt.style.use('seaborn') +mpl.rcParams['font.family'] = 'serif' + +df.cumsum().plot(lw=2.0, figsize=(10,6)) +plt.show() + + +df.plot.bar(figsize=(10,6), rot=15) +plt.show() +!ec +We can produce a $4\times 4$ matrix +!bc pycod +b = np.arange(16).reshape((4,4)) +print(b) +df1 = pd.DataFrame(b) +print(df1) +!ec +and many other operations. + +The _Series_ class is another important class included in +_pandas_. You can view it as a specialization of _DataFrame_ but where +we have just a single column of data. It shares many of the same features as _DataFrame. As with _DataFrame_, +most operations are vectorized, achieving thereby a high performance when dealing with computations of arrays, in particular labeled arrays. +As we will see below it leads also to a very concice code close to the mathematical operations we may be interested in. +For multidimensional arrays, we recommend strongly "xarray":"http://xarray.pydata.org/en/stable/". _xarray_ has much of the same flexibility as _pandas_, but allows for the extension to higher dimensions than two. We will see examples later of the usage of both _pandas_ and _xarray_. + + + +===== Reading Data and fitting ===== + +In order to study various Machine Learning algorithms, we need to +access data. Acccessing data is an essential step in all machine +learning algorithms. In particular, setting up the so-called _design +matrix_ (to be defined below) is often the first element we need in +order to perform our calculations. To set up the design matrix means +reading (and later, when the calculations are done, writing) data +in various formats, The formats span from reading files from disk, +loading data from databases and interacting with online sources +like web application programming interfaces (APIs). + +In handling various input formats, as discussed above, we will mainly stay with _pandas_, +a Python package which allows us, in a seamless and painless way, to +deal with a multitude of formats, from standard _csv_ (comma separated +values) files, via _excel_, _html_ to _hdf5_ formats. With _pandas_ +and the _DataFrame_ and _Series_ functionalities we are able to convert text data +into the calculational formats we need for a specific algorithm. And our code is going to be +pretty close the basic mathematical expressions. + +Our first data set is going to be a classic from nuclear physics, namely all +available data on binding energies. Don't be intimidated if you are not familiar with nuclear physics. It serves simply as an example here of a data set. + +We will show some of the +strengths of packages like _Scikit-Learn_ in fitting nuclear binding energies to +specific functions using linear regression first. Then, as a teaser, we will show you how +you can easily implement other algorithms like decision trees and random forests and neural networks. + +But before we really start with nuclear physics data, let's just look at some simpler polynomial fitting cases, such as, +(don't be offended) fitting straight lines! + + +=== Simple linear regression model using _scikit-learn_ === + +We start with perhaps our simplest possible example, using _Scikit-Learn_ to perform linear regression analysis on a data set produced by us. + +What follows is a simple Python code where we have defined a function +$y$ in terms of the variable $x$. Both are defined as vectors with $100$ entries. +The numbers in the vector $\hat{x}$ are given +by random numbers generated with a uniform distribution with entries +$x_i \in [0,1]$ (more about probability distribution functions +later). These values are then used to define a function $y(x)$ +(tabulated again as a vector) with a linear dependence on $x$ plus a +random noise added via the normal distribution. + + +The Numpy functions are imported used the _import numpy as np_ +statement and the random number generator for the uniform distribution +is called using the function _np.random.rand()_, where we specificy +that we want $100$ random variables. Using Numpy we define +automatically an array with the specified number of elements, $100$ in +our case. With the Numpy function _randn()_ we can compute random +numbers with the normal distribution (mean value $\mu$ equal to zero and +variance $\sigma^2$ set to one) and produce the values of $y$ assuming a linear +dependence as function of $x$ + +!bt +\[ +y = 2x+N(0,1), +\] +!et + +where $N(0,1)$ represents random numbers generated by the normal +distribution. From _Scikit-Learn_ we import then the +_LinearRegression_ functionality and make a prediction $\tilde{y} = +\alpha + \beta x$ using the function _fit(x,y)_. We call the set of +data $(\hat{x},\hat{y})$ for our training data. The Python package +_scikit-learn_ has also a functionality which extracts the above +fitting parameters $\alpha$ and $\beta$ (see below). Later we will +distinguish between training data and test data. + +For plotting we use the Python package +"matplotlib":"https://matplotlib.org/" which produces publication +quality figures. Feel free to explore the extensive +"gallery":"https://matplotlib.org/gallery/index.html" of examples. In +this example we plot our original values of $x$ and $y$ as well as the +prediction _ypredict_ ($\tilde{y}$), which attempts at fitting our +data with a straight line. + +The Python code follows here. +!bc pycod +# Importing various packages +import numpy as np +import matplotlib.pyplot as plt +from sklearn.linear_model import LinearRegression + +x = np.random.rand(100,1) +y = 2*x+np.random.randn(100,1) +linreg = LinearRegression() +linreg.fit(x,y) +xnew = np.array([[0],[1]]) +ypredict = linreg.predict(xnew) + +plt.plot(xnew, ypredict, "r-") +plt.plot(x, y ,'ro') +plt.axis([0,1.0,0, 5.0]) +plt.xlabel(r'$x$') +plt.ylabel(r'$y$') +plt.title(r'Simple Linear Regression') +plt.show() +!ec + +This example serves several aims. It allows us to demonstrate several +aspects of data analysis and later machine learning algorithms. The +immediate visualization shows that our linear fit is not +impressive. It goes through the data points, but there are many +outliers which are not reproduced by our linear regression. We could +now play around with this small program and change for example the +factor in front of $x$ and the normal distribution. Try to change the +function $y$ to + +!bt +\[ +y = 10x+0.01 \times N(0,1), +\] +!et + +where $x$ is defined as before. Does the fit look better? Indeed, by +reducing the role of the noise given by the normal distribution we see immediately that +our linear prediction seemingly reproduces better the training +set. However, this testing 'by the eye' is obviouly not satisfactory in the +long run. Here we have only defined the training data and our model, and +have not discussed a more rigorous approach to the _cost_ function. + +We need more rigorous criteria in defining whether we have succeeded or +not in modeling our training data. You will be surprised to see that +many scientists seldomly venture beyond this 'by the eye' approach. A +standard approach for the *cost* function is the so-called $\chi^2$ +function (a variant of the mean-squared error (MSE)) + +!bt +\[ \chi^2 = \frac{1}{n} +\sum_{i=0}^{n-1}\frac{(y_i-\tilde{y}_i)^2}{\sigma_i^2}, +\] +!et + +where $\sigma_i^2$ is the variance (to be defined later) of the entry +$y_i$. We may not know the explicit value of $\sigma_i^2$, it serves +however the aim of scaling the equations and make the cost function +dimensionless. + +Minimizing the cost function is a central aspect of +our discussions to come. Finding its minima as function of the model +parameters ($\alpha$ and $\beta$ in our case) will be a recurring +theme in these series of lectures. Essentially all machine learning +algorithms we will discuss center around the minimization of the +chosen cost function. This depends in turn on our specific +model for describing the data, a typical situation in supervised +learning. Automatizing the search for the minima of the cost function is a +central ingredient in all algorithms. Typical methods which are +employed are various variants of _gradient_ methods. These will be +discussed in more detail later. Again, you'll be surprised to hear that +many practitioners minimize the above function ''by the eye', popularly dubbed as +'chi by the eye'. That is, change a parameter and see (visually and numerically) that +the $\chi^2$ function becomes smaller. + +There are many ways to define the cost function. A simpler approach is to look at the relative difference between the training data and the predicted data, that is we define +the relative error (why would we prefer the MSE instead of the relative error?) as + +!bt +\[ +\epsilon_{\mathrm{relative}}= \frac{\vert \hat{y} -\hat{\tilde{y}}\vert}{\vert \hat{y}\vert}. +\] +!et + +The squared cost function results in an arithmetic mean-unbiased +estimator, and the absolute-value cost function results in a +median-unbiased estimator (in the one-dimensional case, and a +geometric median-unbiased estimator for the multi-dimensional +case). The squared cost function has the disadvantage that it has the tendency +to be dominated by outliers. + +We can modify easily the above Python code and plot the relative error instead +!bc pycod +import numpy as np +import matplotlib.pyplot as plt +from sklearn.linear_model import LinearRegression + +x = np.random.rand(100,1) +y = 5*x+0.01*np.random.randn(100,1) +linreg = LinearRegression() +linreg.fit(x,y) +ypredict = linreg.predict(x) + +plt.plot(x, np.abs(ypredict-y)/abs(y), "ro") +plt.axis([0,1.0,0.0, 0.5]) +plt.xlabel(r'$x$') +plt.ylabel(r'$\epsilon_{\mathrm{relative}}$') +plt.title(r'Relative error') +plt.show() +!ec + +Depending on the parameter in front of the normal distribution, we may +have a small or larger relative error. Try to play around with +different training data sets and study (graphically) the value of the +relative error. + +As mentioned above, _Scikit-Learn_ has an impressive functionality. +We can for example extract the values of $\alpha$ and $\beta$ and +their error estimates, or the variance and standard deviation and many +other properties from the statistical data analysis. + +Here we show an +example of the functionality of _Scikit-Learn_. +!bc pycod +import numpy as np +import matplotlib.pyplot as plt +from sklearn.linear_model import LinearRegression +from sklearn.metrics import mean_squared_error, r2_score, mean_squared_log_error, mean_absolute_error + +x = np.random.rand(100,1) +y = 2.0+ 5*x+0.5*np.random.randn(100,1) +linreg = LinearRegression() +linreg.fit(x,y) +ypredict = linreg.predict(x) +print('The intercept alpha: \n', linreg.intercept_) +print('Coefficient beta : \n', linreg.coef_) +# The mean squared error +print("Mean squared error: %.2f" % mean_squared_error(y, ypredict)) +# Explained variance score: 1 is perfect prediction +print('Variance score: %.2f' % r2_score(y, ypredict)) +# Mean squared log error +print('Mean squared log error: %.2f' % mean_squared_log_error(y, ypredict) ) +# Mean absolute error +print('Mean absolute error: %.2f' % mean_absolute_error(y, ypredict)) +plt.plot(x, ypredict, "r-") +plt.plot(x, y ,'ro') +plt.axis([0.0,1.0,1.5, 7.0]) +plt.xlabel(r'$x$') +plt.ylabel(r'$y$') +plt.title(r'Linear Regression fit ') +plt.show() + +!ec +The function _coef_ gives us the parameter $\beta$ of our fit while _intercept_ yields +$\alpha$. Depending on the constant in front of the normal distribution, we get values near or far from $alpha =2$ and $\beta =5$. Try to play around with different parameters in front of the normal distribution. The function _meansquarederror_ gives us the mean square error, a risk metric corresponding to the expected value of the squared (quadratic) error or loss defined as +!bt +\[ MSE(\hat{y},\hat{\tilde{y}}) = \frac{1}{n} +\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2, +\] +!et + +The smaller the value, the better the fit. Ideally we would like to +have an MSE equal zero. The attentive reader has probably recognized +this function as being similar to the $\chi^2$ function defined above. + +The _r2score_ function computes $R^2$, the coefficient of +determination. It provides a measure of how well future samples are +likely to be predicted by the model. Best possible score is 1.0 and it +can be negative (because the model can be arbitrarily worse). A +constant model that always predicts the expected value of $\hat{y}$, +disregarding the input features, would get a $R^2$ score of $0.0$. + +If $\tilde{\hat{y}}_i$ is the predicted value of the $i-th$ sample and $y_i$ is the corresponding true value, then the score $R^2$ is defined as +!bt +\[ +R^2(\hat{y}, \tilde{\hat{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i - \tilde{y}_i)^2}{\sum_{i=0}^{n - 1} (y_i - \bar{y})^2}, +\] +!et +where we have defined the mean value of $\hat{y}$ as +!bt +\[ +\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i. +\] +!et +Another quantity taht we will meet again in our discussions of regression analysis is + the mean absolute error (MAE), a risk metric corresponding to the expected value of the absolute error loss or what we call the $l1$-norm loss. In our discussion above we presented the relative error. +The MAE is defined as follows +!bt +\[ +\text{MAE}(\hat{y}, \hat{\tilde{y}}) = \frac{1}{n} \sum_{i=0}^{n-1} \left| y_i - \tilde{y}_i \right|. +\] +!et +We present the +squared logarithmic (quadratic) error +!bt +\[ +\text{MSLE}(\hat{y}, \hat{\tilde{y}}) = \frac{1}{n} \sum_{i=0}^{n - 1} (\log_e (1 + y_i) - \log_e (1 + \tilde{y}_i) )^2, +\] +!et + +where $\log_e (x)$ stands for the natural logarithm of $x$. This error +estimate is best to use when targets having exponential growth, such +as population counts, average sales of a commodity over a span of +years etc. + + +Finally, another cost function is the Huber cost function used in robust regression. + +The rationale behind this possible cost function is its reduced +sensitivity to outliers in the data set. In our discussions on +dimensionality reduction and normalization of data we will meet other +ways of dealing with outliers. + +The Huber cost function is defined as +!bt +\[ +H_{\delta}(a)={\begin{cases}{\frac {1}{2}}{a^{2}}&{\text{for }}|a|\leq \delta ,\\\delta (|a|-{\frac {1}{2}}\delta ),&{\text{otherwise.}}\end{cases}}}. +\] +!et +Here $a=\bm{y} - \bm{\tilde{y}}$. +We will discuss in more +detail these and other functions in the various lectures. We conclude this part with another example. Instead of +a linear $x$-dependence we study now a cubic polynomial and use the polynomial regression analysis tools of scikit-learn. + +!bc pycod +import matplotlib.pyplot as plt +import numpy as np +import random +from sklearn.linear_model import Ridge +from sklearn.preprocessing import PolynomialFeatures +from sklearn.pipeline import make_pipeline +from sklearn.linear_model import LinearRegression + +x=np.linspace(0.02,0.98,200) +noise = np.asarray(random.sample((range(200)),200)) +y=x**3*noise +yn=x**3*100 +poly3 = PolynomialFeatures(degree=3) +X = poly3.fit_transform(x[:,np.newaxis]) +clf3 = LinearRegression() +clf3.fit(X,y) + +Xplot=poly3.fit_transform(x[:,np.newaxis]) +poly3_plot=plt.plot(x, clf3.predict(Xplot), label='Cubic Fit') +plt.plot(x,yn, color='red', label="True Cubic") +plt.scatter(x, y, label='Data', color='orange', s=15) +plt.legend() +plt.show() + +def error(a): + for i in y: + err=(y-yn)/yn + return abs(np.sum(err))/len(err) + +print (error(y)) +!ec + + + + +=== To our real data: nuclear binding energies. Brief reminder on masses and binding energies === + +Let us now dive into nuclear physics and remind ourselves briefly about some basic features about binding +energies. A basic quantity which can be measured for the ground +states of nuclei is the atomic mass $M(N, Z)$ of the neutral atom with +atomic mass number $A$ and charge $Z$. The number of neutrons is $N$. There are indeed several sophisticated experiments worldwide which allow us to measure this quantity to high precision (parts per million even). + +Atomic masses are usually tabulated in terms of the mass excess defined by +!bt +\[ +\Delta M(N, Z) = M(N, Z) - uA, +\] +!et +where $u$ is the Atomic Mass Unit +!bt +\[ +u = M(^{12}\mathrm{C})/12 = 931.4940954(57) \hspace{0.1cm} \mathrm{MeV}/c^2. +\] +!et +The nucleon masses are +!bt +\[ +m_p = 1.00727646693(9)u, +\] +!et +and +!bt +\[ +m_n = 939.56536(8)\hspace{0.1cm} \mathrm{MeV}/c^2 = 1.0086649156(6)u. +\] +!et + +In the "2016 mass evaluation of by W.J.Huang, G.Audi, M.Wang, F.G.Kondev, S.Naimi and X.Xu":"http://nuclearmasses.org/resources_folder/Wang_2017_Chinese_Phys_C_41_030003.pdf" +there are data on masses and decays of 3437 nuclei. + +The nuclear binding energy is defined as the energy required to break +up a given nucleus into its constituent parts of $N$ neutrons and $Z$ +protons. In terms of the atomic masses $M(N, Z)$ the binding energy is +defined by + + +!bt +\[ +BE(N, Z) = ZM_H c^2 + Nm_n c^2 - M(N, Z)c^2 , +\] +!et +where $M_H$ is the mass of the hydrogen atom and $m_n$ is the mass of the neutron. +In terms of the mass excess the binding energy is given by +!bt +\[ +BE(N, Z) = Z\Delta_H c^2 + N\Delta_n c^2 -\Delta(N, Z)c^2 , +\] +!et +where $\Delta_H c^2 = 7.2890$ MeV and $\Delta_n c^2 = 8.0713$ MeV. + + +A popular and physically intuitive model which can be used to parametrize +the experimental binding energies as function of $A$, is the so-called +_liquid drop model_. The ansatz is based on the following expression + +!bt +\[ +BE(N,Z) = a_1A-a_2A^{2/3}-a_3\frac{Z^2}{A^{1/3}}-a_4\frac{(N-Z)^2}{A}, +\] +!et + +where $A$ stands for the number of nucleons and the $a_i$s are parameters which are determined by a fit +to the experimental data. + + + + +To arrive at the above expression we have assumed that we can make the following assumptions: + + * There is a volume term $a_1A$ proportional with the number of nucleons (the energy is also an extensive quantity). When an assembly of nucleons of the same size is packed together into the smallest volume, each interior nucleon has a certain number of other nucleons in contact with it. This contribution is proportional to the volume. + + * There is a surface energy term $a_2A^{2/3}$. The assumption here is that a nucleon at the surface of a nucleus interacts with fewer other nucleons than one in the interior of the nucleus and hence its binding energy is less. This surface energy term takes that into account and is therefore negative and is proportional to the surface area. + + + * There is a Coulomb energy term $a_3\frac{Z^2}{A^{1/3}}$. The electric repulsion between each pair of protons in a nucleus yields less binding. + + * There is an asymmetry term $a_4\frac{(N-Z)^2}{A}$. This term is associated with the Pauli exclusion principle and reflects the fact that the proton-neutron interaction is more attractive on the average than the neutron-neutron and proton-proton interactions. + +We could also add a so-called pairing term, which is a correction term that +arises from the tendency of proton pairs and neutron pairs to +occur. An even number of particles is more stable than an odd number. + + +=== Organizing our data === + +Let us start with reading and organizing our data. +We start with the compilation of masses and binding energies from 2016. +After having downloaded this file to our own computer, we are now ready to read the file and start structuring our data. + + +We start with preparing folders for storing our calculations and the data file over masses and binding energies. We import also various modules that we will find useful in order to present various Machine Learning methods. Here we focus mainly on the functionality of _scikit-learn_. +!bc pycod +# Common imports +import numpy as np +import pandas as pd +import matplotlib.pyplot as plt +import sklearn.linear_model as skl +from sklearn.model_selection import train_test_split +from sklearn.metrics import mean_squared_error, r2_score, mean_absolute_error +import os + +# Where to save the figures and data files +PROJECT_ROOT_DIR = "Results" +FIGURE_ID = "Results/FigureFiles" +DATA_ID = "DataFiles/" + +if not os.path.exists(PROJECT_ROOT_DIR): + os.mkdir(PROJECT_ROOT_DIR) + +if not os.path.exists(FIGURE_ID): + os.makedirs(FIGURE_ID) + +if not os.path.exists(DATA_ID): + os.makedirs(DATA_ID) + +def image_path(fig_id): + return os.path.join(FIGURE_ID, fig_id) + +def data_path(dat_id): + return os.path.join(DATA_ID, dat_id) + +def save_fig(fig_id): + plt.savefig(image_path(fig_id) + ".png", format='png') + +infile = open(data_path("MassEval2016.dat"),'r') +!ec + + +Before we proceed, we define also a function for making our plots. You can obviously avoid this and simply set up various _matplotlib_ commands every time you need them. You may however find it convenient to collect all such commands in one function and simply call this function. +!bc pycod +from pylab import plt, mpl +plt.style.use('seaborn') +mpl.rcParams['font.family'] = 'serif' + +def MakePlot(x,y, styles, labels, axlabels): + plt.figure(figsize=(10,6)) + for i in range(len(x)): + plt.plot(x[i], y[i], styles[i], label = labels[i]) + plt.xlabel(axlabels[0]) + plt.ylabel(axlabels[1]) + plt.legend(loc=0) +!ec + +Our next step is to read the data on experimental binding energies and +reorganize them as functions of the mass number $A$, the number of +protons $Z$ and neutrons $N$ using _pandas_. Before we do this it is +always useful (unless you have a binary file or other types of compressed +data) to actually open the file and simply take a look at it! + + +In particular, the program that outputs the final nuclear masses is written in Fortran with a specific format. It means that we need to figure out the format and which columns contain the data we are interested in. Pandas comes with a function that reads formatted output. After having admired the file, we are now ready to start massaging it with _pandas_. The file begins with some basic format information. +!bc pycod +""" +This is taken from the data file of the mass 2016 evaluation. +All files are 3436 lines long with 124 character per line. + Headers are 39 lines long. + col 1 : Fortran character control: 1 = page feed 0 = line feed + format : a1,i3,i5,i5,i5,1x,a3,a4,1x,f13.5,f11.5,f11.3,f9.3,1x,a2,f11.3,f9.3,1x,i3,1x,f12.5,f11.5 + These formats are reflected in the pandas widths variable below, see the statement + widths=(1,3,5,5,5,1,3,4,1,13,11,11,9,1,2,11,9,1,3,1,12,11,1), + Pandas has also a variable header, with length 39 in this case. +""" +!ec + +The data we are interested in are in columns 2, 3, 4 and 11, giving us +the number of neutrons, protons, mass numbers and binding energies, +respectively. We add also for the sake of completeness the element name. The data are in fixed-width formatted lines and we will +covert them into the _pandas_ DataFrame structure. + +!bc pycod +# Read the experimental data with Pandas +Masses = pd.read_fwf(infile, usecols=(2,3,4,6,11), + names=('N', 'Z', 'A', 'Element', 'Ebinding'), + widths=(1,3,5,5,5,1,3,4,1,13,11,11,9,1,2,11,9,1,3,1,12,11,1), + header=39, + index_col=False) + +# Extrapolated values are indicated by '#' in place of the decimal place, so +# the Ebinding column won't be numeric. Coerce to float and drop these entries. +Masses['Ebinding'] = pd.to_numeric(Masses['Ebinding'], errors='coerce') +Masses = Masses.dropna() +# Convert from keV to MeV. +Masses['Ebinding'] /= 1000 + +# Group the DataFrame by nucleon number, A. +Masses = Masses.groupby('A') +# Find the rows of the grouped DataFrame with the maximum binding energy. +Masses = Masses.apply(lambda t: t[t.Ebinding==t.Ebinding.max()]) +!ec + +We have now read in the data, grouped them according to the variables we are interested in. +We see how easy it is to reorganize the data using _pandas_. If we +were to do these operations in C/C++ or Fortran, we would have had to +write various functions/subroutines which perform the above +reorganizations for us. Having reorganized the data, we can now start +to make some simple fits using both the functionalities in _numpy_ and +_Scikit-Learn_ afterwards. + +Now we define five variables which contain +the number of nucleons $A$, the number of protons $Z$ and the number of neutrons $N$, the element name and finally the energies themselves. +!bc pycod +A = Masses['A'] +Z = Masses['Z'] +N = Masses['N'] +Element = Masses['Element'] +Energies = Masses['Ebinding'] +print(Masses) +!ec +The next step, and we will define this mathematically later, is to set up the so-called _design matrix_. We will throughout call this matrix $\bm{X}$. +It has dimensionality $p\times n$, where $n$ is the number of data points and $p$ are the so-called predictors. In our case here they are given by the number of polynomials in $A$ we wish to include in the fit. +!bc pycod +# Now we set up the design matrix X +X = np.zeros((len(A),5)) +X[:,0] = 1 +X[:,1] = A +X[:,2] = A**(2.0/3.0) +X[:,3] = A**(-1.0/3.0) +X[:,4] = A**(-1.0) +!ec +With _scikitlearn_ we are now ready to use linear regression and fit our data. +!bc pycod +clf = skl.LinearRegression().fit(X, Energies) +fity = clf.predict(X) +!ec +Pretty simple! +Now we can print measures of how our fit is doing, the coefficients from the fits and plot the final fit together with our data. +!bc pycod +# The mean squared error +print("Mean squared error: %.2f" % mean_squared_error(Energies, fity)) +# Explained variance score: 1 is perfect prediction +print('Variance score: %.2f' % r2_score(Energies, fity)) +# Mean absolute error +print('Mean absolute error: %.2f' % mean_absolute_error(Energies, fity)) +print(clf.coef_, clf.intercept_) + +Masses['Eapprox'] = fity +# Generate a plot comparing the experimental with the fitted values values. +fig, ax = plt.subplots() +ax.set_xlabel(r'$A = N + Z$') +ax.set_ylabel(r'$E_\mathrm{bind}\,/\mathrm{MeV}$') +ax.plot(Masses['A'], Masses['Ebinding'], alpha=0.7, lw=2, + label='Ame2016') +ax.plot(Masses['A'], Masses['Eapprox'], alpha=0.7, lw=2, c='m', + label='Fit') +ax.legend() +save_fig("Masses2016") +plt.show() +!ec + + +=== Seeing the wood for the trees === + +As a teaser, let us now see how we can do this with decision trees using _scikit-learn_. Later we will switch to so-called _random forests_! + + +!bc pycod + +#Decision Tree Regression +from sklearn.tree import DecisionTreeRegressor +regr_1=DecisionTreeRegressor(max_depth=5) +regr_2=DecisionTreeRegressor(max_depth=7) +regr_3=DecisionTreeRegressor(max_depth=9) +regr_1.fit(X, Energies) +regr_2.fit(X, Energies) +regr_3.fit(X, Energies) + + +y_1 = regr_1.predict(X) +y_2 = regr_2.predict(X) +y_3=regr_3.predict(X) +Masses['Eapprox'] = y_3 +# Plot the results +plt.figure() +plt.plot(A, Energies, color="blue", label="Data", linewidth=2) +plt.plot(A, y_1, color="red", label="max_depth=5", linewidth=2) +plt.plot(A, y_2, color="green", label="max_depth=7", linewidth=2) +plt.plot(A, y_3, color="m", label="max_depth=9", linewidth=2) + +plt.xlabel("$A$") +plt.ylabel("$E$[MeV]") +plt.title("Decision Tree Regression") +plt.legend() +save_fig("Masses2016Trees") +plt.show() +print(Masses) +print(np.mean( (Energies-y_1)**2)) +!ec + + +=== And what about using neural networks? === +The _seaborn_ package allows us to visualize data in an efficient way. Note that we use _scikit-learn_'s multi-layer perceptron (or feed forward neural network) +functionality. +!bc pycod +from sklearn.neural_network import MLPRegressor +from sklearn.metrics import accuracy_score +import seaborn as sns + +X_train = X +Y_train = Energies +n_hidden_neurons = 100 +epochs = 100 +# store models for later use +eta_vals = np.logspace(-5, 1, 7) +lmbd_vals = np.logspace(-5, 1, 7) +# store the models for later use +DNN_scikit = np.zeros((len(eta_vals), len(lmbd_vals)), dtype=object) +train_accuracy = np.zeros((len(eta_vals), len(lmbd_vals))) +sns.set() +for i, eta in enumerate(eta_vals): + for j, lmbd in enumerate(lmbd_vals): + dnn = MLPRegressor(hidden_layer_sizes=(n_hidden_neurons), activation='logistic', + alpha=lmbd, learning_rate_init=eta, max_iter=epochs) + dnn.fit(X_train, Y_train) + DNN_scikit[i][j] = dnn + train_accuracy[i][j] = dnn.score(X_train, Y_train) + +fig, ax = plt.subplots(figsize = (10, 10)) +sns.heatmap(train_accuracy, annot=True, ax=ax, cmap="viridis") +ax.set_title("Training Accuracy") +ax.set_ylabel("$\eta$") +ax.set_xlabel("$\lambda$") +plt.show() + + + +!ec + + + + + + +===== A first summary ===== + +The aim behind these introductory words was to present to you various +Python libraries and their functionalities, in particular libraries like +_numpy_, _pandas_, _xarray_ and _matplotlib_ and other that make our life much easier +in handling various data sets and visualizing data. + +Furthermore, +_Scikit-Learn_ allows us with few lines of code to implement popular +Machine Learning algorithms for supervised learning. Later we will meet _Tensorflow_, a powerful library for deep learning. +Now it is time to dive more into the details of various methods. We will start with linear regression and try to take a deeper look at what it entails. + + + + diff --git a/doc/src/How2ReadData/ipynb-chapter3-src.tar.gz b/doc/src/How2ReadData/ipynb-chapter3-src.tar.gz new file mode 100644 index 000000000..8c86eb35e Binary files /dev/null and b/doc/src/How2ReadData/ipynb-chapter3-src.tar.gz differ diff --git a/doc/src/LectureNotes/_build/.doctrees/chapter1.doctree b/doc/src/LectureNotes/_build/.doctrees/chapter1.doctree index 8d4ccb3c7..f4bd7cfe6 100644 Binary files a/doc/src/LectureNotes/_build/.doctrees/chapter1.doctree and b/doc/src/LectureNotes/_build/.doctrees/chapter1.doctree differ diff --git a/doc/src/LectureNotes/_build/.doctrees/chapter2.doctree b/doc/src/LectureNotes/_build/.doctrees/chapter2.doctree index 2756e838f..3610d2792 100644 Binary files a/doc/src/LectureNotes/_build/.doctrees/chapter2.doctree and b/doc/src/LectureNotes/_build/.doctrees/chapter2.doctree differ diff --git a/doc/src/LectureNotes/_build/.doctrees/chapter3.doctree b/doc/src/LectureNotes/_build/.doctrees/chapter3.doctree index 8bc915cd3..3e0cd4649 100644 Binary files a/doc/src/LectureNotes/_build/.doctrees/chapter3.doctree and b/doc/src/LectureNotes/_build/.doctrees/chapter3.doctree differ diff --git a/doc/src/LectureNotes/_build/.doctrees/chapter4.doctree b/doc/src/LectureNotes/_build/.doctrees/chapter4.doctree index efa1bd819..e36e1ca28 100644 Binary files a/doc/src/LectureNotes/_build/.doctrees/chapter4.doctree and b/doc/src/LectureNotes/_build/.doctrees/chapter4.doctree differ diff --git a/doc/src/LectureNotes/_build/.doctrees/chapter7.doctree b/doc/src/LectureNotes/_build/.doctrees/chapter7.doctree new file mode 100644 index 000000000..4ecf61ac3 Binary files /dev/null and b/doc/src/LectureNotes/_build/.doctrees/chapter7.doctree differ diff --git a/doc/src/LectureNotes/_build/.doctrees/chapter8.doctree b/doc/src/LectureNotes/_build/.doctrees/chapter8.doctree new file mode 100644 index 000000000..3bb9844ca Binary files /dev/null and b/doc/src/LectureNotes/_build/.doctrees/chapter8.doctree differ diff --git a/doc/src/LectureNotes/_build/.doctrees/environment.pickle b/doc/src/LectureNotes/_build/.doctrees/environment.pickle index 91ec5636b..da58c25c9 100644 Binary files a/doc/src/LectureNotes/_build/.doctrees/environment.pickle and b/doc/src/LectureNotes/_build/.doctrees/environment.pickle differ diff --git a/doc/src/LectureNotes/_build/.doctrees/testbook/_build/jupyter_execute/chapter2.doctree b/doc/src/LectureNotes/_build/.doctrees/testbook/_build/jupyter_execute/chapter2.doctree index 05a3a33ee..c06177aa6 100644 Binary files a/doc/src/LectureNotes/_build/.doctrees/testbook/_build/jupyter_execute/chapter2.doctree and b/doc/src/LectureNotes/_build/.doctrees/testbook/_build/jupyter_execute/chapter2.doctree differ diff --git a/doc/src/LectureNotes/_build/.doctrees/testbook/chapter2.doctree b/doc/src/LectureNotes/_build/.doctrees/testbook/chapter2.doctree index b6ed31101..e47ad9c96 100644 Binary files a/doc/src/LectureNotes/_build/.doctrees/testbook/chapter2.doctree and b/doc/src/LectureNotes/_build/.doctrees/testbook/chapter2.doctree differ diff --git a/doc/src/LectureNotes/_build/html/_images/chapter2_178_0.png b/doc/src/LectureNotes/_build/html/_images/chapter2_178_0.png index bca7d703a..f26cbb55e 100644 Binary files a/doc/src/LectureNotes/_build/html/_images/chapter2_178_0.png and b/doc/src/LectureNotes/_build/html/_images/chapter2_178_0.png differ diff --git a/doc/src/LectureNotes/_build/html/_images/chapter2_184_1.png b/doc/src/LectureNotes/_build/html/_images/chapter2_184_1.png index 52e1ee090..23b842d84 100644 Binary files a/doc/src/LectureNotes/_build/html/_images/chapter2_184_1.png and b/doc/src/LectureNotes/_build/html/_images/chapter2_184_1.png differ diff --git a/doc/src/LectureNotes/_build/html/_images/chapter4_278_2.png b/doc/src/LectureNotes/_build/html/_images/chapter4_278_2.png index 3fcad478b..5a4fe5abe 100644 Binary files a/doc/src/LectureNotes/_build/html/_images/chapter4_278_2.png and b/doc/src/LectureNotes/_build/html/_images/chapter4_278_2.png differ diff --git a/doc/src/LectureNotes/_build/html/_images/chapter7_109_0.png b/doc/src/LectureNotes/_build/html/_images/chapter7_109_0.png new file mode 100644 index 000000000..7188f63c7 Binary files /dev/null and b/doc/src/LectureNotes/_build/html/_images/chapter7_109_0.png differ diff --git a/doc/src/LectureNotes/_build/html/_images/chapter7_129_0.png b/doc/src/LectureNotes/_build/html/_images/chapter7_129_0.png new file mode 100644 index 000000000..659dee595 Binary files /dev/null and b/doc/src/LectureNotes/_build/html/_images/chapter7_129_0.png differ diff --git a/doc/src/LectureNotes/_build/html/_images/chapter7_129_2.png b/doc/src/LectureNotes/_build/html/_images/chapter7_129_2.png new file mode 100644 index 000000000..370e23072 Binary files /dev/null and b/doc/src/LectureNotes/_build/html/_images/chapter7_129_2.png differ diff --git a/doc/src/LectureNotes/_build/html/_images/chapter7_129_3.png b/doc/src/LectureNotes/_build/html/_images/chapter7_129_3.png new file mode 100644 index 000000000..268924dea Binary files /dev/null and b/doc/src/LectureNotes/_build/html/_images/chapter7_129_3.png differ diff --git a/doc/src/LectureNotes/_build/html/_images/chapter7_129_4.png b/doc/src/LectureNotes/_build/html/_images/chapter7_129_4.png new file mode 100644 index 000000000..88bb051f7 Binary files /dev/null and b/doc/src/LectureNotes/_build/html/_images/chapter7_129_4.png differ diff --git a/doc/src/LectureNotes/_build/html/_images/chapter7_129_6.png b/doc/src/LectureNotes/_build/html/_images/chapter7_129_6.png new file mode 100644 index 000000000..34cab365c Binary files /dev/null and b/doc/src/LectureNotes/_build/html/_images/chapter7_129_6.png differ diff --git a/doc/src/LectureNotes/_build/html/_images/chapter7_1_1.png b/doc/src/LectureNotes/_build/html/_images/chapter7_1_1.png new file mode 100644 index 000000000..42481a07e Binary files /dev/null and b/doc/src/LectureNotes/_build/html/_images/chapter7_1_1.png differ diff --git a/doc/src/LectureNotes/_build/html/_images/chapter8_77_1.png b/doc/src/LectureNotes/_build/html/_images/chapter8_77_1.png new file mode 100644 index 000000000..6509bb8be Binary files /dev/null and b/doc/src/LectureNotes/_build/html/_images/chapter8_77_1.png differ diff --git a/doc/src/LectureNotes/_build/html/_images/chapter8_7_0.png b/doc/src/LectureNotes/_build/html/_images/chapter8_7_0.png new file mode 100644 index 000000000..71f3c58f8 Binary files /dev/null and b/doc/src/LectureNotes/_build/html/_images/chapter8_7_0.png differ diff --git a/doc/src/LectureNotes/_build/html/_images/chapter8_7_1.png b/doc/src/LectureNotes/_build/html/_images/chapter8_7_1.png new file mode 100644 index 000000000..7c2b26820 Binary files /dev/null and b/doc/src/LectureNotes/_build/html/_images/chapter8_7_1.png differ diff --git a/doc/src/LectureNotes/_build/html/_sources/chapter7.ipynb b/doc/src/LectureNotes/_build/html/_sources/chapter7.ipynb new file mode 100644 index 000000000..47eab3c92 --- /dev/null +++ b/doc/src/LectureNotes/_build/html/_sources/chapter7.ipynb @@ -0,0 +1,1897 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Support Vector Machines, overarching aims\n", + "\n", + "A Support Vector Machine (SVM) is a very powerful and versatile\n", + "Machine Learning method, capable of performing linear or nonlinear\n", + "classification, regression, and even outlier detection. It is one of\n", + "the most popular models in Machine Learning, and anyone interested in\n", + "Machine Learning should have it in their toolbox. SVMs are\n", + "particularly well suited for classification of complex but small-sized or\n", + "medium-sized datasets. \n", + "\n", + "The case with two well-separated classes only can be understood in an\n", + "intuitive way in terms of lines in a two-dimensional space separating\n", + "the two classes (see figure below).\n", + "\n", + "The basic mathematics behind the SVM is however less familiar to most of us. \n", + "It relies on the definition of hyperplanes and the\n", + "definition of a **margin** which separates classes (in case of\n", + "classification problems) of variables. It is also used for regression\n", + "problems.\n", + "\n", + "With SVMs we distinguish between hard margin and soft margins. The\n", + "latter introduces a so-called softening parameter to be discussed\n", + "below. We distinguish also between linear and non-linear\n", + "approaches. The latter are the most frequent ones since it is rather\n", + "unlikely that we can separate classes easily by say straight lines.\n", + "\n", + "\n", + "## Hyperplanes and all that\n", + "\n", + "The theory behind support vector machines (SVM hereafter) is based on\n", + "the mathematical description of so-called hyperplanes. Let us start\n", + "with a two-dimensional case. This will also allow us to introduce our\n", + "first SVM examples. These will be tailored to the case of two specific\n", + "classes, as displayed in the figure here based on the usage of the petal data.\n", + "\n", + "We assume here that our data set can be well separated into two\n", + "domains, where a straight line does the job in the separating the two\n", + "classes. Here the two classes are represented by either squares or\n", + "circles." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline\n", + "\n", + "from sklearn import datasets\n", + "from sklearn.svm import SVC, LinearSVC\n", + "from sklearn.linear_model import SGDClassifier\n", + "from sklearn.preprocessing import StandardScaler\n", + "import matplotlib\n", + "import matplotlib.pyplot as plt\n", + "plt.rcParams['axes.labelsize'] = 14\n", + "plt.rcParams['xtick.labelsize'] = 12\n", + "plt.rcParams['ytick.labelsize'] = 12\n", + "\n", + "\n", + "iris = datasets.load_iris()\n", + "X = iris[\"data\"][:, (2, 3)] # petal length, petal width\n", + "y = iris[\"target\"]\n", + "\n", + "setosa_or_versicolor = (y == 0) | (y == 1)\n", + "X = X[setosa_or_versicolor]\n", + "y = y[setosa_or_versicolor]\n", + "\n", + "\n", + "\n", + "C = 5\n", + "alpha = 1 / (C * len(X))\n", + "\n", + "lin_clf = LinearSVC(loss=\"hinge\", C=C, random_state=42)\n", + "svm_clf = SVC(kernel=\"linear\", C=C)\n", + "sgd_clf = SGDClassifier(loss=\"hinge\", learning_rate=\"constant\", eta0=0.001, alpha=alpha,\n", + " max_iter=100000, random_state=42)\n", + "\n", + "scaler = StandardScaler()\n", + "X_scaled = scaler.fit_transform(X)\n", + "\n", + "lin_clf.fit(X_scaled, y)\n", + "svm_clf.fit(X_scaled, y)\n", + "sgd_clf.fit(X_scaled, y)\n", + "\n", + "print(\"LinearSVC: \", lin_clf.intercept_, lin_clf.coef_)\n", + "print(\"SVC: \", svm_clf.intercept_, svm_clf.coef_)\n", + "print(\"SGDClassifier(alpha={:.5f}):\".format(sgd_clf.alpha), sgd_clf.intercept_, sgd_clf.coef_)\n", + "\n", + "# Compute the slope and bias of each decision boundary\n", + "w1 = -lin_clf.coef_[0, 0]/lin_clf.coef_[0, 1]\n", + "b1 = -lin_clf.intercept_[0]/lin_clf.coef_[0, 1]\n", + "w2 = -svm_clf.coef_[0, 0]/svm_clf.coef_[0, 1]\n", + "b2 = -svm_clf.intercept_[0]/svm_clf.coef_[0, 1]\n", + "w3 = -sgd_clf.coef_[0, 0]/sgd_clf.coef_[0, 1]\n", + "b3 = -sgd_clf.intercept_[0]/sgd_clf.coef_[0, 1]\n", + "\n", + "# Transform the decision boundary lines back to the original scale\n", + "line1 = scaler.inverse_transform([[-10, -10 * w1 + b1], [10, 10 * w1 + b1]])\n", + "line2 = scaler.inverse_transform([[-10, -10 * w2 + b2], [10, 10 * w2 + b2]])\n", + "line3 = scaler.inverse_transform([[-10, -10 * w3 + b3], [10, 10 * w3 + b3]])\n", + "\n", + "# Plot all three decision boundaries\n", + "plt.figure(figsize=(11, 4))\n", + "plt.plot(line1[:, 0], line1[:, 1], \"k:\", label=\"LinearSVC\")\n", + "plt.plot(line2[:, 0], line2[:, 1], \"b--\", linewidth=2, label=\"SVC\")\n", + "plt.plot(line3[:, 0], line3[:, 1], \"r-\", label=\"SGDClassifier\")\n", + "plt.plot(X[:, 0][y==1], X[:, 1][y==1], \"bs\") # label=\"Iris-Versicolor\"\n", + "plt.plot(X[:, 0][y==0], X[:, 1][y==0], \"yo\") # label=\"Iris-Setosa\"\n", + "plt.xlabel(\"Petal length\", fontsize=14)\n", + "plt.ylabel(\"Petal width\", fontsize=14)\n", + "plt.legend(loc=\"upper center\", fontsize=14)\n", + "plt.axis([0, 5.5, 0, 2])\n", + "\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## What is a hyperplane?\n", + "\n", + "The aim of the SVM algorithm is to find a hyperplane in a\n", + "$p$-dimensional space, where $p$ is the number of features that\n", + "distinctly classifies the data points.\n", + "\n", + "In a $p$-dimensional space, a hyperplane is what we call an affine subspace of dimension of $p-1$.\n", + "As an example, in two dimension, a hyperplane is simply as straight line while in three dimensions it is \n", + "a two-dimensional subspace, or stated simply, a plane. \n", + "\n", + "In two dimensions, with the variables $x_1$ and $x_2$, the hyperplane is defined as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "b+w_1x_1+w_2x_2=0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "where $b$ is the intercept and $w_1$ and $w_2$ define the elements of a vector orthogonal to the line \n", + "$b+w_1x_1+w_2x_2=0$. \n", + "In two dimensions we define the vectors $\\boldsymbol{x} =[x1,x2]$ and $\\boldsymbol{w}=[w1,w2]$. \n", + "We can then rewrite the above equation as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{x}^T\\boldsymbol{w}+b=0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## A $p$-dimensional space of features\n", + "\n", + "We limit ourselves to two classes of outputs $y_i$ and assign these classes the values $y_i = \\pm 1$. \n", + "In a $p$-dimensional space of say $p$ features we have a hyperplane defines as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "b+wx_1+w_2x_2+\\dots +w_px_p=0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If we define a \n", + "matrix $\\boldsymbol{X}=\\left[\\boldsymbol{x}_1,\\boldsymbol{x}_2,\\dots, \\boldsymbol{x}_p\\right]$\n", + "of dimension $n\\times p$, where $n$ represents the observations for each feature and each vector $x_i$ is a column vector of the matrix $\\boldsymbol{X}$," + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{x}_i = \\begin{bmatrix} x_{i1} \\\\ x_{i2} \\\\ \\dots \\\\ \\dots \\\\ x_{ip} \\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If the above condition is not met for a given vector $\\boldsymbol{x}_i$ we have" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "b+w_1x_{i1}+w_2x_{i2}+\\dots +w_px_{ip} >0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "if our output $y_i=1$.\n", + "In this case we say that $\\boldsymbol{x}_i$ lies on one of the sides of the hyperplane and if" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "b+w_1x_{i1}+w_2x_{i2}+\\dots +w_px_{ip} < 0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "for the class of observations $y_i=-1$, \n", + "then $\\boldsymbol{x}_i$ lies on the other side. \n", + "\n", + "Equivalently, for the two classes of observations we have" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "y_i\\left(b+w_1x_{i1}+w_2x_{i2}+\\dots +w_px_{ip}\\right) > 0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "When we try to separate hyperplanes, if it exists, we can use it to construct a natural classifier: a test observation is assigned a given class depending on which side of the hyperplane it is located.\n", + "\n", + "\n", + "## The two-dimensional case\n", + "\n", + "Let us try to develop our intuition about SVMs by limiting ourselves to a two-dimensional\n", + "plane. To separate the two classes of data points, there are many\n", + "possible lines (hyperplanes if you prefer a more strict naming) \n", + "that could be chosen. Our objective is to find a\n", + "plane that has the maximum margin, i.e the maximum distance between\n", + "data points of both classes. Maximizing the margin distance provides\n", + "some reinforcement so that future data points can be classified with\n", + "more confidence.\n", + "\n", + "What a linear classifier attempts to accomplish is to split the\n", + "feature space into two half spaces by placing a hyperplane between the\n", + "data points. This hyperplane will be our decision boundary. All\n", + "points on one side of the plane will belong to class one and all points\n", + "on the other side of the plane will belong to the second class two.\n", + "\n", + "Unfortunately there are many ways in which we can place a hyperplane\n", + "to divide the data. Below is an example of two candidate hyperplanes\n", + "for our data sample.\n", + "\n", + "\n", + "## Getting into the details\n", + "\n", + "Let us define the function" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "f(x) = \\boldsymbol{w}^T\\boldsymbol{x}+b = 0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "as the function that determines the line $L$ that separates two classes (our two features), see the figure here. \n", + "\n", + "\n", + "Any point defined by $\\boldsymbol{x}_i$ and $\\boldsymbol{x}_2$ on the line $L$ will satisfy $\\boldsymbol{w}^T(\\boldsymbol{x}_1-\\boldsymbol{x}_2)=0$. \n", + "\n", + "The signed distance $\\delta$ from any point defined by a vector $\\boldsymbol{x}$ and a point $\\boldsymbol{x}_0$ on the line $L$ is then" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\delta = \\frac{1}{\\vert\\vert \\boldsymbol{w}\\vert\\vert}(\\boldsymbol{w}^T\\boldsymbol{x}+b).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## First attempt at a minimization approach\n", + "\n", + "How do we find the parameter $b$ and the vector $\\boldsymbol{w}$? What we could\n", + "do is to define a cost function which now contains the set of all\n", + "misclassified points $M$ and attempt to minimize this function" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "C(\\boldsymbol{w},b) = -\\sum_{i\\in M} y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We could now for example define all values $y_i =1$ as misclassified in case we have $\\boldsymbol{w}^T\\boldsymbol{x}_i+b < 0$ and the opposite if we have $y_i=-1$. Taking the derivatives gives us" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial C}{\\partial b} = -\\sum_{i\\in M} y_i,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "and" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial C}{\\partial \\boldsymbol{w}} = -\\sum_{i\\in M} y_ix_i.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Solving the equations\n", + "\n", + "We can now use the Newton-Raphson method or different variants of the gradient descent family (from plain gradient descent to various stochastic gradient descent approaches) to solve the equations" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "b \\leftarrow b +\\eta \\frac{\\partial C}{\\partial b},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "and" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{w} \\leftarrow \\boldsymbol{w} +\\eta \\frac{\\partial C}{\\partial \\boldsymbol{w}},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "where $\\eta$ is our by now well-known learning rate. \n", + "\n", + "\n", + "\n", + "## Code Example\n", + "\n", + "The equations we discussed above can be coded rather easily (the\n", + "framework is similar to what we developed for logistic\n", + "regression). We are going to set up a simple case with two classes only and we want to find a line which separates them the best possible way." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Problems with the Simpler Approach\n", + "\n", + "\n", + "There are however problems with this approach, although it looks\n", + "pretty straightforward to implement. When running the above code, we see that we can easily end up with many diffeent lines which separate the two classes.\n", + "\n", + "\n", + "For small\n", + "gaps between the entries, we may also end up needing many iterations\n", + "before the solutions converge and if the data cannot be separated\n", + "properly into two distinct classes, we may not experience a converge\n", + "at all.\n", + "\n", + "\n", + "## A better approach\n", + "\n", + "A better approach is rather to try to define a large margin between\n", + "the two classes (if they are well separated from the beginning).\n", + "\n", + "Thus, we wish to find a margin $M$ with $\\boldsymbol{w}$ normalized to\n", + "$\\vert\\vert \\boldsymbol{w}\\vert\\vert =1$ subject to the condition" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) \\geq M \\hspace{0.1cm}\\forall i=1,2,\\dots, p.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "All points are thus at a signed distance from the decision boundary defined by the line $L$. The parameters $b$ and $w_1$ and $w_2$ define this line. \n", + "\n", + "We seek thus the largest value $M$ defined by" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{1}{\\vert \\vert \\boldsymbol{w}\\vert\\vert}y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) \\geq M \\hspace{0.1cm}\\forall i=1,2,\\dots, n,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "or just" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) \\geq M\\vert \\vert \\boldsymbol{w}\\vert\\vert \\hspace{0.1cm}\\forall i.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If we scale the equation so that $\\vert \\vert \\boldsymbol{w}\\vert\\vert = 1/M$, we have to find the minimum of \n", + "$\\boldsymbol{w}^T\\boldsymbol{w}=\\vert \\vert \\boldsymbol{w}\\vert\\vert$ (the norm) subject to the condition" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) \\geq 1 \\hspace{0.1cm}\\forall i.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We have thus defined our margin as the invers of the norm of\n", + "$\\boldsymbol{w}$. We want to minimize the norm in order to have a as large as\n", + "possible margin $M$. Before we proceed, we need to remind ourselves\n", + "about Lagrangian multipliers.\n", + "\n", + "\n", + "## A quick Reminder on Lagrangian Multipliers\n", + "\n", + "Consider a function of three independent variables $f(x,y,z)$ . For the function $f$ to be an\n", + "extreme we have" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "df=0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "A necessary and sufficient condition is" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial f}{\\partial x} =\\frac{\\partial f}{\\partial y}=\\frac{\\partial f}{\\partial z}=0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "due to" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "df = \\frac{\\partial f}{\\partial x}dx+\\frac{\\partial f}{\\partial y}dy+\\frac{\\partial f}{\\partial z}dz.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In many problems the variables $x,y,z$ are often subject to constraints (such as those above for the margin)\n", + "so that they are no longer all independent. It is possible at least in principle to use each \n", + "constraint to eliminate one variable\n", + "and to proceed with a new and smaller set of independent varables.\n", + "\n", + "The use of so-called Lagrangian multipliers is an alternative technique when the elimination\n", + "of variables is incovenient or undesirable. Assume that we have an equation of constraint on \n", + "the variables $x,y,z$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\phi(x,y,z) = 0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "resulting in" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "d\\phi = \\frac{\\partial \\phi}{\\partial x}dx+\\frac{\\partial \\phi}{\\partial y}dy+\\frac{\\partial \\phi}{\\partial z}dz =0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now we cannot set anymore" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial f}{\\partial x} =\\frac{\\partial f}{\\partial y}=\\frac{\\partial f}{\\partial z}=0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "if $df=0$ is wanted\n", + "because there are now only two independent variables! Assume $x$ and $y$ are the independent \n", + "variables.\n", + "Then $dz$ is no longer arbitrary.\n", + "\n", + "\n", + "## Adding the Multiplier\n", + "\n", + "However, we can add to" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "df = \\frac{\\partial f}{\\partial x}dx+\\frac{\\partial f}{\\partial y}dy+\\frac{\\partial f}{\\partial z}dz,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "a multiplum of $d\\phi$, viz. $\\lambda d\\phi$, resulting in" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "df+\\lambda d\\phi = (\\frac{\\partial f}{\\partial z}+\\lambda\n", + "\\frac{\\partial \\phi}{\\partial x})dx+(\\frac{\\partial f}{\\partial y}+\\lambda\\frac{\\partial \\phi}{\\partial y})dy+\n", + "(\\frac{\\partial f}{\\partial z}+\\lambda\\frac{\\partial \\phi}{\\partial z})dz =0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Our multiplier is chosen so that" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial f}{\\partial z}+\\lambda\\frac{\\partial \\phi}{\\partial z} =0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We need to remember that we took $dx$ and $dy$ to be arbitrary and thus we must have" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial f}{\\partial x}+\\lambda\\frac{\\partial \\phi}{\\partial x} =0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "and" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial f}{\\partial y}+\\lambda\\frac{\\partial \\phi}{\\partial y} =0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "When all these equations are satisfied, $df=0$. We have four unknowns, $x,y,z$ and\n", + "$\\lambda$. Actually we want only $x,y,z$, $\\lambda$ needs not to be determined, \n", + "it is therefore often called\n", + "Lagrange's undetermined multiplier.\n", + "If we have a set of constraints $\\phi_k$ we have the equations" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial f}{\\partial x_i}+\\sum_k\\lambda_k\\frac{\\partial \\phi_k}{\\partial x_i} =0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Setting up the Problem\n", + "In order to solve the above problem, we define the following Lagrangian function to be minimized" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "{\\cal L}(\\lambda,b,\\boldsymbol{w})=\\frac{1}{2}\\boldsymbol{w}^T\\boldsymbol{w}-\\sum_{i=1}^n\\lambda_i\\left[y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)-1\\right],\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "where $\\lambda_i$ is a so-called Lagrange multiplier subject to the condition $\\lambda_i \\geq 0$.\n", + "\n", + "Taking the derivatives with respect to $b$ and $\\boldsymbol{w}$ we obtain" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial {\\cal L}}{\\partial b} = -\\sum_{i} \\lambda_iy_i=0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "and" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial {\\cal L}}{\\partial \\boldsymbol{w}} = 0 = \\boldsymbol{w}-\\sum_{i} \\lambda_iy_i\\boldsymbol{x}_i.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inserting these constraints into the equation for ${\\cal L}$ we obtain" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{x}_i^T\\boldsymbol{x}_j,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "subject to the constraints $\\lambda_i\\geq 0$ and $\\sum_i\\lambda_iy_i=0$. \n", + "We must in addition satisfy the [Karush-Kuhn-Tucker](https://en.wikipedia.org/wiki/Karush%E2%80%93Kuhn%E2%80%93Tucker_conditions) (KKT) condition" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\lambda_i\\left[y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) -1\\right] \\hspace{0.1cm}\\forall i.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "1. If $\\lambda_i > 0$, then $y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1$ and we say that $x_i$ is on the boundary.\n", + "\n", + "2. If $y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)> 1$, we say $x_i$ is not on the boundary and we set $\\lambda_i=0$. \n", + "\n", + "When $\\lambda_i > 0$, the vectors $\\boldsymbol{x}_i$ are called support vectors. They are the vectors closest to the line (or hyperplane) and define the margin $M$. \n", + "\n", + "\n", + "## The problem to solve\n", + "\n", + "We can rewrite" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{x}_i^T\\boldsymbol{x}_j,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "and its constraints in terms of a matrix-vector problem where we minimize w.r.t. $\\lambda$ the following problem" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{1}{2} \\boldsymbol{\\lambda}^T\\begin{bmatrix} y_1y_1\\boldsymbol{x}_1^T\\boldsymbol{x}_1 & y_1y_2\\boldsymbol{x}_1^T\\boldsymbol{x}_2 & \\dots & \\dots & y_1y_n\\boldsymbol{x}_1^T\\boldsymbol{x}_n \\\\\n", + "y_2y_1\\boldsymbol{x}_2^T\\boldsymbol{x}_1 & y_2y_2\\boldsymbol{x}_2^T\\boldsymbol{x}_2 & \\dots & \\dots & y_1y_n\\boldsymbol{x}_2^T\\boldsymbol{x}_n \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "y_ny_1\\boldsymbol{x}_n^T\\boldsymbol{x}_1 & y_ny_2\\boldsymbol{x}_n^T\\boldsymbol{x}_2 & \\dots & \\dots & y_ny_n\\boldsymbol{x}_n^T\\boldsymbol{x}_n \\\\\n", + "\\end{bmatrix}\\boldsymbol{\\lambda}-\\mathbb{1}\\boldsymbol{\\lambda},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "subject to $\\boldsymbol{y}^T\\boldsymbol{\\lambda}=0$. Here we defined the vectors $\\boldsymbol{\\lambda} =[\\lambda_1,\\lambda_2,\\dots,\\lambda_n]$ and \n", + "$\\boldsymbol{y}=[y_1,y_2,\\dots,y_n]$. \n", + "\n", + "\n", + "\n", + "## The last steps\n", + "\n", + "Solving the above problem, yields the values of $\\lambda_i$.\n", + "To find the coefficients of your hyperplane we need simply to compute" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{w}=\\sum_{i} \\lambda_iy_i\\boldsymbol{x}_i.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "With our vector $\\boldsymbol{w}$ we can in turn find the value of the intercept $b$ (here in two dimensions) via" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "resulting in" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "b = \\frac{1}{y_i}-\\boldsymbol{w}^T\\boldsymbol{x}_i,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "or if we write it out in terms of the support vectors only, with $N_s$ being their number, we have" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "b = \\frac{1}{N_s}\\sum_{j\\in N_s}\\left(y_j-\\sum_{i=1}^n\\lambda_iy_i\\boldsymbol{x}_i^T\\boldsymbol{x}_j\\right).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "With our hyperplane coefficients we can use our classifier to assign any observation by simply using" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "y_i = \\mathrm{sign}(\\boldsymbol{w}^T\\boldsymbol{x}_i+b).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Below we discuss how to find the optimal values of $\\lambda_i$. Before we proceed however, we discuss now the so-called soft classifier. \n", + "\n", + "\n", + "## A soft classifier\n", + "\n", + "Till now, the margin is strictly defined by the support vectors. This defines what is called a hard classifier, that is the margins are well defined.\n", + "\n", + "Suppose now that classes overlap in feature space, as shown in the\n", + "figure here. One way to deal with this problem before we define the\n", + "so-called **kernel approach**, is to allow a kind of slack in the sense\n", + "that we allow some points to be on the wrong side of the margin.\n", + "\n", + "We introduce thus the so-called **slack** variables $\\boldsymbol{\\xi} =[\\xi_1,x_2,\\dots,x_n]$ and \n", + "modify our previous equation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "to" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1-\\xi_i,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "with the requirement $\\xi_i\\geq 0$. The total violation is now $\\sum_i\\xi$. \n", + "The value $\\xi_i$ in the constraint the last constraint corresponds to the amount by which the prediction\n", + "$y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1$ is on the wrong side of its margin. Hence by bounding the sum $\\sum_i \\xi_i$,\n", + "we bound the total amount by which predictions fall on the wrong side of their margins.\n", + "\n", + "Misclassifications occur when $\\xi_i > 1$. Thus bounding the total sum by some value $C$ bounds in turn the total number of\n", + "misclassifications.\n", + "\n", + "\n", + "## Soft optmization problem\n", + "\n", + "\n", + "This has in turn the consequences that we change our optmization problem to finding the minimum of" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "{\\cal L}=\\frac{1}{2}\\boldsymbol{w}^T\\boldsymbol{w}-\\sum_{i=1}^n\\lambda_i\\left[y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)-(1-\\xi_)\\right]+C\\sum_{i=1}^n\\xi_i-\\sum_{i=1}^n\\gamma_i\\xi_i,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "subject to" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1-\\xi_i \\hspace{0.1cm}\\forall i,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "with the requirement $\\xi_i\\geq 0$.\n", + "\n", + "Taking the derivatives with respect to $b$ and $\\boldsymbol{w}$ we obtain" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial {\\cal L}}{\\partial b} = -\\sum_{i} \\lambda_iy_i=0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "and" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial {\\cal L}}{\\partial \\boldsymbol{w}} = 0 = \\boldsymbol{w}-\\sum_{i} \\lambda_iy_i\\boldsymbol{x}_i,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "and" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\lambda_i = C-\\gamma_i \\hspace{0.1cm}\\forall i.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inserting these constraints into the equation for ${\\cal L}$ we obtain the same equation as before" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{x}_i^T\\boldsymbol{x}_j,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "but now subject to the constraints $\\lambda_i\\geq 0$, $\\sum_i\\lambda_iy_i=0$ and $0\\leq\\lambda_i \\leq C$. \n", + "We must in addition satisfy the Karush-Kuhn-Tucker condition which now reads" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "5\n", + "0\n", + " \n", + "<\n", + "<\n", + "<\n", + "!\n", + "!\n", + "M\n", + "A\n", + "T\n", + "H\n", + "_\n", + "B\n", + "L\n", + "O\n", + "C\n", + "K" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\gamma_i\\xi_i = 0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "and" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) -(1-\\xi_) \\geq 0 \\hspace{0.1cm}\\forall i.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Kernels and non-linearity\n", + "\n", + "The cases we have studied till now, were all characterized by two classes\n", + "with a close to linear separability. The classifiers we have described\n", + "so far find linear boundaries in our input feature space. It is\n", + "possible to make our procedure more flexible by exploring the feature\n", + "space using other basis expansions such as higher-order polynomials,\n", + "wavelets, splines etc.\n", + "\n", + "If our feature space is not easy to separate, as shown in the figure\n", + "here, we can achieve a better separation by introducing more complex\n", + "basis functions. The ideal would be, as shown in the next figure, to, via a specific transformation to \n", + "obtain a separation between the classes which is almost linear. \n", + "\n", + "The change of basis, from $x\\rightarrow z=\\phi(x)$ leads to the same type of equations to be solved, except that\n", + "we need to introduce for example a polynomial transformation to a two-dimensional training set." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "import os\n", + "\n", + "np.random.seed(42)\n", + "\n", + "# To plot pretty figures\n", + "import matplotlib\n", + "import matplotlib.pyplot as plt\n", + "plt.rcParams['axes.labelsize'] = 14\n", + "plt.rcParams['xtick.labelsize'] = 12\n", + "plt.rcParams['ytick.labelsize'] = 12\n", + "\n", + "\n", + "from sklearn.svm import SVC\n", + "from sklearn import datasets\n", + "\n", + "\n", + "\n", + "X1D = np.linspace(-4, 4, 9).reshape(-1, 1)\n", + "X2D = np.c_[X1D, X1D**2]\n", + "y = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])\n", + "\n", + "plt.figure(figsize=(11, 4))\n", + "\n", + "plt.subplot(121)\n", + "plt.grid(True, which='both')\n", + "plt.axhline(y=0, color='k')\n", + "plt.plot(X1D[:, 0][y==0], np.zeros(4), \"bs\")\n", + "plt.plot(X1D[:, 0][y==1], np.zeros(5), \"g^\")\n", + "plt.gca().get_yaxis().set_ticks([])\n", + "plt.xlabel(r\"$x_1$\", fontsize=20)\n", + "plt.axis([-4.5, 4.5, -0.2, 0.2])\n", + "\n", + "plt.subplot(122)\n", + "plt.grid(True, which='both')\n", + "plt.axhline(y=0, color='k')\n", + "plt.axvline(x=0, color='k')\n", + "plt.plot(X2D[:, 0][y==0], X2D[:, 1][y==0], \"bs\")\n", + "plt.plot(X2D[:, 0][y==1], X2D[:, 1][y==1], \"g^\")\n", + "plt.xlabel(r\"$x_1$\", fontsize=20)\n", + "plt.ylabel(r\"$x_2$\", fontsize=20, rotation=0)\n", + "plt.gca().get_yaxis().set_ticks([0, 4, 8, 12, 16])\n", + "plt.plot([-4.5, 4.5], [6.5, 6.5], \"r--\", linewidth=3)\n", + "plt.axis([-4.5, 4.5, -1, 17])\n", + "plt.subplots_adjust(right=1)\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## The equations\n", + "\n", + "Suppose we define a polynomial transformation of degree two only (we continue to live in a plane with $x_i$ and $y_i$ as variables)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "z = \\phi(x_i) =\\left(x_i^2, y_i^2, \\sqrt{2}x_iy_i\\right).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "With our new basis, the equations we solved earlier are basically the same, that is we have now (without the slack option for simplicity)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{z}_i^T\\boldsymbol{z}_j,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "subject to the constraints $\\lambda_i\\geq 0$, $\\sum_i\\lambda_iy_i=0$, and for the support vectors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "y_i(\\boldsymbol{w}^T\\boldsymbol{z}_i+b)= 1 \\hspace{0.1cm}\\forall i,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "from which we also find $b$.\n", + "To compute $\\boldsymbol{z}_i^T\\boldsymbol{z}_j$ we define the kernel $K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)$ as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)=\\boldsymbol{z}_i^T\\boldsymbol{z}_j= \\phi(\\boldsymbol{x}_i)^T\\phi(\\boldsymbol{x}_j).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For the above example, the kernel reads" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)=[x_i^2, y_i^2, \\sqrt{2}x_iy_i]^T\\begin{bmatrix} x_j^2 \\\\ y_j^2 \\\\ \\sqrt{2}x_jy_j \\end{bmatrix}=x_i^2x_j^2+2x_ix_jy_iy_j+y_i^2y_j^2.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We note that this is nothing but the dot product of the two original\n", + "vectors $(\\boldsymbol{x}_i^T\\boldsymbol{x}_j)^2$. Instead of thus computing the\n", + "product in the Lagrangian of $\\boldsymbol{z}_i^T\\boldsymbol{z}_j$ we simply compute\n", + "the dot product $(\\boldsymbol{x}_i^T\\boldsymbol{x}_j)^2$.\n", + "\n", + "\n", + "This leads to the so-called\n", + "kernel trick and the result leads to the same as if we went through\n", + "the trouble of performing the transformation\n", + "$\\phi(\\boldsymbol{x}_i)^T\\phi(\\boldsymbol{x}_j)$ during the SVM calculations.\n", + "\n", + "\n", + "\n", + "## The problem to solve\n", + "Using our definition of the kernel We can rewrite again the Lagrangian" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{x}_i^T\\boldsymbol{z}_j,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "subject to the constraints $\\lambda_i\\geq 0$, $\\sum_i\\lambda_iy_i=0$ in terms of a convex optimization problem" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{1}{2} \\boldsymbol{\\lambda}^T\\begin{bmatrix} y_1y_1K(\\boldsymbol{x}_1,\\boldsymbol{x}_1) & y_1y_2K(\\boldsymbol{x}_1,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_1,\\boldsymbol{x}_n) \\\\\n", + "y_2y_1K(\\boldsymbol{x}_2,\\boldsymbol{x}_1) & y_2y_2(\\boldsymbol{x}_2,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_2,\\boldsymbol{x}_n) \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "y_ny_1K(\\boldsymbol{x}_n,\\boldsymbol{x}_1) & y_ny_2K(\\boldsymbol{x}_n\\boldsymbol{x}_2) & \\dots & \\dots & y_ny_nK(\\boldsymbol{x}_n,\\boldsymbol{x}_n) \\\\\n", + "\\end{bmatrix}\\boldsymbol{\\lambda}-\\mathbb{1}\\boldsymbol{\\lambda},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "subject to $\\boldsymbol{y}^T\\boldsymbol{\\lambda}=0$. Here we defined the vectors $\\boldsymbol{\\lambda} =[\\lambda_1,\\lambda_2,\\dots,\\lambda_n]$ and \n", + "$\\boldsymbol{y}=[y_1,y_2,\\dots,y_n]$. \n", + "If we add the slack constants this leads to the additional constraint $0\\leq \\lambda_i \\leq C$.\n", + "\n", + "We can rewrite this (see the solutions below) in terms of a convex optimization problem of the type" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\begin{align*}\n", + " &\\mathrm{min}_{\\lambda}\\hspace{0.2cm} \\frac{1}{2}\\boldsymbol{\\lambda}^T\\boldsymbol{P}\\boldsymbol{\\lambda}+\\boldsymbol{q}^T\\boldsymbol{\\lambda},\\\\ \\nonumber\n", + " &\\mathrm{subject\\hspace{0.1cm}to} \\hspace{0.2cm} \\boldsymbol{G}\\boldsymbol{\\lambda} \\preceq \\boldsymbol{h} \\hspace{0.2cm} \\wedge \\boldsymbol{A}\\boldsymbol{\\lambda}=f.\n", + "\\end{align*}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Below we discuss how to solve these equations. Here we note that the matrix $\\boldsymbol{P}$ has matrix elements $p_{ij}=y_iy_jK(\\boldsymbol{x}_i,\\boldsymbol{x}_j)$.\n", + "Given a kernel $K$ and the targets $y_i$ this matrix is easy to set up. The constraint $\\boldsymbol{y}^T\\boldsymbol{\\lambda}=0$ leads to $f=0$ and $\\boldsymbol{A}=\\boldsymbol{y}$. How to set up the matrix $\\boldsymbol{G}$ is discussed later. Here note that the inequalities $0\\leq \\lambda_i \\leq C$ can be split up into\n", + "$0\\leq \\lambda_i$ and $\\lambda_i \\leq C$. These two inequalities define then the matrix $\\boldsymbol{G}$ and the vector $\\boldsymbol{h}$.\n", + "\n", + "\n", + "\n", + "## Different kernels and Mercer's theorem\n", + "\n", + "There are several popular kernels being used. These are\n", + "1. Linear: $K(\\boldsymbol{x},\\boldsymbol{y})=\\boldsymbol{x}^T\\boldsymbol{y}$,\n", + "\n", + "2. Polynomial: $K(\\boldsymbol{x},\\boldsymbol{y})=(\\boldsymbol{x}^T\\boldsymbol{y}+\\gamma)^d$,\n", + "\n", + "3. Gaussian Radial Basis Function: $K(\\boldsymbol{x},\\boldsymbol{y})=\\exp{\\left(-\\gamma\\vert\\vert\\boldsymbol{x}-\\boldsymbol{y}\\vert\\vert^2\\right)}$,\n", + "\n", + "4. Tanh: $K(\\boldsymbol{x},\\boldsymbol{y})=\\tanh{(\\boldsymbol{x}^T\\boldsymbol{y}+\\gamma)}$,\n", + "\n", + "and many other ones.\n", + "\n", + "An important theorem for us is [Mercer's\n", + "theorem](https://en.wikipedia.org/wiki/Mercer%27s_theorem). The\n", + "theorem states that if a kernel function $K$ is symmetric, continuous\n", + "and leads to a positive semi-definite matrix $\\boldsymbol{P}$ then there\n", + "exists a function $\\phi$ that maps $\\boldsymbol{x}_i$ and $\\boldsymbol{x}_j$ into\n", + "another space (possibly with much higher dimensions) such that" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)=\\phi(\\boldsymbol{x}_i)^T\\phi(\\boldsymbol{x}_j).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "So you can use $K$ as a kernel since you know $\\phi$ exists, even if\n", + "you don’t know what $\\phi$ is. \n", + "\n", + "Note that some frequently used kernels (such as the Sigmoid kernel)\n", + "don’t respect all of Mercer’s conditions, yet they generally work well\n", + "in practice.\n", + "\n", + "\n", + "\n", + "## The moons example" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from __future__ import division, print_function, unicode_literals\n", + "\n", + "import numpy as np\n", + "np.random.seed(42)\n", + "\n", + "import matplotlib\n", + "import matplotlib.pyplot as plt\n", + "plt.rcParams['axes.labelsize'] = 14\n", + "plt.rcParams['xtick.labelsize'] = 12\n", + "plt.rcParams['ytick.labelsize'] = 12\n", + "\n", + "\n", + "from sklearn.svm import SVC\n", + "from sklearn import datasets\n", + "\n", + "\n", + "\n", + "from sklearn.pipeline import Pipeline\n", + "from sklearn.preprocessing import StandardScaler\n", + "from sklearn.svm import LinearSVC\n", + "\n", + "\n", + "from sklearn.datasets import make_moons\n", + "X, y = make_moons(n_samples=100, noise=0.15, random_state=42)\n", + "\n", + "def plot_dataset(X, y, axes):\n", + " plt.plot(X[:, 0][y==0], X[:, 1][y==0], \"bs\")\n", + " plt.plot(X[:, 0][y==1], X[:, 1][y==1], \"g^\")\n", + " plt.axis(axes)\n", + " plt.grid(True, which='both')\n", + " plt.xlabel(r\"$x_1$\", fontsize=20)\n", + " plt.ylabel(r\"$x_2$\", fontsize=20, rotation=0)\n", + "\n", + "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n", + "plt.show()\n", + "\n", + "from sklearn.datasets import make_moons\n", + "from sklearn.pipeline import Pipeline\n", + "from sklearn.preprocessing import PolynomialFeatures\n", + "\n", + "polynomial_svm_clf = Pipeline([\n", + " (\"poly_features\", PolynomialFeatures(degree=3)),\n", + " (\"scaler\", StandardScaler()),\n", + " (\"svm_clf\", LinearSVC(C=10, loss=\"hinge\", random_state=42))\n", + " ])\n", + "\n", + "polynomial_svm_clf.fit(X, y)\n", + "\n", + "def plot_predictions(clf, axes):\n", + " x0s = np.linspace(axes[0], axes[1], 100)\n", + " x1s = np.linspace(axes[2], axes[3], 100)\n", + " x0, x1 = np.meshgrid(x0s, x1s)\n", + " X = np.c_[x0.ravel(), x1.ravel()]\n", + " y_pred = clf.predict(X).reshape(x0.shape)\n", + " y_decision = clf.decision_function(X).reshape(x0.shape)\n", + " plt.contourf(x0, x1, y_pred, cmap=plt.cm.brg, alpha=0.2)\n", + " plt.contourf(x0, x1, y_decision, cmap=plt.cm.brg, alpha=0.1)\n", + "\n", + "plot_predictions(polynomial_svm_clf, [-1.5, 2.5, -1, 1.5])\n", + "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n", + "\n", + "plt.show()\n", + "\n", + "\n", + "from sklearn.svm import SVC\n", + "\n", + "poly_kernel_svm_clf = Pipeline([\n", + " (\"scaler\", StandardScaler()),\n", + " (\"svm_clf\", SVC(kernel=\"poly\", degree=3, coef0=1, C=5))\n", + " ])\n", + "poly_kernel_svm_clf.fit(X, y)\n", + "\n", + "poly100_kernel_svm_clf = Pipeline([\n", + " (\"scaler\", StandardScaler()),\n", + " (\"svm_clf\", SVC(kernel=\"poly\", degree=10, coef0=100, C=5))\n", + " ])\n", + "poly100_kernel_svm_clf.fit(X, y)\n", + "\n", + "plt.figure(figsize=(11, 4))\n", + "\n", + "plt.subplot(121)\n", + "plot_predictions(poly_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])\n", + "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n", + "plt.title(r\"$d=3, r=1, C=5$\", fontsize=18)\n", + "\n", + "plt.subplot(122)\n", + "plot_predictions(poly100_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])\n", + "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n", + "plt.title(r\"$d=10, r=100, C=5$\", fontsize=18)\n", + "\n", + "plt.show()\n", + "\n", + "def gaussian_rbf(x, landmark, gamma):\n", + " return np.exp(-gamma * np.linalg.norm(x - landmark, axis=1)**2)\n", + "\n", + "gamma = 0.3\n", + "\n", + "x1s = np.linspace(-4.5, 4.5, 200).reshape(-1, 1)\n", + "x2s = gaussian_rbf(x1s, -2, gamma)\n", + "x3s = gaussian_rbf(x1s, 1, gamma)\n", + "\n", + "XK = np.c_[gaussian_rbf(X1D, -2, gamma), gaussian_rbf(X1D, 1, gamma)]\n", + "yk = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])\n", + "\n", + "plt.figure(figsize=(11, 4))\n", + "\n", + "plt.subplot(121)\n", + "plt.grid(True, which='both')\n", + "plt.axhline(y=0, color='k')\n", + "plt.scatter(x=[-2, 1], y=[0, 0], s=150, alpha=0.5, c=\"red\")\n", + "plt.plot(X1D[:, 0][yk==0], np.zeros(4), \"bs\")\n", + "plt.plot(X1D[:, 0][yk==1], np.zeros(5), \"g^\")\n", + "plt.plot(x1s, x2s, \"g--\")\n", + "plt.plot(x1s, x3s, \"b:\")\n", + "plt.gca().get_yaxis().set_ticks([0, 0.25, 0.5, 0.75, 1])\n", + "plt.xlabel(r\"$x_1$\", fontsize=20)\n", + "plt.ylabel(r\"Similarity\", fontsize=14)\n", + "plt.annotate(r'$\\mathbf{x}$',\n", + " xy=(X1D[3, 0], 0),\n", + " xytext=(-0.5, 0.20),\n", + " ha=\"center\",\n", + " arrowprops=dict(facecolor='black', shrink=0.1),\n", + " fontsize=18,\n", + " )\n", + "plt.text(-2, 0.9, \"$x_2$\", ha=\"center\", fontsize=20)\n", + "plt.text(1, 0.9, \"$x_3$\", ha=\"center\", fontsize=20)\n", + "plt.axis([-4.5, 4.5, -0.1, 1.1])\n", + "\n", + "plt.subplot(122)\n", + "plt.grid(True, which='both')\n", + "plt.axhline(y=0, color='k')\n", + "plt.axvline(x=0, color='k')\n", + "plt.plot(XK[:, 0][yk==0], XK[:, 1][yk==0], \"bs\")\n", + "plt.plot(XK[:, 0][yk==1], XK[:, 1][yk==1], \"g^\")\n", + "plt.xlabel(r\"$x_2$\", fontsize=20)\n", + "plt.ylabel(r\"$x_3$ \", fontsize=20, rotation=0)\n", + "plt.annotate(r'$\\phi\\left(\\mathbf{x}\\right)$',\n", + " xy=(XK[3, 0], XK[3, 1]),\n", + " xytext=(0.65, 0.50),\n", + " ha=\"center\",\n", + " arrowprops=dict(facecolor='black', shrink=0.1),\n", + " fontsize=18,\n", + " )\n", + "plt.plot([-0.1, 1.1], [0.57, -0.1], \"r--\", linewidth=3)\n", + "plt.axis([-0.1, 1.1, -0.1, 1.1])\n", + " \n", + "plt.subplots_adjust(right=1)\n", + "\n", + "plt.show()\n", + "\n", + "\n", + "x1_example = X1D[3, 0]\n", + "for landmark in (-2, 1):\n", + " k = gaussian_rbf(np.array([[x1_example]]), np.array([[landmark]]), gamma)\n", + " print(\"Phi({}, {}) = {}\".format(x1_example, landmark, k))\n", + "\n", + "rbf_kernel_svm_clf = Pipeline([\n", + " (\"scaler\", StandardScaler()),\n", + " (\"svm_clf\", SVC(kernel=\"rbf\", gamma=5, C=0.001))\n", + " ])\n", + "rbf_kernel_svm_clf.fit(X, y)\n", + "\n", + "\n", + "from sklearn.svm import SVC\n", + "\n", + "gamma1, gamma2 = 0.1, 5\n", + "C1, C2 = 0.001, 1000\n", + "hyperparams = (gamma1, C1), (gamma1, C2), (gamma2, C1), (gamma2, C2)\n", + "\n", + "svm_clfs = []\n", + "for gamma, C in hyperparams:\n", + " rbf_kernel_svm_clf = Pipeline([\n", + " (\"scaler\", StandardScaler()),\n", + " (\"svm_clf\", SVC(kernel=\"rbf\", gamma=gamma, C=C))\n", + " ])\n", + " rbf_kernel_svm_clf.fit(X, y)\n", + " svm_clfs.append(rbf_kernel_svm_clf)\n", + "\n", + "plt.figure(figsize=(11, 7))\n", + "\n", + "for i, svm_clf in enumerate(svm_clfs):\n", + " plt.subplot(221 + i)\n", + " plot_predictions(svm_clf, [-1.5, 2.5, -1, 1.5])\n", + " plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n", + " gamma, C = hyperparams[i]\n", + " plt.title(r\"$\\gamma = {}, C = {}$\".format(gamma, C), fontsize=16)\n", + "\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Mathematical optimization of convex functions\n", + "\n", + "A mathematical (quadratic) optimization problem, or just optimization problem, has the form" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\begin{align*}\n", + " &\\mathrm{min}_{\\lambda}\\hspace{0.2cm} \\frac{1}{2}\\boldsymbol{\\lambda}^T\\boldsymbol{P}\\boldsymbol{\\lambda}+\\boldsymbol{q}^T\\boldsymbol{\\lambda},\\\\ \\nonumber\n", + " &\\mathrm{subject\\hspace{0.1cm}to} \\hspace{0.2cm} \\boldsymbol{G}\\boldsymbol{\\lambda} \\preceq \\boldsymbol{h} \\wedge \\boldsymbol{A}\\boldsymbol{\\lambda}=f.\n", + "\\end{align*}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "subject to some constraints for say a selected set $i=1,2,\\dots, n$.\n", + "In our case we are optimizing with respect to the Lagrangian multipliers $\\lambda_i$, and the\n", + "vector $\\boldsymbol{\\lambda}=[\\lambda_1, \\lambda_2,\\dots, \\lambda_n]$ is the optimization variable we are dealing with.\n", + "\n", + "In our case we are particularly interested in a class of optimization problems called convex optmization problems. \n", + "In our discussion on gradient descent methods we discussed at length the definition of a convex function. \n", + "\n", + "Convex optimization problems play a central role in applied mathematics and we recommend strongly [Boyd and Vandenberghe's text on the topics](http://web.stanford.edu/~boyd/cvxbook/).\n", + "\n", + "\n", + "\n", + "\n", + "## How do we solve these problems?\n", + "\n", + "If we use Python as programming language and wish to venture beyond\n", + "**scikit-learn**, **tensorflow** and similar software which makes our\n", + "lives so much easier, we need to dive into the wonderful world of\n", + "quadratic programming. We can, if we wish, solve the minimization\n", + "problem using say standard gradient methods or conjugate gradient\n", + "methods. However, these methods tend to exhibit a rather slow\n", + "converge. So, welcome to the promised land of quadratic programming.\n", + "\n", + "The functions we need are contained in the quadratic programming package **CVXOPT** and we need to import it together with **numpy** as" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy\n", + "import cvxopt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This will make our life much easier. You don't need t write your own optimizer.\n", + "\n", + "\n", + "\n", + "## A simple example\n", + "\n", + "We remind ourselves about the general problem we want to solve" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\begin{align*}\n", + " &\\mathrm{min}_{x}\\hspace{0.2cm} \\frac{1}{2}\\boldsymbol{x}^T\\boldsymbol{P}\\boldsymbol{x}+\\boldsymbol{q}^T\\boldsymbol{x},\\\\ \\nonumber\n", + " &\\mathrm{subject\\hspace{0.1cm} to} \\hspace{0.2cm} \\boldsymbol{G}\\boldsymbol{x} \\preceq \\boldsymbol{h} \\wedge \\boldsymbol{A}\\boldsymbol{x}=f.\n", + "\\end{align*}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let us show how to perform the optmization using a simple case. Assume we want to optimize the following problem" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\begin{align*}\n", + " &\\mathrm{min}_{x}\\hspace{0.2cm} \\frac{1}{2}x^2+5x+3y \\\\ \\nonumber\n", + " &\\mathrm{subject to} \\\\ \\nonumber\n", + " &x, y \\geq 0 \\\\ \\nonumber\n", + " &x+3y \\geq 15 \\\\ \\nonumber\n", + " &2x+5y \\leq 100 \\\\ \\nonumber\n", + " &3x+4y \\leq 80. \\\\ \\nonumber\n", + "\\end{align*}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The minimization problem can be rewritten in terms of vectors and matrices as (with $x$ and $y$ being the unknowns)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{1}{2}\\begin{bmatrix} x\\\\ y \\end{bmatrix}^T \\begin{bmatrix} 1 & 0\\\\ 0 & 0 \\end{bmatrix} \\begin{bmatrix} x \\\\ y \\end{bmatrix} + \\begin{bmatrix}3\\\\ 4 \\end{bmatrix}^T \\begin{bmatrix}x \\\\ y \\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Similarly, we can now set up the inequalities (we need to change $\\geq$ to $\\leq$ by multiplying with $-1$ on bot sides) as the following matrix-vector equation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\begin{bmatrix} -1 & 0 \\\\ 0 & -1 \\\\ -1 & -3 \\\\ 2 & 5 \\\\ 3 & 4\\end{bmatrix}\\begin{bmatrix} x \\\\ y\\end{bmatrix} \\preceq \\begin{bmatrix}0 \\\\ 0\\\\ -15 \\\\ 100 \\\\ 80\\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We have collapsed all the inequalities into a single matrix $\\boldsymbol{G}$. We see also that our matrix" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{P} =\\begin{bmatrix} 1 & 0\\\\ 0 & 0 \\end{bmatrix}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "is clearly positive semi-definite (all eigenvalues larger or equal zero). \n", + "Finally, the vector $\\boldsymbol{h}$ is defined as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{h} = \\begin{bmatrix}0 \\\\ 0\\\\ -15 \\\\ 100 \\\\ 80\\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Since we don't have any equalities the matrix $\\boldsymbol{A}$ is set to zero\n", + "The following code solves the equations for us" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Import the necessary packages\n", + "import numpy\n", + "from cvxopt import matrix\n", + "from cvxopt import solvers\n", + "P = matrix(numpy.diag([1,0]), tc=’d’)\n", + "q = matrix(numpy.array([3,4]), tc=’d’)\n", + "G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc=’d’)\n", + "h = matrix(numpy.array([0,0,-15,100,80]), tc=’d’)\n", + "# Construct the QP, invoke solver\n", + "sol = solvers.qp(P,q,G,h)\n", + "# Extract optimal value and solution\n", + "sol[’x’] \n", + "sol[’primal objective’]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Back to the more realistic cases\n", + "\n", + "We are now ready to return to our setup of the optmization problem for a more realistic case. Introducing the **slack** parameter $C$ we have" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{1}{2} \\boldsymbol{\\lambda}^T\\begin{bmatrix} y_1y_1K(\\boldsymbol{x}_1,\\boldsymbol{x}_1) & y_1y_2K(\\boldsymbol{x}_1,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_1,\\boldsymbol{x}_n) \\\\\n", + "y_2y_1K(\\boldsymbol{x}_2,\\boldsymbol{x}_1) & y_2y_2K(\\boldsymbol{x}_2,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_2,\\boldsymbol{x}_n) \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "y_ny_1K(\\boldsymbol{x}_n,\\boldsymbol{x}_1) & y_ny_2K(\\boldsymbol{x}_n\\boldsymbol{x}_2) & \\dots & \\dots & y_ny_nK(\\boldsymbol{x}_n,\\boldsymbol{x}_n) \\\\\n", + "\\end{bmatrix}\\boldsymbol{\\lambda}-\\mathbb{I}\\boldsymbol{\\lambda},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "subject to $\\boldsymbol{y}^T\\boldsymbol{\\lambda}=0$. Here we defined the vectors $\\boldsymbol{\\lambda} =[\\lambda_1,\\lambda_2,\\dots,\\lambda_n]$ and \n", + "$\\boldsymbol{y}=[y_1,y_2,\\dots,y_n]$. \n", + "With the slack constants this leads to the additional constraint $0\\leq \\lambda_i \\leq C$.\n", + "\n", + "**code will be added**" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/doc/src/LectureNotes/_build/html/_sources/chapter8.ipynb b/doc/src/LectureNotes/_build/html/_sources/chapter8.ipynb new file mode 100644 index 000000000..86dc8a18f --- /dev/null +++ b/doc/src/LectureNotes/_build/html/_sources/chapter8.ipynb @@ -0,0 +1,1923 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Dimensionality Reduction\n", + "\n", + "\n", + "## Reducing the number of degrees of freedom, overarching view\n", + "\n", + "Many Machine Learning problems involve thousands or even millions of\n", + "features for each training instance. Not only does this make training\n", + "extremely slow, it can also make it much harder to find a good\n", + "solution, as we will see. This problem is often referred to as the\n", + "curse of dimensionality. Fortunately, in real-world problems, it is\n", + "often possible to reduce the number of features considerably, turning\n", + "an intractable problem into a tractable one.\n", + "\n", + "Here we will discuss some of the most popular dimensionality reduction\n", + "techniques: the principal component analysis (PCA), Kernel PCA, and\n", + "Locally Linear Embedding (LLE). Furthermore, we will start by looking\n", + "at some simple preprocessing of the data which allow us to rescale the\n", + "data.\n", + "\n", + "Principal component analysis and its various variants deal with the\n", + "problem of fitting a low-dimensional [affine\n", + "subspace](https://en.wikipedia.org/wiki/Affine_space) to a set of of\n", + "data points in a high-dimensional space. With its family of methods it\n", + "is one of the most used tools in data modeling, compression and\n", + "visualization.\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "## Preprocessing our data\n", + "\n", + "Before we proceed however, we will discuss how to preprocess our\n", + "data. Till now and in connection with our previous examples we have\n", + "not met so many cases where we are too sensitive to the scaling of our\n", + "data. Normally the data may need a rescaling and/or may be sensitive\n", + "to extreme values. Scaling the data renders our inputs much more\n", + "suitable for the algorithms we want to employ.\n", + "\n", + "**Scikit-Learn** has several functions which allow us to rescale the\n", + "data, normally resulting in much better results in terms of various\n", + "accuracy scores. The **StandardScaler** function in **Scikit-Learn**\n", + "ensures that for each feature/predictor we study the mean value is\n", + "zero and the variance is one (every column in the design/feature\n", + "matrix). This scaling has the drawback that it does not ensure that\n", + "we have a particular maximum or minimum in our data set. Another\n", + "function included in **Scikit-Learn** is the **MinMaxScaler** which\n", + "ensures that all features are exactly between $0$ and $1$. The\n", + "\n", + "\n", + "## More preprocessing\n", + "\n", + "\n", + "The **Normalizer** scales each data\n", + "point such that the feature vector has a euclidean length of one. In other words, it\n", + "projects a data point on the circle (or sphere in the case of higher dimensions) with a\n", + "radius of 1. This means every data point is scaled by a different number (by the\n", + "inverse of it’s length).\n", + "This normalization is often used when only the direction (or angle) of the data matters,\n", + "not the length of the feature vector.\n", + "\n", + "The **RobustScaler** works similarly to the StandardScaler in that it\n", + "ensures statistical properties for each feature that guarantee that\n", + "they are on the same scale. However, the RobustScaler uses the median\n", + "and quartiles, instead of mean and variance. This makes the\n", + "RobustScaler ignore data points that are very different from the rest\n", + "(like measurement errors). These odd data points are also called\n", + "outliers, and might often lead to trouble for other scaling\n", + "techniques.\n", + "\n", + "\n", + "\n", + "\n", + "## Simple preprocessing examples, Franke function and regression" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline\n", + "\n", + "# Common imports\n", + "import os\n", + "import numpy as np\n", + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "import sklearn.linear_model as skl\n", + "from sklearn.metrics import mean_squared_error\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.preprocessing import MinMaxScaler, StandardScaler, Normalizer\n", + "from sklearn.svm import SVR\n", + "\n", + "# Where to save the figures and data files\n", + "PROJECT_ROOT_DIR = \"Results\"\n", + "FIGURE_ID = \"Results/FigureFiles\"\n", + "DATA_ID = \"DataFiles/\"\n", + "\n", + "if not os.path.exists(PROJECT_ROOT_DIR):\n", + " os.mkdir(PROJECT_ROOT_DIR)\n", + "\n", + "if not os.path.exists(FIGURE_ID):\n", + " os.makedirs(FIGURE_ID)\n", + "\n", + "if not os.path.exists(DATA_ID):\n", + " os.makedirs(DATA_ID)\n", + "\n", + "def image_path(fig_id):\n", + " return os.path.join(FIGURE_ID, fig_id)\n", + "\n", + "def data_path(dat_id):\n", + " return os.path.join(DATA_ID, dat_id)\n", + "\n", + "def save_fig(fig_id):\n", + " plt.savefig(image_path(fig_id) + \".png\", format='png')\n", + "\n", + "\n", + "def FrankeFunction(x,y):\n", + "\tterm1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))\n", + "\tterm2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))\n", + "\tterm3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))\n", + "\tterm4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)\n", + "\treturn term1 + term2 + term3 + term4\n", + "\n", + "\n", + "def create_X(x, y, n ):\n", + "\tif len(x.shape) > 1:\n", + "\t\tx = np.ravel(x)\n", + "\t\ty = np.ravel(y)\n", + "\n", + "\tN = len(x)\n", + "\tl = int((n+1)*(n+2)/2)\t\t# Number of elements in beta\n", + "\tX = np.ones((N,l))\n", + "\n", + "\tfor i in range(1,n+1):\n", + "\t\tq = int((i)*(i+1)/2)\n", + "\t\tfor k in range(i+1):\n", + "\t\t\tX[:,q+k] = (x**(i-k))*(y**k)\n", + "\n", + "\treturn X\n", + "\n", + "\n", + "# Making meshgrid of datapoints and compute Franke's function\n", + "n = 5\n", + "N = 1000\n", + "x = np.sort(np.random.uniform(0, 1, N))\n", + "y = np.sort(np.random.uniform(0, 1, N))\n", + "z = FrankeFunction(x, y)\n", + "X = create_X(x, y, n=n) \n", + "# split in training and test data\n", + "X_train, X_test, y_train, y_test = train_test_split(X,z,test_size=0.2)\n", + "\n", + "\n", + "svm = SVR(gamma='auto',C=10.0)\n", + "svm.fit(X_train, y_train)\n", + "\n", + "# The mean squared error and R2 score\n", + "print(\"MSE before scaling: {:.2f}\".format(mean_squared_error(svm.predict(X_test), y_test)))\n", + "print(\"R2 score before scaling {:.2f}\".format(svm.score(X_test,y_test)))\n", + "\n", + "scaler = StandardScaler()\n", + "scaler.fit(X_train)\n", + "X_train_scaled = scaler.transform(X_train)\n", + "X_test_scaled = scaler.transform(X_test)\n", + "\n", + "print(\"Feature min values before scaling:\\n {}\".format(X_train.min(axis=0)))\n", + "print(\"Feature max values before scaling:\\n {}\".format(X_train.max(axis=0)))\n", + "\n", + "print(\"Feature min values after scaling:\\n {}\".format(X_train_scaled.min(axis=0)))\n", + "print(\"Feature max values after scaling:\\n {}\".format(X_train_scaled.max(axis=0)))\n", + "\n", + "svm = SVR(gamma='auto',C=10.0)\n", + "svm.fit(X_train_scaled, y_train)\n", + "\n", + "print(\"MSE after scaling: {:.2f}\".format(mean_squared_error(svm.predict(X_test_scaled), y_test)))\n", + "print(\"R2 score for scaled data: {:.2f}\".format(svm.score(X_test_scaled,y_test)))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Simple preprocessing examples, breast cancer data and classification, Support Vector Machines\n", + "\n", + "We show here how we can use a simple regression case on the breast\n", + "cancer data using support vector machines (SVM) as algorithm for\n", + "classification." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "from sklearn.model_selection import train_test_split \n", + "from sklearn.datasets import load_breast_cancer\n", + "from sklearn.svm import SVC\n", + "cancer = load_breast_cancer()\n", + "\n", + "X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)\n", + "print(X_train.shape)\n", + "print(X_test.shape)\n", + "\n", + "svm = SVC(C=100)\n", + "svm.fit(X_train, y_train)\n", + "print(\"Test set accuracy: {:.2f}\".format(svm.score(X_test,y_test)))\n", + "\n", + "from sklearn.preprocessing import MinMaxScaler, StandardScaler\n", + "scaler = MinMaxScaler()\n", + "scaler.fit(X_train)\n", + "X_train_scaled = scaler.transform(X_train)\n", + "X_test_scaled = scaler.transform(X_test)\n", + "\n", + "print(\"Feature min values before scaling:\\n {}\".format(X_train.min(axis=0)))\n", + "print(\"Feature max values before scaling:\\n {}\".format(X_train.max(axis=0)))\n", + "\n", + "print(\"Feature min values before scaling:\\n {}\".format(X_train_scaled.min(axis=0)))\n", + "print(\"Feature max values before scaling:\\n {}\".format(X_train_scaled.max(axis=0)))\n", + "\n", + "\n", + "svm.fit(X_train_scaled, y_train)\n", + "print(\"Test set accuracy scaled data with Min-Max scaling: {:.2f}\".format(svm.score(X_test_scaled,y_test)))\n", + "\n", + "scaler = StandardScaler()\n", + "scaler.fit(X_train)\n", + "X_train_scaled = scaler.transform(X_train)\n", + "X_test_scaled = scaler.transform(X_test)\n", + "\n", + "svm.fit(X_train_scaled, y_train)\n", + "print(\"Test set accuracy scaled data with Standar Scaler: {:.2f}\".format(svm.score(X_test_scaled,y_test)))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## More on Cancer Data, now with Logistic Regression" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "from sklearn.model_selection import train_test_split \n", + "from sklearn.datasets import load_breast_cancer\n", + "from sklearn.linear_model import LogisticRegression\n", + "cancer = load_breast_cancer()\n", + "\n", + "# Set up training data\n", + "X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)\n", + "logreg = LogisticRegression()\n", + "logreg.fit(X_train, y_train)\n", + "print(\"Test set accuracy: {:.2f}\".format(logreg.score(X_test,y_test)))\n", + "\n", + "# Scale data\n", + "from sklearn.preprocessing import StandardScaler\n", + "scaler = StandardScaler()\n", + "scaler.fit(X_train)\n", + "X_train_scaled = scaler.transform(X_train)\n", + "X_test_scaled = scaler.transform(X_test)\n", + "logreg.fit(X_train_scaled, y_train)\n", + "print(\"Test set accuracy scaled data: {:.2f}\".format(logreg.score(X_test_scaled,y_test)))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Why should we think of reducing the dimensionality\n", + "\n", + "In addition to the plot of the features, we study now also the covariance (and the correlation matrix).\n", + "We use also **Pandas** to compute the correlation matrix." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "from sklearn.model_selection import train_test_split \n", + "from sklearn.datasets import load_breast_cancer\n", + "from sklearn.linear_model import LogisticRegression\n", + "cancer = load_breast_cancer()\n", + "import pandas as pd\n", + "# Making a data frame\n", + "cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names)\n", + "\n", + "fig, axes = plt.subplots(15,2,figsize=(10,20))\n", + "malignant = cancer.data[cancer.target == 0]\n", + "benign = cancer.data[cancer.target == 1]\n", + "ax = axes.ravel()\n", + "\n", + "for i in range(30):\n", + " _, bins = np.histogram(cancer.data[:,i], bins =50)\n", + " ax[i].hist(malignant[:,i], bins = bins, alpha = 0.5)\n", + " ax[i].hist(benign[:,i], bins = bins, alpha = 0.5)\n", + " ax[i].set_title(cancer.feature_names[i])\n", + " ax[i].set_yticks(())\n", + "ax[0].set_xlabel(\"Feature magnitude\")\n", + "ax[0].set_ylabel(\"Frequency\")\n", + "ax[0].legend([\"Malignant\", \"Benign\"], loc =\"best\")\n", + "fig.tight_layout()\n", + "plt.show()\n", + "\n", + "import seaborn as sns\n", + "correlation_matrix = cancerpd.corr().round(1)\n", + "# use the heatmap function from seaborn to plot the correlation matrix\n", + "# annot = True to print the values inside the square\n", + "sns.heatmap(data=correlation_matrix, annot=True)\n", + "plt.show()\n", + "\n", + "#print eigvalues of correlation matrix\n", + "EigValues, EigVectors = np.linalg.eig(correlation_matrix)\n", + "print(EigValues)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In the above example we note two things. In the first plot we display\n", + "the overlap of benign and malignant tumors as functions of the various\n", + "features in the Wisconsing breast cancer data set. We see that for\n", + "some of the features we can distinguish clearly the benign and\n", + "malignant cases while for other features we cannot. This can point to\n", + "us which features may be of greater interest when we wish to classify\n", + "a benign or not benign tumour.\n", + "\n", + "In the second figure we have computed the so-called correlation\n", + "matrix, which in our case with thirty features becomes a $30\\times 30$\n", + "matrix.\n", + "\n", + "We constructed this matrix using **pandas** via the statements" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "and then" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "correlation_matrix = cancerpd.corr().round(1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Diagonalizing this matrix we can in turn say something about which\n", + "features are of relevance and which are not. But before we proceed we\n", + "need to define covariance and correlation matrices. This leads us to\n", + "the classical Principal Component Analysis (PCA) theorem with\n", + "applications.\n", + "\n", + "\n", + "\n", + "\n", + "## Basic ideas of the Principal Component Analysis (PCA)\n", + "\n", + "The principal component analysis deals with the problem of fitting a\n", + "low-dimensional affine subspace $S$ of dimension $d$ much smaller than\n", + "the totaldimension $D$ of the problem at hand (our data\n", + "set). Mathematically it can be formulated as a statistical problem or\n", + "a geometric problem. In our discussion of the theorem for the\n", + "classical PCA, we will stay with a statistical approach. This is also\n", + "what set the scene historically which for the PCA.\n", + "\n", + "We have a data set defined by a design/feature matrix $\\boldsymbol{X}$ (see below for its definition) \n", + "* Each data point is determined by $p$ extrinsic (measurement) variables\n", + "\n", + "* We may want to ask the following question: Are there fewer intrinsic variables (say $d << p$) that still approximately describe the data?\n", + "\n", + "* If so, these intrinsic variables may tell us something important and finding these intrinsic variables is what dimension reduction methods do. \n", + "\n", + "## Introducing the Covariance and Correlation functions\n", + "\n", + "Before we discuss the PCA theorem, we need to remind ourselves about\n", + "the definition of the covariance and the correlation function. These are quantities \n", + "\n", + "Suppose we have defined two vectors\n", + "$\\hat{x}$ and $\\hat{y}$ with $n$ elements each. The covariance matrix $\\boldsymbol{C}$ is defined as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x},\\boldsymbol{y}] = \\begin{bmatrix} \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{x}] & \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] \\\\\n", + " \\mathrm{cov}[\\boldsymbol{y},\\boldsymbol{x}] & \\mathrm{cov}[\\boldsymbol{y},\\boldsymbol{y}] \\\\\n", + " \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "where for example" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] =\\frac{1}{n} \\sum_{i=0}^{n-1}(x_i- \\overline{x})(y_i- \\overline{y}).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "With this definition and recalling that the variance is defined as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\mathrm{var}[\\boldsymbol{x}]=\\frac{1}{n} \\sum_{i=0}^{n-1}(x_i- \\overline{x})^2,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "we can rewrite the covariance matrix as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x},\\boldsymbol{y}] = \\begin{bmatrix} \\mathrm{var}[\\boldsymbol{x}] & \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] \\\\\n", + " \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] & \\mathrm{var}[\\boldsymbol{y}] \\\\\n", + " \\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The covariance takes values between zero and infinity and may thus\n", + "lead to problems with loss of numerical precision for particularly\n", + "large values. It is common to scale the covariance matrix by\n", + "introducing instead the correlation matrix defined via the so-called\n", + "correlation function" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\mathrm{corr}[\\boldsymbol{x},\\boldsymbol{y}]=\\frac{\\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}]}{\\sqrt{\\mathrm{var}[\\boldsymbol{x}] \\mathrm{var}[\\boldsymbol{y}]}}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The correlation function is then given by values $\\mathrm{corr}[\\boldsymbol{x},\\boldsymbol{y}]\n", + "\\in [-1,1]$. This avoids eventual problems with too large values. We\n", + "can then define the correlation matrix for the two vectors $\\boldsymbol{x}$\n", + "and $\\boldsymbol{y}$ as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{K}[\\boldsymbol{x},\\boldsymbol{y}] = \\begin{bmatrix} 1 & \\mathrm{corr}[\\boldsymbol{x},\\boldsymbol{y}] \\\\\n", + " \\mathrm{corr}[\\boldsymbol{y},\\boldsymbol{x}] & 1 \\\\\n", + " \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In the above example this is the function we constructed using **pandas**.\n", + "\n", + "\n", + "## Correlation Function and Design/Feature Matrix\n", + "\n", + "In our derivation of the various regression algorithms like **Ordinary Least Squares** or **Ridge regression**\n", + "we defined the design/feature matrix $\\boldsymbol{X}$ as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{X}=\\begin{bmatrix}\n", + "x_{0,0} & x_{0,1} & x_{0,2}& \\dots & \\dots x_{0,p-1}\\\\\n", + "x_{1,0} & x_{1,1} & x_{1,2}& \\dots & \\dots x_{1,p-1}\\\\\n", + "x_{2,0} & x_{2,1} & x_{2,2}& \\dots & \\dots x_{2,p-1}\\\\\n", + "\\dots & \\dots & \\dots & \\dots \\dots & \\dots \\\\\n", + "x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \\dots & \\dots x_{n-2,p-1}\\\\\n", + "x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \\dots & \\dots x_{n-1,p-1}\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "with $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$, with the predictors/features $p$ refering to the column numbers and the\n", + "entries $n$ being the row elements.\n", + "We can rewrite the design/feature matrix in terms of its column vectors as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{X}=\\begin{bmatrix} \\boldsymbol{x}_0 & \\boldsymbol{x}_1 & \\boldsymbol{x}_2 & \\dots & \\dots & \\boldsymbol{x}_{p-1}\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "with a given vector" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{x}_i^T = \\begin{bmatrix}x_{0,i} & x_{1,i} & x_{2,i}& \\dots & \\dots x_{n-1,i}\\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "With these definitions, we can now rewrite our $2\\times 2$\n", + "correaltion/covariance matrix in terms of a moe general design/feature\n", + "matrix $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$. This leads to a $p\\times p$\n", + "covariance matrix for the vectors $\\boldsymbol{x}_i$ with $i=0,1,\\dots,p-1$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x}] = \\begin{bmatrix}\n", + "\\mathrm{var}[\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_0] & \\mathrm{var}[\\boldsymbol{x}_1] & \\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\mathrm{cov}[\\boldsymbol{x}_2,\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_2,\\boldsymbol{x}_1] & \\mathrm{var}[\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{cov}[\\boldsymbol{x}_2,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\mathrm{cov}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_1] & \\mathrm{cov}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_{2}] & \\dots & \\dots & \\mathrm{var}[\\boldsymbol{x}_{p-1}]\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "and the correlation matrix" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{K}[\\boldsymbol{x}] = \\begin{bmatrix}\n", + "1 & \\mathrm{corr}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] & \\mathrm{corr}[\\boldsymbol{x}_0,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{corr}[\\boldsymbol{x}_0,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\mathrm{corr}[\\boldsymbol{x}_1,\\boldsymbol{x}_0] & 1 & \\mathrm{corr}[\\boldsymbol{x}_1,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{corr}[\\boldsymbol{x}_1,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\mathrm{corr}[\\boldsymbol{x}_2,\\boldsymbol{x}_0] & \\mathrm{corr}[\\boldsymbol{x}_2,\\boldsymbol{x}_1] & 1 & \\dots & \\dots & \\mathrm{corr}[\\boldsymbol{x}_2,\\boldsymbol{x}_{p-1}]\\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", + "\\mathrm{corr}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_0] & \\mathrm{corr}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_1] & \\mathrm{corr}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_{2}] & \\dots & \\dots & 1\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Covariance Matrix Examples\n", + "\n", + "\n", + "The Numpy function **np.cov** calculates the covariance elements using\n", + "the factor $1/(n-1)$ instead of $1/n$ since it assumes we do not have\n", + "the exact mean values. The following simple function uses the\n", + "**np.vstack** function which takes each vector of dimension $1\\times n$\n", + "and produces a $2\\times n$ matrix $\\boldsymbol{W}$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{W} = \\begin{bmatrix} x_0 & y_0 \\\\\n", + " x_1 & y_1 \\\\\n", + " x_2 & y_2\\\\\n", + " \\dots & \\dots \\\\\n", + " x_{n-2} & y_{n-2}\\\\\n", + " x_{n-1} & y_{n-1} & \n", + " \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "which in turn is converted into into the $2\\times 2$ covariance matrix\n", + "$\\boldsymbol{C}$ via the Numpy function **np.cov()**. We note that we can also calculate\n", + "the mean value of each set of samples $\\boldsymbol{x}$ etc using the Numpy\n", + "function **np.mean(x)**. We can also extract the eigenvalues of the\n", + "covariance matrix through the **np.linalg.eig()** function." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Importing various packages\n", + "import numpy as np\n", + "n = 100\n", + "x = np.random.normal(size=n)\n", + "print(np.mean(x))\n", + "y = 4+3*x+np.random.normal(size=n)\n", + "print(np.mean(y))\n", + "W = np.vstack((x, y))\n", + "C = np.cov(W)\n", + "print(C)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Correlation Matrix\n", + "\n", + "The previous example can be converted into the correlation matrix by\n", + "simply scaling the matrix elements with the variances. We should also\n", + "subtract the mean values for each column. This leads to the following\n", + "code which sets up the correlations matrix for the previous example in\n", + "a more brute force way. Here we scale the mean values for each column of the design matrix, calculate the relevant mean values and variances and then finally set up the $2\\times 2$ correlation matrix (since we have only two vectors)." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "n = 100\n", + "# define two vectors \n", + "x = np.random.random(size=n)\n", + "y = 4+3*x+np.random.normal(size=n)\n", + "#scaling the x and y vectors \n", + "x = x - np.mean(x)\n", + "y = y - np.mean(y)\n", + "variance_x = np.sum(x@x)/n\n", + "variance_y = np.sum(y@y)/n\n", + "print(variance_x)\n", + "print(variance_y)\n", + "cov_xy = np.sum(x@y)/n\n", + "cov_xx = np.sum(x@x)/n\n", + "cov_yy = np.sum(y@y)/n\n", + "C = np.zeros((2,2))\n", + "C[0,0]= cov_xx/variance_x\n", + "C[1,1]= cov_yy/variance_y\n", + "C[0,1]= cov_xy/np.sqrt(variance_y*variance_x)\n", + "C[1,0]= C[0,1]\n", + "print(C)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We see that the matrix elements along the diagonal are one as they\n", + "should be and that the matrix is symmetric. Furthermore, diagonalizing\n", + "this matrix we easily see that it is a positive definite matrix.\n", + "\n", + "The above procedure with **numpy** can be made more compact if we use **pandas**.\n", + "\n", + "\n", + "## Correlation Matrix with Pandas\n", + "\n", + "We whow here how we can set up the correlation matrix using **pandas**, as done in this simple code" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "import pandas as pd\n", + "n = 10\n", + "x = np.random.normal(size=n)\n", + "x = x - np.mean(x)\n", + "y = 4+3*x+np.random.normal(size=n)\n", + "y = y - np.mean(y)\n", + "X = (np.vstack((x, y))).T\n", + "print(X)\n", + "Xpd = pd.DataFrame(X)\n", + "print(Xpd)\n", + "correlation_matrix = Xpd.corr()\n", + "print(correlation_matrix)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We expand this model to the Franke function discussed above.\n", + "\n", + "\n", + "## Correlation Matrix with Pandas and the Franke function" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Common imports\n", + "import numpy as np\n", + "import pandas as pd\n", + "\n", + "\n", + "def FrankeFunction(x,y):\n", + "\tterm1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))\n", + "\tterm2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))\n", + "\tterm3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))\n", + "\tterm4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)\n", + "\treturn term1 + term2 + term3 + term4\n", + "\n", + "\n", + "def create_X(x, y, n ):\n", + "\tif len(x.shape) > 1:\n", + "\t\tx = np.ravel(x)\n", + "\t\ty = np.ravel(y)\n", + "\n", + "\tN = len(x)\n", + "\tl = int((n+1)*(n+2)/2)\t\t# Number of elements in beta\n", + "\tX = np.ones((N,l))\n", + "\n", + "\tfor i in range(1,n+1):\n", + "\t\tq = int((i)*(i+1)/2)\n", + "\t\tfor k in range(i+1):\n", + "\t\t\tX[:,q+k] = (x**(i-k))*(y**k)\n", + "\n", + "\treturn X\n", + "\n", + "\n", + "# Making meshgrid of datapoints and compute Franke's function\n", + "n = 4\n", + "N = 100\n", + "x = np.sort(np.random.uniform(0, 1, N))\n", + "y = np.sort(np.random.uniform(0, 1, N))\n", + "z = FrankeFunction(x, y)\n", + "X = create_X(x, y, n=n) \n", + "\n", + "Xpd = pd.DataFrame(X)\n", + "# subtract the mean values and set up the covariance matrix\n", + "Xpd = Xpd - Xpd.mean()\n", + "covariance_matrix = Xpd.cov()\n", + "print(covariance_matrix)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We note here that the covariance is zero for the first rows and\n", + "columns since all matrix elements in the design matrix were set to one\n", + "(we are fitting the function in terms of a polynomial of degree $n$).\n", + "\n", + "This means that the variance for these elements will be zero and will\n", + "cause problems when we set up the correlation matrix. We can simply\n", + "drop these elements and construct a correlation\n", + "matrix without these elements. \n", + "\n", + "\n", + "\n", + "## Rewriting the Covariance and/or Correlation Matrix\n", + "\n", + "We can rewrite the covariance matrix in a more compact form in terms of the design/feature matrix $\\boldsymbol{X}$ as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x}] = \\frac{1}{n}\\boldsymbol{X}\\boldsymbol{X}^T= \\mathbb{E}[\\boldsymbol{X}\\boldsymbol{X}^T].\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To see this let us simply look at a design matrix $\\boldsymbol{X}\\in {\\mathbb{R}}^{2\\times 2}$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{X}=\\begin{bmatrix}\n", + "x_{00} & x_{01}\\\\\n", + "x_{10} & x_{11}\\\\\n", + "\\end{bmatrix}=\\begin{bmatrix}\n", + "\\boldsymbol{x}_{0} & \\boldsymbol{x}_{1}\\\\\n", + "\\end{bmatrix}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If we then compute the expectation value" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\mathbb{E}[\\boldsymbol{X}\\boldsymbol{X}^T] = \\frac{1}{n}\\boldsymbol{X}\\boldsymbol{X}^T=\\begin{bmatrix}\n", + "x_{00}^2+x_{01}^2 & x_{00}x_{10}+x_{01}x_{11}\\\\\n", + "x_{10}x_{00}+x_{11}x_{01} & x_{10}^2+x_{11}^2\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "which is just" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] = \\boldsymbol{C}[\\boldsymbol{x}]=\\begin{bmatrix} \\mathrm{var}[\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] \\\\\n", + " \\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_0] & \\mathrm{var}[\\boldsymbol{x}_1] \\\\\n", + " \\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "where we wrote $$\\boldsymbol{C}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] = \\boldsymbol{C}[\\boldsymbol{x}]$$ to indicate that this the covariance of the vectors $\\boldsymbol{x}$ of the design/feature matrix $\\boldsymbol{X}$.\n", + "\n", + "It is easy to generalize this to a matrix $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$.\n", + "\n", + "\n", + "\n", + "## Towards the PCA theorem\n", + "\n", + "We have that the covariance matrix (the correlation matrix involves a simple rescaling) is given as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x}] = \\frac{1}{n}\\boldsymbol{X}\\boldsymbol{X}^T= \\mathbb{E}[\\boldsymbol{X}\\boldsymbol{X}^T].\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let us now assume that we can perform a series of orthogonal transformations where we employ some orthogonal matrices $\\boldsymbol{S}$.\n", + "These matrices are defined as $\\boldsymbol{S}\\in {\\mathbb{R}}^{p\\times p}$ and obey the orthogonality requirements $\\boldsymbol{S}\\boldsymbol{S}^T=\\boldsymbol{S}^T\\boldsymbol{S}=\\boldsymbol{I}$. The matrix can be written out in terms of the column vectors $\\boldsymbol{s}_i$ as $\\boldsymbol{S}=[\\boldsymbol{s}_0,\\boldsymbol{s}_1,\\dots,\\boldsymbol{s}_{p-1}]$ and $\\boldsymbol{s}_i \\in {\\mathbb{R}}^{p}$.\n", + "\n", + "Assume also that there is a transformation $\\boldsymbol{S}\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{S}^T=\\boldsymbol{C}[\\boldsymbol{y}]$ such that the new matrix $\\boldsymbol{C}[\\boldsymbol{y}]$ is diagonal with elements $[\\lambda_0,\\lambda_1,\\lambda_2,\\dots,\\lambda_{p-1}]$. \n", + "\n", + "That is we have" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{y}] = \\mathbb{E}[\\boldsymbol{S}\\boldsymbol{X}\\boldsymbol{X}^T\\boldsymbol{S}^T]=\\boldsymbol{S}\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{S}^T,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "since the matrix $\\boldsymbol{S}$ is not a data dependent matrix. Multiplying with $\\boldsymbol{S}^T$ from the left we have" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{S}^T\\boldsymbol{C}[\\boldsymbol{y}] = \\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{S}^T,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "and since $\\boldsymbol{C}[\\boldsymbol{y}]$ is diagonal we have for a given eigenvalue $i$ of the covariance matrix that" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{S}^T_i\\lambda_i = \\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{S}^T_i.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In the derivation of the PCA theorem we will assume that the eigenvalues are ordered in descending order, that is\n", + "$\\lambda_0 > \\lambda_1 > \\dots > \\lambda_{p-1}$. \n", + "\n", + "\n", + "The eigenvalues tell us then how much we need to stretch the\n", + "corresponding eigenvectors. Dimensions with large eigenvalues have\n", + "thus large variations (large variance) and define therefore useful\n", + "dimensions. The data points are more spread out in the direction of\n", + "these eigenvectors. Smaller eigenvalues mean on the other hand that\n", + "the corresponding eigenvectors are shrunk accordingly and the data\n", + "points are tightly bunched together and there is not much variation in\n", + "these specific directions. Hopefully then we could leave it out\n", + "dimensions where the eigenvalues are very small. If $p$ is very large,\n", + "we could then aim at reducing $p$ to $l << p$ and handle only $l$\n", + "features/predictors.\n", + "\n", + "\n", + "## The Algorithm before theorem\n", + "\n", + "Here's how we would proceed in setting up the algorithm for the PCA, see also discussion below here. \n", + "* Set up the datapoints for the design/feature matrix $\\boldsymbol{X}$ with $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$, with the predictors/features $p$ referring to the column numbers and the entries $n$ being the row elements." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{X}=\\begin{bmatrix}\n", + "x_{0,0} & x_{0,1} & x_{0,2}& \\dots & \\dots x_{0,p-1}\\\\\n", + "x_{1,0} & x_{1,1} & x_{1,2}& \\dots & \\dots x_{1,p-1}\\\\\n", + "x_{2,0} & x_{2,1} & x_{2,2}& \\dots & \\dots x_{2,p-1}\\\\\n", + "\\dots & \\dots & \\dots & \\dots \\dots & \\dots \\\\\n", + "x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \\dots & \\dots x_{n-2,p-1}\\\\\n", + "x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \\dots & \\dots x_{n-1,p-1}\\\\\n", + "\\end{bmatrix},\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "* Center the data by subtracting the mean value for each column. This leads to a new matrix $\\boldsymbol{X}\\rightarrow \\overline{\\boldsymbol{X}}$.\n", + "\n", + "* Compute then the covariance/correlation matrix $\\mathbb{E}[\\overline{\\boldsymbol{X}}\\overline{\\boldsymbol{X}}^T]$.\n", + "\n", + "* Find the eigenpairs of $\\boldsymbol{C}$ with eigenvalues $[\\lambda_0,\\lambda_1,\\dots,\\lambda_{p-1}]$ and eigenvectors $[\\boldsymbol{s}_0,\\boldsymbol{s}_1,\\dots,\\boldsymbol{s}_{p-1}]$.\n", + "\n", + "* Order the eigenvalue (and the eigenvectors accordingly) in order of decreasing eigenvalues.\n", + "\n", + "* Keep only those $l$ eigenvalues larger than a selected threshold value, discarding thus $p-l$ features since we expect small variations in the data here.\n", + "\n", + "## Writing our own PCA code\n", + "\n", + "We will use a simple example first with two-dimensional data\n", + "drawn from a multivariate normal distribution with the following mean and covariance matrix:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\mu = (-1,2) \\qquad \\Sigma = \\begin{bmatrix} 4 & 2 \\\\\n", + "2 & 2\n", + "\\end{bmatrix}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Note that the mean refers to each column of data. \n", + "We will generate $n = 1000$ points $X = \\{ x_1, \\ldots, x_N \\}$ from\n", + "this distribution, and store them in the $1000 \\times 2$ matrix $\\boldsymbol{X}$.\n", + "\n", + "The following Python code aids in setting up the data and writing out the design matrix.\n", + "Note that the function **multivariate** returns also the covariance discussed above and that it is defined by dividing by $n-1$ instead of $n$." + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "from IPython.display import display\n", + "n = 10000\n", + "mean = (-1, 2)\n", + "cov = [[4, 2], [2, 2]]\n", + "X = np.random.multivariate_normal(mean, cov, n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now we are going to implement the PCA algorithm. We will break it down into various substeps.\n", + "\n", + "### Compute the sample mean and center the data\n", + "\n", + "The first step of PCA is to compute the sample mean of the data and use it to center the data. Recall that the sample mean is" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\mu_n = \\frac{1}{n} \\sum_{i=1}^n x_i\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "and the mean-centered data $\\bar{X} = \\{ \\bar{x}_1, \\ldots, \\bar{x}_n \\}$ takes the form" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\bar{x}_i = x_i - \\mu_n.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "When you are done with these steps, print out $\\mu_n$ to verify it is\n", + "close to $\\mu$ and plot your mean centered data to verify it is\n", + "centered at the origin! Compare your code with the functionality from **Scikit-Learn** discussed above.\n", + "The following code elements perform these operations using **pandas** or using our own functionality for doing so. The latter, using **numpy** is rather simple through the **mean()** function." + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "df = pd.DataFrame(X)\n", + "# Pandas does the centering for us\n", + "df = df -df.mean()\n", + "# we center it ourselves\n", + "X_centered = X - X.mean(axis=0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Alternatively, we could use the functions we discussed\n", + "earlier for scaling the data set. That is, we could have used the\n", + "**StandardScaler** function in **Scikit-Learn**, a function which ensures\n", + "that for each feature/predictor we study the mean value is zero and\n", + "the variance is one (every column in the design/feature matrix). You\n", + "would then not get the same results, since we divide by the\n", + "variance. The diagonal covariance matrix elements will then be one,\n", + "while the non-diagonal ones need to be divided by $2\\sqrt{2}$ for our\n", + "specific case.\n", + "\n", + "### Compute the sample covariance\n", + "\n", + "Now we are going to use the mean centered data to compute the sample covariance of the data by using the following equation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\Sigma_n = \\frac{1}{n-1} \\sum_{i=1}^n \\bar{x}_i^T \\bar{x}_i = \\frac{1}{n-1} \\sum_{i=1}^n (x_i - \\mu_n)^T (x_i - \\mu_n)\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "where the data points $x_i \\in \\mathbb{R}^p$ (here in this example $p = 2$) are column vectors and $x^T$ is the transpose of $x$.\n", + "We can write our own code or simply use either the functionaly of **numpy** or that of **pandas**, as follows" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "print(df.cov())\n", + "print(np.cov(X_centered.T))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Note that the way we define the covariance matrix here has a factor $n-1$ instead of $n$. This is included in the **cov()** function by **numpy** and **pandas**. \n", + "Our own code here is not very elegant and asks for obvious improvements. It is tailored to this specific $2\\times 2$ covariance matrix." + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# extract the relevant columns from the centered design matrix of dim n x 2\n", + "x = X_centered[:,0]\n", + "y = X_centered[:,1]\n", + "Cov = np.zeros((2,2))\n", + "Cov[0,1] = np.sum(x.T@y)/(n-1.0)\n", + "Cov[0,0] = np.sum(x.T@x)/(n-1.0)\n", + "Cov[1,1] = np.sum(y.T@y)/(n-1.0)\n", + "Cov[1,0]= Cov[0,1]\n", + "print(\"Centered covariance using own code\")\n", + "print(Cov)\n", + "plt.plot(x, y, 'x')\n", + "plt.axis('equal')\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Depending on the number of points $n$, we will get results that are close to the covariance values defined above.\n", + "The plot shows how the data are clustered around a line with slope close to one. Is this expected?\n", + "\n", + "### Diagonalize the sample covariance matrix to obtain the principal components\n", + "\n", + "Now we are ready to solve for the principal components! To do so we\n", + "diagonalize the sample covariance matrix $\\Sigma$. We can use the\n", + "function **np.linalg.eig** to do so. It will return the eigenvalues and\n", + "eigenvectors of $\\Sigma$. Once we have these we can perform the \n", + "following tasks:\n", + "\n", + "* We compute the percentage of the total variance captured by the first principal component\n", + "\n", + "* We plot the mean centered data and lines along the first and second principal components\n", + "\n", + "* Then we project the mean centered data onto the first and second principal components, and plot the projected data. \n", + "\n", + "* Finally, we approximate the data as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "x_i \\approx \\tilde{x}_i = \\mu_n + \\langle x_i, v_0 \\rangle v_0\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "where $v_0$ is the first principal component. \n", + "\n", + "Collecting all these steps we can write our own PCA function and\n", + "compare this with the functionality included in **Scikit-Learn**. \n", + "\n", + "The code here outlines some of the elements we could include in the\n", + "analysis. Feel free to extend upon this in order to address the above\n", + "questions." + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# diagonalize and obtain eigenvalues, not necessarily sorted\n", + "EigValues, EigVectors = np.linalg.eig(Cov)\n", + "# sort eigenvectors and eigenvalues\n", + "#permute = EigValues.argsort()\n", + "#EigValues = EigValues[permute]\n", + "#EigVectors = EigVectors[:,permute]\n", + "print(\"Eigenvalues of Covariance matrix\")\n", + "for i in range(2):\n", + " print(EigValues[i])\n", + "FirstEigvector = EigVectors[:,0]\n", + "SecondEigvector = EigVectors[:,1]\n", + "print(\"First eigenvector\")\n", + "print(FirstEigvector)\n", + "print(\"Second eigenvector\")\n", + "print(SecondEigvector)\n", + "#thereafter we do a PCA with Scikit-learn\n", + "from sklearn.decomposition import PCA\n", + "pca = PCA(n_components = 2)\n", + "X2Dsl = pca.fit_transform(X)\n", + "print(\"Eigenvector of largest eigenvalue\")\n", + "print(pca.components_.T[:, 0])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This code does not contain all the above elements, but it shows how we can use **Scikit-Learn** to extract the eigenvector which corresponds to the largest eigenvalue. Try to address the questions we pose before the above code. Try also to change the values of the covariance matrix by making one of the diagonal elements much larger than the other. What do you observe then? \n", + "\n", + "\n", + "## Classical PCA Theorem\n", + "\n", + "We assume now that we have a design matrix $\\boldsymbol{X}$ which has been\n", + "centered as discussed above. For the sake of simplicity we skip the\n", + "overline symbol. The matrix is defined in terms of the various column\n", + "vectors $[\\boldsymbol{x}_0,\\boldsymbol{x}_1,\\dots, \\boldsymbol{x}_{p-1}]$ each with dimension\n", + "$\\boldsymbol{x}\\in {\\mathbb{R}}^{n}$.\n", + "\n", + "We assume also that we have an orthogonal transformation $\\boldsymbol{W}\\in {\\mathbb{R}}^{p\\times p}$. We define the reconstruction error (which is similar to the mean squared error we have seen before) as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "J(\\boldsymbol{W},\\boldsymbol{Z}) = \\frac{1}{n}\\sum_i (\\boldsymbol{x}_i - \\overline{\\boldsymbol{x}}_i)^2,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "with $\\overline{\\boldsymbol{x}}_i = \\boldsymbol{W}\\boldsymbol{z}_i$, where $\\boldsymbol{z}_i$ is a row vector with dimension ${\\mathbb{R}}^{n}$ of the matrix\n", + "$\\boldsymbol{Z}\\in{\\mathbb{R}}^{p\\times n}$. When doing PCA we want to reduce this dimensionality. \n", + "\n", + "The PCA theorem states that minimizing the above reconstruction error\n", + "corresponds to setting $\\boldsymbol{W}=\\boldsymbol{S}$, the orthogonal matrix which\n", + "diagonalizes the empirical covariance(correlation) matrix. The optimal\n", + "low-dimensional encoding of the data is then given by a set of vectors\n", + "$\\boldsymbol{z}_i$ with at most $l$ vectors, with $l << p$, defined by the\n", + "orthogonal projection of the data onto the columns spanned by the\n", + "eigenvectors of the covariance(correlations matrix).\n", + "\n", + "The proof which follows will be updated by mid January 2020.\n", + "\n", + "\n", + "## Proof of the PCA Theorem\n", + "\n", + "To show the PCA theorem let us start with the assumption that there is one vector $\\boldsymbol{w}_0$ which corresponds to a solution which minimized the reconstruction error $J$. This is an orthogonal vector. It means that we now approximate the reconstruction error in terms of $\\boldsymbol{w}_0$ and $\\boldsymbol{z}_0$ as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "J(\\boldsymbol{w}_0,\\boldsymbol{z}_0)= \\frac{1}{n}\\sum_i (\\boldsymbol{x}_i - z_{i0}\\boldsymbol{w}_0)^2=\\frac{1}{n}\\sum_i (\\boldsymbol{x}_i^T\\boldsymbol{x}_i - 2z_{i0}\\boldsymbol{w}_0^T\\boldsymbol{x}_i+z_{i0}^2\\boldsymbol{w}_0^T\\boldsymbol{w}_0),\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "which we can rewrite due to the orthogonality of $\\boldsymbol{w}_i$ as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "J(\\boldsymbol{w}_0,\\boldsymbol{z}_0)=\\frac{1}{n}\\sum_i (\\boldsymbol{x}_i^T\\boldsymbol{x}_i - 2z_{i0}\\boldsymbol{w}_0^T\\boldsymbol{x}_i+z_{i0}^2).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Minimizing $J$ with respect to the unknown parameters $z_{0i}$ we obtain that" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "z_{i0}=\\boldsymbol{w}_0^T\\boldsymbol{x}_i,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "where the vectors on the rhs are known. \n", + "\n", + "\n", + "\n", + "## PCA Proof continued\n", + "\n", + "We have now found the unknown parameters $z_{i0}$. These correspond to the projected coordinates and we can write" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "J(\\boldsymbol{w}_0)= \\frac{1}{p}\\sum_i (\\boldsymbol{x}_i^T\\boldsymbol{x}_i - z_{i0}^2)=\\mathrm{const}-\\frac{1}{n}\\sum_i z_{i0}^2.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We can show that the variance of the projected coordinates defined by $\\boldsymbol{w}_0^T\\boldsymbol{x}_i$ are given by" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\mathrm{var}[\\boldsymbol{w}_0^T\\boldsymbol{x}_i] = \\frac{1}{n}\\sum_i z_{i0}^2,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "since the expectation value of" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\mathbb{E}[\\boldsymbol{w}_0^T\\boldsymbol{x}_i] = \\mathbb{E}[z_{i0}]= \\boldsymbol{w}_0^T\\mathbb{E}[\\boldsymbol{x}_i]=0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "where we have used the fact that our data are centered.\n", + "\n", + "Recalling our definition of the covariance as" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x}] = \\frac{1}{n}\\boldsymbol{X}\\boldsymbol{X}^T=\\mathbb{E}[\\boldsymbol{X}\\boldsymbol{X}^T],\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "we have thus that" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\mathrm{var}[\\boldsymbol{w}_0^T\\boldsymbol{x}_i] = \\frac{1}{n}\\sum_i z_{i0}^2=\\boldsymbol{w}_0^T\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{w}_0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We are almost there, we have obtained a relation between minimizing\n", + "the reconstruction error and the variance and the covariance\n", + "matrix. Minimizing the error is equivalent to maximizing the variance\n", + "of the projected data.\n", + "\n", + "\n", + "## The final step\n", + "\n", + "We could trivially maximize the variance of the projection (and\n", + "thereby minimize the error in the reconstruction function) by letting\n", + "the norm-2 of $\\boldsymbol{w}_0$ go to infinity. However, this norm since we\n", + "want the matrix $\\boldsymbol{W}$ to be an orthogonal matrix, is constrained by\n", + "$\\vert\\vert \\boldsymbol{w}_0 \\vert\\vert_2^2=1$. Imposing this condition via a\n", + "Lagrange multiplier we can then in turn maximize" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "J(\\boldsymbol{w}_0)= \\boldsymbol{w}_0^T\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{w}_0+\\lambda_0(1-\\boldsymbol{w}_0^T\\boldsymbol{w}_0).\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Taking the derivative with respect to $\\boldsymbol{w}_0$ we obtain" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial J(\\boldsymbol{w}_0)}{\\partial \\boldsymbol{w}_0}= 2\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{w}_0-2\\lambda_0\\boldsymbol{w}_0=0,\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "meaning that" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{w}_0=\\lambda_0\\boldsymbol{w}_0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**The direction that maximizes the variance (or minimizes the construction error) is an eigenvector of the covariance matrix**! If we left multiply with $\\boldsymbol{w}_0^T$ we have the variance of the projected data is" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\boldsymbol{w}_0^T\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{w}_0=\\lambda_0.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If we want to maximize the variance (minimize the construction error)\n", + "we simply pick the eigenvector of the covariance matrix with the\n", + "largest eigenvalue. This establishes the link between the minimization\n", + "of the reconstruction function $J$ in terms of an orthogonal matrix\n", + "and the maximization of the variance and thereby the covariance of our\n", + "observations encoded in the design/feature matrix $\\boldsymbol{X}$.\n", + "\n", + "The proof\n", + "for the other eigenvectors $\\boldsymbol{w}_1,\\boldsymbol{w}_2,\\dots$ can be\n", + "established by applying the above arguments and using the fact that\n", + "our basis of eigenvectors is orthogonal, see [Murphy chapter\n", + "12.2](https://mitpress.mit.edu/books/machine-learning-1). The\n", + "discussion in chapter 12.2 of Murphy's text has also a nice link with\n", + "the Singular Value Decomposition theorem. For categorical data, see\n", + "chapter 12.4 and discussion therein.\n", + "\n", + "Additional part of the proof for the other eigenvectors will be added by mid January 2020.\n", + "\n", + "\n", + "## Geometric Interpretation and link with Singular Value Decomposition\n", + "\n", + "This material will be added by mid January 2020.\n", + "\n", + "\n", + "\n", + "## Principal Component Analysis\n", + "\n", + "Principal Component Analysis (PCA) is by far the most popular dimensionality reduction algorithm.\n", + "First it identifies the hyperplane that lies closest to the data, and then it projects the data onto it.\n", + "\n", + "The following Python code uses NumPy’s **svd()** function to obtain all the principal components of the\n", + "training set, then extracts the first two principal components. First we center the data using either **pandas** or our own code" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "import pandas as pd\n", + "from IPython.display import display\n", + "np.random.seed(100)\n", + "# setting up a 10 x 5 vanilla matrix \n", + "rows = 10\n", + "cols = 5\n", + "X = np.random.randn(rows,cols)\n", + "df = pd.DataFrame(X)\n", + "# Pandas does the centering for us\n", + "df = df -df.mean()\n", + "display(df)\n", + "\n", + "# we center it ourselves\n", + "X_centered = X - X.mean(axis=0)\n", + "# Then check the difference between pandas and our own set up\n", + "print(X_centered-df)\n", + "#Now we do an SVD\n", + "U, s, V = np.linalg.svd(X_centered)\n", + "c1 = V.T[:, 0]\n", + "c2 = V.T[:, 1]\n", + "W2 = V.T[:, :2]\n", + "X2D = X_centered.dot(W2)\n", + "print(X2D)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "PCA assumes that the dataset is centered around the origin. Scikit-Learn’s PCA classes take care of centering\n", + "the data for you. However, if you implement PCA yourself (as in the preceding example), or if you use other libraries, don’t\n", + "forget to center the data first.\n", + "\n", + "Once you have identified all the principal components, you can reduce the dimensionality of the dataset\n", + "down to $d$ dimensions by projecting it onto the hyperplane defined by the first $d$ principal components.\n", + "Selecting this hyperplane ensures that the projection will preserve as much variance as possible." + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "W2 = V.T[:, :2]\n", + "X2D = X_centered.dot(W2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## PCA and scikit-learn\n", + "\n", + "Scikit-Learn’s PCA class implements PCA using SVD decomposition just like we did before. The\n", + "following code applies PCA to reduce the dimensionality of the dataset down to two dimensions (note\n", + "that it automatically takes care of centering the data):" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "#thereafter we do a PCA with Scikit-learn\n", + "from sklearn.decomposition import PCA\n", + "pca = PCA(n_components = 2)\n", + "X2D = pca.fit_transform(X)\n", + "print(X2D)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "After fitting the PCA transformer to the dataset, you can access the principal components using the\n", + "components variable (note that it contains the PCs as horizontal vectors, so, for example, the first\n", + "principal component is equal to" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "pca.components_.T[:, 0]." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Another very useful piece of information is the explained variance ratio of each principal component,\n", + "available via the $explained\\_variance\\_ratio$ variable. It indicates the proportion of the dataset’s\n", + "variance that lies along the axis of each principal component. \n", + "\n", + "\n", + "## Back to the Cancer Data\n", + "We can now repeat the above but applied to real data, in this case our breast cancer data.\n", + "Here we compute performance scores on the training data using logistic regression." + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "from sklearn.model_selection import train_test_split \n", + "from sklearn.datasets import load_breast_cancer\n", + "from sklearn.linear_model import LogisticRegression\n", + "cancer = load_breast_cancer()\n", + "\n", + "X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)\n", + "\n", + "logreg = LogisticRegression()\n", + "logreg.fit(X_train, y_train)\n", + "print(\"Train set accuracy from Logistic Regression: {:.2f}\".format(logreg.score(X_train,y_train)))\n", + "# We scale the data\n", + "from sklearn.preprocessing import StandardScaler\n", + "scaler = StandardScaler()\n", + "scaler.fit(X_train)\n", + "X_train_scaled = scaler.transform(X_train)\n", + "X_test_scaled = scaler.transform(X_test)\n", + "# Then perform again a log reg fit\n", + "logreg.fit(X_train_scaled, y_train)\n", + "print(\"Train set accuracy scaled data: {:.2f}\".format(logreg.score(X_train_scaled,y_train)))\n", + "#thereafter we do a PCA with Scikit-learn\n", + "from sklearn.decomposition import PCA\n", + "pca = PCA(n_components = 2)\n", + "X2D_train = pca.fit_transform(X_train_scaled)\n", + "# and finally compute the log reg fit and the score on the training data\t\n", + "logreg.fit(X2D_train,y_train)\n", + "print(\"Train set accuracy scaled and PCA data: {:.2f}\".format(logreg.score(X2D_train,y_train)))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We see that our training data after the PCA decomposition has a performance similar to the non-scaled data. \n", + "\n", + "\n", + "## More on the PCA\n", + "\n", + "Instead of arbitrarily choosing the number of dimensions to reduce down to, it is generally preferable to\n", + "choose the number of dimensions that add up to a sufficiently large portion of the variance (e.g., 95%).\n", + "Unless, of course, you are reducing dimensionality for data visualization — in that case you will\n", + "generally want to reduce the dimensionality down to 2 or 3.\n", + "The following code computes PCA without reducing dimensionality, then computes the minimum number\n", + "of dimensions required to preserve 95% of the training set’s variance:" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "pca = PCA()\n", + "pca.fit(X)\n", + "cumsum = np.cumsum(pca.explained_variance_ratio_)\n", + "d = np.argmax(cumsum >= 0.95) + 1" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You could then set $n\\_components=d$ and run PCA again. However, there is a much better option: instead\n", + "of specifying the number of principal components you want to preserve, you can set $n\\_components$ to be\n", + "a float between 0.0 and 1.0, indicating the ratio of variance you wish to preserve:" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "pca = PCA(n_components=0.95)\n", + "X_reduced = pca.fit_transform(X)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Incremental PCA\n", + "\n", + "One problem with the preceding implementation of PCA is that it requires the whole training set to fit in\n", + "memory in order for the SVD algorithm to run. Fortunately, Incremental PCA (IPCA) algorithms have\n", + "been developed: you can split the training set into mini-batches and feed an IPCA algorithm one minibatch\n", + "at a time. This is useful for large training sets, and also to apply PCA online (i.e., on the fly, as new\n", + "instances arrive).\n", + "\n", + "\n", + "## Randomized PCA\n", + "\n", + "Scikit-Learn offers yet another option to perform PCA, called Randomized PCA. This is a stochastic\n", + "algorithm that quickly finds an approximation of the first d principal components. Its computational\n", + "complexity is $O(m \\times d^2)+O(d^3)$, instead of $O(m \\times n^2) + O(n^3)$, so it is dramatically faster than the\n", + "previous algorithms when $d$ is much smaller than $n$.\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "## Kernel PCA\n", + "\n", + "The kernel trick is a mathematical technique that implicitly maps instances into a\n", + "very high-dimensional space (called the feature space), enabling nonlinear classification and regression\n", + "with Support Vector Machines. Recall that a linear decision boundary in the high-dimensional feature\n", + "space corresponds to a complex nonlinear decision boundary in the original space.\n", + "It turns out that the same trick can be applied to PCA, making it possible to perform complex nonlinear\n", + "projections for dimensionality reduction. This is called Kernel PCA (kPCA). It is often good at\n", + "preserving clusters of instances after projection, or sometimes even unrolling datasets that lie close to a\n", + "twisted manifold.\n", + "For example, the following code uses Scikit-Learn’s KernelPCA class to perform kPCA with an" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from sklearn.decomposition import KernelPCA\n", + "rbf_pca = KernelPCA(n_components = 2, kernel=\"rbf\", gamma=0.04)\n", + "X_reduced = rbf_pca.fit_transform(X)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## LLE\n", + "\n", + "Locally Linear Embedding (LLE) is another very powerful nonlinear dimensionality reduction\n", + "(NLDR) technique. It is a Manifold Learning technique that does not rely on projections like the previous\n", + "algorithms. In a nutshell, LLE works by first measuring how each training instance linearly relates to its\n", + "closest neighbors (c.n.), and then looking for a low-dimensional representation of the training set where\n", + "these local relationships are best preserved (more details shortly). \n", + "\n", + "\n", + "\n", + "\n", + "## Other techniques\n", + "\n", + "\n", + "There are many other dimensionality reduction techniques, several of which are available in Scikit-Learn.\n", + "\n", + "Here are some of the most popular:\n", + "* **Multidimensional Scaling (MDS)** reduces dimensionality while trying to preserve the distances between the instances.\n", + "\n", + "* **Isomap** creates a graph by connecting each instance to its nearest neighbors, then reduces dimensionality while trying to preserve the geodesic distances between the instances.\n", + "\n", + "* **t-Distributed Stochastic Neighbor Embedding** (t-SNE) reduces dimensionality while trying to keep similar instances close and dissimilar instances apart. It is mostly used for visualization, in particular to visualize clusters of instances in high-dimensional space (e.g., to visualize the MNIST images in 2D).\n", + "\n", + "* Linear Discriminant Analysis (LDA) is actually a classification algorithm, but during training it learns the most discriminative axes between the classes, and these axes can then be used to define a hyperplane onto which to project the data. The benefit is that the projection will keep classes as far apart as possible, so LDA is a good technique to reduce dimensionality before running another classification algorithm such as a Support Vector Machine (SVM) classifier discussed in the SVM lectures." + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/doc/src/LectureNotes/_build/html/chapter1.html b/doc/src/LectureNotes/_build/html/chapter1.html index 20fe64aea..de400ade1 100644 --- a/doc/src/LectureNotes/_build/html/chapter1.html +++ b/doc/src/LectureNotes/_build/html/chapter1.html @@ -174,6 +174,16 @@ 18. Neural networks, from the simple perceptron to deep learning +
1.5027679581515354
-[[ 4.01839868 4.38511101 9.23577076 8.53622276 4.78693205 9.01249172
- 5.62006613 2.52380443 6.68351121 4.12787844]
- [ 4.38511101 4.78528891 10.07861174 9.31522416 5.22377946 9.83495664
- 6.13294396 2.7541226 7.29343725 4.50458172]
- [ 9.23577076 10.07861174 21.22722716 19.61940636 11.00214554 20.71404911
- 12.9169967 5.80063878 15.36118796 9.48739587]
- [ 8.53622276 9.31522416 19.61940636 18.13336726 10.16880644 19.14509813
- 11.9386204 5.3612791 14.19768049 8.76878895]
- [ 4.78693205 5.22377946 11.00214554 10.16880644 5.70245024 10.73616358
- 6.69492424 3.00649122 7.96175706 4.91735022]
- [ 9.01249172 9.83495664 20.71404911 19.14509813 10.73616358 20.21327739
- 12.60472232 5.66040565 14.98982413 9.25803368]
- [ 5.62006613 6.13294396 12.9169967 11.9386204 6.69492424 12.60472232
- 7.86013182 3.52975127 9.34744857 5.77318272]
- [ 2.52380443 2.7541226 5.80063878 5.3612791 3.00649122 5.66040565
- 3.52975127 1.58510624 4.19766095 2.59256454]
- [ 6.68351121 7.29343725 15.36118796 14.19768049 7.96175706 14.98982413
- 9.34744857 4.19766095 11.11619967 6.86560096]
- [ 4.12787844 4.50458172 9.48739587 8.76878895 4.91735022 9.25803368
- 5.77318272 2.59256454 6.86560096 4.24034094]]
+9.106279149747735
+[[ 1.87336856 1.77787047 1.44771535 6.44982327 11.43684153
+ 5.83694909 1.84228806 7.37557482 -2.58314202 6.48643762]
+ [ 1.77787047 1.68724056 1.37391564 6.12103277 10.85382947
+ 5.53940088 1.74837435 6.9995926 -2.45146205 6.15578065]
+ [ 1.44771535 1.37391564 1.11877597 4.98434123 8.83824539
+ 4.51071987 1.42369673 5.69975023 -1.99621924 5.01263633]
+ [ 6.44982327 6.12103277 4.98434123 22.2061057 39.37591798
+ 20.09604032 6.34281617 25.39337703 -8.89350334 22.33216531]
+ [ 11.43684153 10.85382947 8.83824539 39.37591798 69.82146882
+ 35.63434516 11.2470963 45.02759486 -15.76998069 39.59944717]
+ [ 5.83694909 5.53940088 4.51071987 20.09604032 35.63434516
+ 18.18647726 5.74011 22.9804512 -8.04842615 20.21012151]
+ [ 1.84228806 1.74837435 1.42369673 6.34281617 11.2470963
+ 5.74011 1.8117232 7.25320885 -2.54028588 6.37882306]
+ [ 7.37557482 6.9995926 5.69975023 25.39337703 45.02759486
+ 22.9804512 7.25320885 29.03812156 -10.16999948 25.53753014]
+ [ -2.58314202 -2.45146205 -1.99621924 -8.89350334 -15.76998069
+ -8.04842615 -2.54028588 -10.16999948 3.56183127 -8.94398998]
+ [ 6.48643762 6.15578065 5.01263633 22.33216531 39.59944717
+ 20.21012151 6.37882306 25.53753014 -8.94398998 22.45894054]]
-0.02709116808235872
-4.0262891855828515
--0.05083752107727271
-1.1034925742304618 9.662232920789233 19.396576628082066
-3.1026745228913506 3.57651731449913 9.947888130154134
-[[ 1.10349257 3.10267452 3.57651731]
- [ 3.10267452 9.66223292 9.94788813]
- [ 3.57651731 9.94788813 19.39657663]]
-[26.46728898 0.08444587 3.61056727]
+0.06894012083823547
+4.139781119573823
+0.04321525078901231
+1.0006918520539008 10.50426403458282 18.88724031810869
+3.0717579594084814 3.4645963550106305 10.40024628605229
+[[ 1.00069185 3.07175796 3.46459636]
+ [ 3.07175796 10.50426403 10.40024629]
+ [ 3.46459636 10.40024629 18.88724032]]
+[26.72833966 0.07676079 3.58709575]
0.02793163482104733 1.025167138849349
+-0.027481252820017347 1.0170183171235068
diff --git a/doc/src/LectureNotes/_build/html/chapter3.html b/doc/src/LectureNotes/_build/html/chapter3.html
index 1c4d89f6a..489503811 100644
--- a/doc/src/LectureNotes/_build/html/chapter3.html
+++ b/doc/src/LectureNotes/_build/html/chapter3.html
@@ -175,6 +175,16 @@
18. Neural networks, from the simple perceptron to deep learning
+ [-0.80600218 -0.30092 -0.79536928 0.14039618 0.5768749 0.74732035
- -2.28459617 -0.84483144 -1.24760167 1.04875861]
+[ 0.99499832 -0.89728339 -1.69744895 -1.03875025 -0.07638981 0.18716123
+ -0.27804028 0.72149922 1.25862131 -0.7970463 ]
Training R2
-0.9999853406074647
+0.9999886705644145
Training MSE
-6.359080163429899
+3.90943518299982
Test R2
-0.9999859407754539
+0.9999697792755088
Test MSE
-6.980914000813206
+25.32441051671905
<matplotlib.axes._subplots.AxesSubplot at 0x7fddb4c436d0>
+<matplotlib.axes._subplots.AxesSubplot at 0x7fb5be1db040>
@@ -2229,27 +2239,27 @@ techniques.
MSE before scaling: 0.00
R2 score before scaling 0.99
Feature min values before scaling:
- [1.00000000e+00 4.28119384e-04 8.30273573e-04 1.83286207e-07
- 3.55456211e-07 6.89354206e-07 7.84683780e-11 1.52177694e-10
- 2.95125898e-10 5.72352580e-10 3.35938336e-14 6.51502206e-14
- 1.26349118e-13 2.45035234e-13 4.75209222e-13 1.43821714e-17
- 2.78920723e-17 5.40925064e-17 1.04904333e-16 2.03446279e-16
- 3.94553659e-16]
+ [1.00000000e+00 1.97624658e-03 6.76071445e-04 3.90555053e-06
+ 1.33608388e-06 4.57072598e-07 7.71833086e-09 2.64043119e-09
+ 9.03288157e-10 3.09013732e-10 1.52533249e-11 5.21814310e-12
+ 1.78512013e-12 6.10687329e-13 2.08915360e-13 3.01443312e-14
+ 1.03123374e-14 3.52783754e-15 1.20686874e-15 4.12868265e-16
+ 1.41241709e-16]
Feature max values before scaling:
- [1. 0.99959919 0.99554286 0.99919855 0.99514384 0.99110558
- 0.99879806 0.99474497 0.99070834 0.98668808 0.99839773 0.99434627
- 0.99031125 0.98629261 0.98229027 0.99799757 0.99394773 0.98991433
- 0.98589729 0.98189656 0.97791206]
+ [1. 0.99729116 0.99990303 0.99458965 0.99719445 0.99980607
+ 0.99189546 0.9944932 0.99709775 0.99970911 0.98920857 0.99179928
+ 0.99439677 0.99700106 0.99961217 0.98652896 0.98911265 0.9917031
+ 0.99430034 0.99690438 0.99951524]
Feature min values after scaling:
- [ 0. -1.69931545 -1.67469653 -1.11879252 -1.10594061 -1.09316288
- -0.88278129 -0.87818569 -0.8737743 -0.8695324 -0.74532693 -0.74499485
- -0.74480651 -0.74474355 -0.7447873 -0.65291273 -0.65458157 -0.65636186
- -0.6582414 -0.6602078 -0.66224856]
+ [ 0. -1.72006556 -1.76752166 -1.10773734 -1.11611153 -1.12503152
+ -0.87804483 -0.88146268 -0.88496565 -0.8885653 -0.75100539 -0.75305518
+ -0.75511928 -0.75719979 -0.75929911 -0.66720819 -0.66863343 -0.67005915
+ -0.67148589 -0.67291428 -0.67434497]
Feature max values after scaling:
- [0. 1.73355301 1.72505955 2.27111673 2.24946337 2.22510326
- 2.69980853 2.67945831 2.65749797 2.63400218 3.05843173 3.04339787
- 3.02720478 3.00984683 2.99131512 3.36770789 3.3585133 3.3484316
- 3.33743441 3.32549161 3.31257165]
+ [0. 1.74774217 1.73485006 2.2506647 2.23491553 2.21893993
+ 2.6752011 2.65930564 2.64314172 2.62671501 3.05237641 3.03669249
+ 3.02075875 3.00457804 2.98815333 3.39653406 3.38082542 3.36489022
+ 3.34873108 3.33235061 3.31575145]
MSE after scaling: 0.00
R2 score for scaled data: 0.99
@@ -2839,10 +2849,10 @@ covariance matrix through the np.linalg.eig() function.
0.10594950732957698
-4.624126522020202
-[[ 0.994928 3.03386068]
- [ 3.03386068 10.13854864]]
+0.12208685625303164
+4.452659449239899
+[[ 1.00910422 3.12769989]
+ [ 3.12769989 10.63920917]]
0.07844342450165018
-1.1438626259785865
-[[1. 0.60716876]
- [0.60716876 1. ]]
+0.08487462066865184
+1.7716882265595972
+[[1. 0.74332853]
+ [0.74332853 1. ]]
[[-0.1066151 0.79747251]
- [ 0.75209514 1.96762409]
- [-0.41638994 -2.34035396]
- [-0.2780316 -1.49418072]
- [ 0.86865915 2.72245363]
- [ 0.20418073 0.86260647]
- [-0.79048758 -0.42464144]
- [-0.01768994 -0.1467412 ]
- [-0.26355349 -1.81771904]
- [ 0.04783264 -0.12652035]]
+[[-0.63821798 -2.03548189]
+ [ 0.98355854 2.40965456]
+ [ 0.48870683 2.68995497]
+ [ 0.44655566 1.28908336]
+ [ 0.3871261 -0.67155367]
+ [-0.32256574 -0.55849157]
+ [ 1.3507663 2.75066843]
+ [-1.44489727 -5.37462032]
+ [-0.42087991 1.26840089]
+ [-0.83015254 -1.76761477]]
0 1
-0 -0.106615 0.797473
-1 0.752095 1.967624
-2 -0.416390 -2.340354
-3 -0.278032 -1.494181
-4 0.868659 2.722454
-5 0.204181 0.862606
-6 -0.790488 -0.424641
-7 -0.017690 -0.146741
-8 -0.263553 -1.817719
-9 0.047833 -0.126520
+0 -0.638218 -2.035482
+1 0.983559 2.409655
+2 0.488707 2.689955
+3 0.446556 1.289083
+4 0.387126 -0.671554
+5 -0.322566 -0.558492
+6 1.350766 2.750668
+7 -1.444897 -5.374620
+8 -0.420880 1.268401
+9 -0.830153 -1.767615
0 1
-0 1.000000 0.824095
-1 0.824095 1.000000
+0 1.000000 0.877156
+1 0.877156 1.000000
0 1 2 3 4 5 6 7 \
0 0.0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
-1 0.0 0.090154 0.084830 0.094410 0.086610 0.079643 0.088034 0.080631
-2 0.0 0.084830 0.081616 0.091708 0.085377 0.079558 0.087469 0.081068
-3 0.0 0.094410 0.091708 0.104704 0.097816 0.091403 0.101195 0.093913
-4 0.0 0.086610 0.085377 0.097816 0.092341 0.087099 0.095895 0.089763
-5 0.0 0.079643 0.079558 0.091403 0.087099 0.082837 0.090734 0.085584
-6 0.0 0.088034 0.087469 0.101195 0.095895 0.090734 0.100269 0.094057
-7 0.0 0.080631 0.081068 0.093913 0.089763 0.085584 0.094057 0.088862
-8 0.0 0.074145 0.075363 0.087388 0.084186 0.080823 0.088367 0.084031
-9 0.0 0.068449 0.070272 0.081540 0.079119 0.076438 0.083169 0.079557
-10 0.0 0.080692 0.081580 0.095076 0.091141 0.087107 0.095945 0.090806
-11 0.0 0.074184 0.075759 0.088306 0.085279 0.082038 0.089878 0.085590
-12 0.0 0.068486 0.070593 0.082283 0.080006 0.077425 0.084399 0.080829
-13 0.0 0.063479 0.065996 0.076913 0.075254 0.073225 0.079446 0.076483
-14 0.0 0.059064 0.061893 0.072112 0.070966 0.069398 0.074962 0.072512
+1 0.0 0.085618 0.079643 0.085857 0.084047 0.081888 0.076531 0.075718
+2 0.0 0.079643 0.075359 0.078265 0.077130 0.075774 0.069143 0.068658
+3 0.0 0.085857 0.078265 0.090778 0.088194 0.085138 0.083648 0.082461
+4 0.0 0.084047 0.077130 0.088194 0.085938 0.083258 0.080985 0.079981
+5 0.0 0.081888 0.075774 0.085138 0.083258 0.081011 0.077856 0.077054
+6 0.0 0.076531 0.069143 0.083648 0.080985 0.077856 0.078889 0.077645
+7 0.0 0.075718 0.068658 0.082461 0.079981 0.077054 0.077645 0.076512
+8 0.0 0.074845 0.068154 0.081161 0.078881 0.076175 0.076275 0.075261
+9 0.0 0.073877 0.067608 0.079704 0.077645 0.075189 0.074736 0.073852
+10 0.0 0.067084 0.060409 0.075015 0.072536 0.069633 0.071991 0.070821
+11 0.0 0.066572 0.060088 0.074312 0.071948 0.069168 0.071268 0.070173
+12 0.0 0.066065 0.059784 0.073591 0.071348 0.068699 0.070516 0.069500
+13 0.0 0.065552 0.059492 0.072838 0.070724 0.068215 0.069723 0.068789
+14 0.0 0.065022 0.059205 0.072037 0.070061 0.067706 0.068871 0.068023
8 9 10 11 12 13 14
0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
-1 0.074145 0.068449 0.080692 0.074184 0.068486 0.063479 0.059064
-2 0.075363 0.070272 0.081580 0.075759 0.070593 0.065996 0.061893
-3 0.087388 0.081540 0.095076 0.088306 0.082283 0.076913 0.072112
-4 0.084186 0.079119 0.091141 0.085279 0.080006 0.075254 0.070966
-5 0.080823 0.076438 0.087107 0.082038 0.077425 0.073225 0.069398
-6 0.088367 0.083169 0.095945 0.089878 0.084399 0.079446 0.074962
-7 0.084031 0.079557 0.090806 0.085590 0.080829 0.076483 0.072512
-8 0.079929 0.076076 0.085994 0.081509 0.077368 0.073550 0.070030
-9 0.076076 0.072757 0.081515 0.077656 0.074052 0.070694 0.067570
-10 0.085994 0.081515 0.093107 0.087851 0.083035 0.078625 0.074586
-11 0.081509 0.077656 0.087851 0.083337 0.079156 0.075290 0.071718
-12 0.077368 0.074052 0.083035 0.079156 0.075521 0.072127 0.068962
-13 0.073550 0.070694 0.078625 0.075290 0.072127 0.069142 0.066334
-14 0.070030 0.067570 0.074586 0.071718 0.068962 0.066334 0.063837
+1 0.074845 0.073877 0.067084 0.066572 0.066065 0.065552 0.065022
+2 0.068154 0.067608 0.060409 0.060088 0.059784 0.059492 0.059205
+3 0.081161 0.079704 0.075015 0.074312 0.073591 0.072838 0.072037
+4 0.078881 0.077645 0.072536 0.071948 0.071348 0.070724 0.070061
+5 0.076175 0.075189 0.069633 0.069168 0.068699 0.068215 0.067706
+6 0.076275 0.074736 0.071991 0.071268 0.070516 0.069723 0.068871
+7 0.075261 0.073852 0.070821 0.070173 0.069500 0.068789 0.068023
+8 0.074139 0.072869 0.069531 0.068962 0.068371 0.067746 0.067072
+9 0.072869 0.071752 0.068081 0.067595 0.067092 0.066559 0.065985
+10 0.069531 0.068081 0.066617 0.065944 0.065240 0.064493 0.063686
+11 0.068962 0.067595 0.065944 0.065324 0.064676 0.063985 0.063237
+12 0.068371 0.067092 0.065240 0.064676 0.064083 0.063452 0.062765
+13 0.067746 0.066559 0.064493 0.063985 0.063452 0.062881 0.062258
+14 0.067072 0.065985 0.063686 0.063237 0.062765 0.062258 0.061702
Runtime: 0.425629 sec
+Runtime: 0.430516 sec
Jackknife Statistics :
original bias std. error
- 99.99 99.98 0.151321
+ 100.186 100.176 0.153008
Runtime: 2.1542 sec
+Runtime: 2.20285 sec
Bootstrap Statistics :
original bias std. error
- 99.8081 15.0184 99.8106 0.150604
+ 100.167 14.919 100.169 0.150847
---------------------------------------------------------------------------
diff --git a/doc/src/LectureNotes/_build/html/chapter5.html b/doc/src/LectureNotes/_build/html/chapter5.html
index f56f8239f..b0717bca3 100644
--- a/doc/src/LectureNotes/_build/html/chapter5.html
+++ b/doc/src/LectureNotes/_build/html/chapter5.html
@@ -175,6 +175,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/chapter6.html b/doc/src/LectureNotes/_build/html/chapter6.html
index db3babcba..bb606dccb 100644
--- a/doc/src/LectureNotes/_build/html/chapter6.html
+++ b/doc/src/LectureNotes/_build/html/chapter6.html
@@ -38,6 +38,7 @@
+
@@ -174,6 +175,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
@@ -3223,6 +3234,7 @@ features).
-[ 0.90559229 -2.01023012 -0.44771747 1.75725059 -1.23503845 0.00290572
- -1.00282695 1.34507057 1.8031745 -0.99146414]
+[ 1.54613374 -0.53808134 -0.25599148 -2.19980623 -1.26614367 2.09110254
+ 0.54374681 0.6362131 1.04152939 -1.69246995]
diff --git a/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter3.html b/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter3.html
index f837b00ec..45cae9446 100644
--- a/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter3.html
+++ b/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter3.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter4.html b/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter4.html
index bef2df4a1..e15eb5827 100644
--- a/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter4.html
+++ b/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter4.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter5.html b/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter5.html
index 446e476f4..d66630259 100644
--- a/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter5.html
+++ b/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter5.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter6.html b/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter6.html
index 33374daf5..7c190a792 100644
--- a/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter6.html
+++ b/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter6.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter7.html b/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter7.html
index 97b70508a..409ae0789 100644
--- a/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter7.html
+++ b/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/chapter7.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/lecturenotes/lecturenotes/notebooks.html b/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/lecturenotes/lecturenotes/notebooks.html
index b0c0618e7..3253a021c 100644
--- a/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/lecturenotes/lecturenotes/notebooks.html
+++ b/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/lecturenotes/lecturenotes/notebooks.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/notebooks.html b/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/notebooks.html
index 0a47f2306..f388fed80 100644
--- a/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/notebooks.html
+++ b/doc/src/LectureNotes/_build/html/testbook/_build/jupyter_execute/notebooks.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/chapter1.html b/doc/src/LectureNotes/_build/html/testbook/chapter1.html
index 6b6d8620f..193a8de3c 100644
--- a/doc/src/LectureNotes/_build/html/testbook/chapter1.html
+++ b/doc/src/LectureNotes/_build/html/testbook/chapter1.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/chapter2.html b/doc/src/LectureNotes/_build/html/testbook/chapter2.html
index 64d91e9cd..1f78bb349 100644
--- a/doc/src/LectureNotes/_build/html/testbook/chapter2.html
+++ b/doc/src/LectureNotes/_build/html/testbook/chapter2.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
@@ -1603,8 +1613,8 @@ developed in the 1970s, namely EISPACK and LINPACK. We describe them shortly he
-[-1.36647401 0.48392582 1.3866607 -1.32437748 -1.27886869 -0.45735097
- 2.09942022 0.4864173 -0.46526198 1.4136186 ]
+[ 0.37402521 -0.6723554 0.34705159 -0.23106244 0.37640289 1.26261376
+ -1.28899002 0.59279401 -1.28878405 -0.82161508]
diff --git a/doc/src/LectureNotes/_build/html/testbook/chapter3.html b/doc/src/LectureNotes/_build/html/testbook/chapter3.html
index 8b7a86aa0..ca795115c 100644
--- a/doc/src/LectureNotes/_build/html/testbook/chapter3.html
+++ b/doc/src/LectureNotes/_build/html/testbook/chapter3.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/chapter4.html b/doc/src/LectureNotes/_build/html/testbook/chapter4.html
index a9d97f924..cbc1e8217 100644
--- a/doc/src/LectureNotes/_build/html/testbook/chapter4.html
+++ b/doc/src/LectureNotes/_build/html/testbook/chapter4.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/chapter5.html b/doc/src/LectureNotes/_build/html/testbook/chapter5.html
index 3b009f97a..74c05c336 100644
--- a/doc/src/LectureNotes/_build/html/testbook/chapter5.html
+++ b/doc/src/LectureNotes/_build/html/testbook/chapter5.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/chapter6.html b/doc/src/LectureNotes/_build/html/testbook/chapter6.html
index 24f0c32b5..e48c39d7d 100644
--- a/doc/src/LectureNotes/_build/html/testbook/chapter6.html
+++ b/doc/src/LectureNotes/_build/html/testbook/chapter6.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/chapter7.html b/doc/src/LectureNotes/_build/html/testbook/chapter7.html
index 18f43b015..2aac939e8 100644
--- a/doc/src/LectureNotes/_build/html/testbook/chapter7.html
+++ b/doc/src/LectureNotes/_build/html/testbook/chapter7.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/content.html b/doc/src/LectureNotes/_build/html/testbook/content.html
index c5fc77275..d3596a040 100644
--- a/doc/src/LectureNotes/_build/html/testbook/content.html
+++ b/doc/src/LectureNotes/_build/html/testbook/content.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/intro.html b/doc/src/LectureNotes/_build/html/testbook/intro.html
index 2c9d21112..679fa8fb5 100644
--- a/doc/src/LectureNotes/_build/html/testbook/intro.html
+++ b/doc/src/LectureNotes/_build/html/testbook/intro.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/lecturenotes/CONDUCT.html b/doc/src/LectureNotes/_build/html/testbook/lecturenotes/CONDUCT.html
index d50f6a554..e82b3c2b7 100644
--- a/doc/src/LectureNotes/_build/html/testbook/lecturenotes/CONDUCT.html
+++ b/doc/src/LectureNotes/_build/html/testbook/lecturenotes/CONDUCT.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/lecturenotes/CONTRIBUTING.html b/doc/src/LectureNotes/_build/html/testbook/lecturenotes/CONTRIBUTING.html
index 8f8e1c046..a25bcd8f1 100644
--- a/doc/src/LectureNotes/_build/html/testbook/lecturenotes/CONTRIBUTING.html
+++ b/doc/src/LectureNotes/_build/html/testbook/lecturenotes/CONTRIBUTING.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/lecturenotes/README.html b/doc/src/LectureNotes/_build/html/testbook/lecturenotes/README.html
index e911298e2..c302f7bde 100644
--- a/doc/src/LectureNotes/_build/html/testbook/lecturenotes/README.html
+++ b/doc/src/LectureNotes/_build/html/testbook/lecturenotes/README.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/content.html b/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/content.html
index 72bdce70d..0c90c302f 100644
--- a/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/content.html
+++ b/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/content.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/intro.html b/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/intro.html
index be84cf3b1..7dab19a74 100644
--- a/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/intro.html
+++ b/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/intro.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/markdown.html b/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/markdown.html
index f6028a82e..a6b7b46e2 100644
--- a/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/markdown.html
+++ b/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/markdown.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/notebooks.html b/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/notebooks.html
index 8cc58ffb7..79ecee8f8 100644
--- a/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/notebooks.html
+++ b/doc/src/LectureNotes/_build/html/testbook/lecturenotes/lecturenotes/notebooks.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/html/testbook/markdown.html b/doc/src/LectureNotes/_build/html/testbook/markdown.html
index c2476bf7a..41e66e4e6 100644
--- a/doc/src/LectureNotes/_build/html/testbook/markdown.html
+++ b/doc/src/LectureNotes/_build/html/testbook/markdown.html
@@ -173,6 +173,16 @@
18. Neural networks, from the simple perceptron to deep learning
+
+
+ 19. Support Vector Machines, overarching aims
+
+
+
+
+ 20. Dimensionality Reduction
+
+
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter1.ipynb b/doc/src/LectureNotes/_build/jupyter_execute/chapter1.ipynb
index 54b83d865..1e244ebde 100644
--- a/doc/src/LectureNotes/_build/jupyter_execute/chapter1.ipynb
+++ b/doc/src/LectureNotes/_build/jupyter_execute/chapter1.ipynb
@@ -413,6 +413,8 @@
"chapter4.ipynb\n",
"chapter5.ipynb\n",
"chapter6.ipynb\n",
+ "chapter7.ipynb\n",
+ "chapter8.ipynb\n",
"```\n"
]
}
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter1.txt b/doc/src/LectureNotes/_build/jupyter_execute/chapter1.txt
index 503b79146..ea7542ffd 100644
--- a/doc/src/LectureNotes/_build/jupyter_execute/chapter1.txt
+++ b/doc/src/LectureNotes/_build/jupyter_execute/chapter1.txt
@@ -402,4 +402,6 @@ chapter3.ipynb
chapter4.ipynb
chapter5.ipynb
chapter6.ipynb
+chapter7.ipynb
+chapter8.ipynb
```
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter2.ipynb b/doc/src/LectureNotes/_build/jupyter_execute/chapter2.ipynb
index 4b0fa0e97..ee510de2f 100644
--- a/doc/src/LectureNotes/_build/jupyter_execute/chapter2.ipynb
+++ b/doc/src/LectureNotes/_build/jupyter_execute/chapter2.ipynb
@@ -1094,27 +1094,27 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "1.5027679581515354\n",
- "[[ 4.01839868 4.38511101 9.23577076 8.53622276 4.78693205 9.01249172\n",
- " 5.62006613 2.52380443 6.68351121 4.12787844]\n",
- " [ 4.38511101 4.78528891 10.07861174 9.31522416 5.22377946 9.83495664\n",
- " 6.13294396 2.7541226 7.29343725 4.50458172]\n",
- " [ 9.23577076 10.07861174 21.22722716 19.61940636 11.00214554 20.71404911\n",
- " 12.9169967 5.80063878 15.36118796 9.48739587]\n",
- " [ 8.53622276 9.31522416 19.61940636 18.13336726 10.16880644 19.14509813\n",
- " 11.9386204 5.3612791 14.19768049 8.76878895]\n",
- " [ 4.78693205 5.22377946 11.00214554 10.16880644 5.70245024 10.73616358\n",
- " 6.69492424 3.00649122 7.96175706 4.91735022]\n",
- " [ 9.01249172 9.83495664 20.71404911 19.14509813 10.73616358 20.21327739\n",
- " 12.60472232 5.66040565 14.98982413 9.25803368]\n",
- " [ 5.62006613 6.13294396 12.9169967 11.9386204 6.69492424 12.60472232\n",
- " 7.86013182 3.52975127 9.34744857 5.77318272]\n",
- " [ 2.52380443 2.7541226 5.80063878 5.3612791 3.00649122 5.66040565\n",
- " 3.52975127 1.58510624 4.19766095 2.59256454]\n",
- " [ 6.68351121 7.29343725 15.36118796 14.19768049 7.96175706 14.98982413\n",
- " 9.34744857 4.19766095 11.11619967 6.86560096]\n",
- " [ 4.12787844 4.50458172 9.48739587 8.76878895 4.91735022 9.25803368\n",
- " 5.77318272 2.59256454 6.86560096 4.24034094]]\n"
+ "9.106279149747735\n",
+ "[[ 1.87336856 1.77787047 1.44771535 6.44982327 11.43684153\n",
+ " 5.83694909 1.84228806 7.37557482 -2.58314202 6.48643762]\n",
+ " [ 1.77787047 1.68724056 1.37391564 6.12103277 10.85382947\n",
+ " 5.53940088 1.74837435 6.9995926 -2.45146205 6.15578065]\n",
+ " [ 1.44771535 1.37391564 1.11877597 4.98434123 8.83824539\n",
+ " 4.51071987 1.42369673 5.69975023 -1.99621924 5.01263633]\n",
+ " [ 6.44982327 6.12103277 4.98434123 22.2061057 39.37591798\n",
+ " 20.09604032 6.34281617 25.39337703 -8.89350334 22.33216531]\n",
+ " [ 11.43684153 10.85382947 8.83824539 39.37591798 69.82146882\n",
+ " 35.63434516 11.2470963 45.02759486 -15.76998069 39.59944717]\n",
+ " [ 5.83694909 5.53940088 4.51071987 20.09604032 35.63434516\n",
+ " 18.18647726 5.74011 22.9804512 -8.04842615 20.21012151]\n",
+ " [ 1.84228806 1.74837435 1.42369673 6.34281617 11.2470963\n",
+ " 5.74011 1.8117232 7.25320885 -2.54028588 6.37882306]\n",
+ " [ 7.37557482 6.9995926 5.69975023 25.39337703 45.02759486\n",
+ " 22.9804512 7.25320885 29.03812156 -10.16999948 25.53753014]\n",
+ " [ -2.58314202 -2.45146205 -1.99621924 -8.89350334 -15.76998069\n",
+ " -8.04842615 -2.54028588 -10.16999948 3.56183127 -8.94398998]\n",
+ " [ 6.48643762 6.15578065 5.01263633 22.33216531 39.59944717\n",
+ " 20.21012151 6.37882306 25.53753014 -8.94398998 22.45894054]]\n"
]
}
],
@@ -1673,15 +1673,15 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "-0.02709116808235872\n",
- "4.0262891855828515\n",
- "-0.05083752107727271\n",
- "1.1034925742304618 9.662232920789233 19.396576628082066\n",
- "3.1026745228913506 3.57651731449913 9.947888130154134\n",
- "[[ 1.10349257 3.10267452 3.57651731]\n",
- " [ 3.10267452 9.66223292 9.94788813]\n",
- " [ 3.57651731 9.94788813 19.39657663]]\n",
- "[26.46728898 0.08444587 3.61056727]\n"
+ "0.06894012083823547\n",
+ "4.139781119573823\n",
+ "0.04321525078901231\n",
+ "1.0006918520539008 10.50426403458282 18.88724031810869\n",
+ "3.0717579594084814 3.4645963550106305 10.40024628605229\n",
+ "[[ 1.00069185 3.07175796 3.46459636]\n",
+ " [ 3.07175796 10.50426403 10.40024629]\n",
+ " [ 3.46459636 10.40024629 18.88724032]]\n",
+ "[26.72833966 0.07676079 3.58709575]\n"
]
}
],
@@ -2296,7 +2296,7 @@
"outputs": [
{
"data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAESCAYAAAAMifkAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAATm0lEQVR4nO3dwW8bZ37G8edXBMghaJaVVeRiA1sm61562NDyebMN3b0WWSVG7w2Tolet45wWe/JKqz23lv+A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ir6Ks49x1TI0/blHEzFpKPje3Jd01syb3vGOiM2bkLUtYxN7UVG96yZV9r93xebUaaOIV/+ELQUrG57fCgcy1Bo9Pxz4Tx8rGrUdKehpNFWuLnqTb4V45H0haueDM/X5MNWPGsoRF7EthlaYJibWFzKyX3jiqyQe4z7ji/8uw/iAc1JWSL46min0mDnLrWwrHLxoq+vuRCp+N0Xh5k4Re5OZYbzL9/ZhqxoyluSgv/HU4VHJQKp1I8MjdrxWtb6qz2iJ3qtyJkr+w3mMopvlK/n6cSLre9B5nibb4OKxfa/p3xSwtTVgAAKqzLMNQAIAKERYAgCjCAgAQRVgAAKIICwBAFGEBAIgiLAAAUbW7rSqw7MLVsm0lF35dVzK9RKOvFEbz0bMAZsjM2mPTSNwjKNAEhAUwQ+6eTth3TclNqJo86y9WCGEBzFBuZtu2uzf6ro1YLRyzAGarG+6R8CBM6sgNdtAITCQIAIhiGAoAEEVYAACiCAsAQBRhAQCIIiwAAFGEBQAgirAAAET9Pw/4QwGQO9y6AAAAAElFTkSuQmCC\n",
"text/plain": [
""
]
@@ -2402,12 +2402,12 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "0.02793163482104733 1.025167138849349\n"
+ "-0.027481252820017347 1.0170183171235068\n"
]
},
{
"data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAESCAYAAAAWtRmOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3de5xf450H8M9DRNoGYyKK0pXJFlXETiat25ZlgiWuO6SslmiNrbSktIm4lV1dlZZqKE3Q1GJfIuPWVt0mFtGiJuOakJAfQYjITH6SlGSSyXf/+J7HuTznd5v5nd/vzMzn/Xqd1++c59yec+ac8z2X53nGiAiIiIiCNqt2BoiIKH0YHIiIyMHgQEREDgYHIiJy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GZ7k3XIvpY9PjjIyLzvQZYQF/csO6cawFkRKQ5al5ZEpys+fD/3hXQ7Q+98ryweedHBr3wWHilxxpTisz32ujK9ZLah+C8bmot0I1OveKpR6t7Whv0Xc9oEWmMOha98fj0Zt7fuw3ASFOq7K3nhdfu0gKgMtt+94ZjkaTUBgciIiqftFYrERFRGTE4EBGRg8GBiIgcDA5ERORgcCAqkFJqVrnTQJQU9lYiIiIHSw5ERORgcCDqIqVUlfc/N3rUa6CJbAwORF1X4Y351ljqsdjmQFQApdQ8ERld7nQQJYUlB6Iu8l4b3cZqJerJGByICpPJvQrRzovVSkRE5GDJgYiIHAwORETkYHAgIiIHgwMRETkYHIiIyMHgQEREDgYHIiJy/D9Xcwg++TQSxwAAAABJRU5ErkJggg==\n",
"text/plain": [
""
]
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter2_178_0.png b/doc/src/LectureNotes/_build/jupyter_execute/chapter2_178_0.png
index bca7d703a..f26cbb55e 100644
Binary files a/doc/src/LectureNotes/_build/jupyter_execute/chapter2_178_0.png and b/doc/src/LectureNotes/_build/jupyter_execute/chapter2_178_0.png differ
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter2_184_1.png b/doc/src/LectureNotes/_build/jupyter_execute/chapter2_184_1.png
index 52e1ee090..23b842d84 100644
Binary files a/doc/src/LectureNotes/_build/jupyter_execute/chapter2_184_1.png and b/doc/src/LectureNotes/_build/jupyter_execute/chapter2_184_1.png differ
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter3.ipynb b/doc/src/LectureNotes/_build/jupyter_execute/chapter3.ipynb
index 724425d7f..7690e5625 100644
--- a/doc/src/LectureNotes/_build/jupyter_execute/chapter3.ipynb
+++ b/doc/src/LectureNotes/_build/jupyter_execute/chapter3.ipynb
@@ -440,8 +440,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "[-0.80600218 -0.30092 -0.79536928 0.14039618 0.5768749 0.74732035\n",
- " -2.28459617 -0.84483144 -1.24760167 1.04875861]\n"
+ "[ 0.99499832 -0.89728339 -1.69744895 -1.03875025 -0.07638981 0.18716123\n",
+ " -0.27804028 0.72149922 1.25862131 -0.7970463 ]\n"
]
}
],
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter4.ipynb b/doc/src/LectureNotes/_build/jupyter_execute/chapter4.ipynb
index 18ba69f3f..fe58f3b8e 100644
--- a/doc/src/LectureNotes/_build/jupyter_execute/chapter4.ipynb
+++ b/doc/src/LectureNotes/_build/jupyter_execute/chapter4.ipynb
@@ -1750,13 +1750,13 @@
"output_type": "stream",
"text": [
"Training R2\n",
- "0.9999853406074647\n",
+ "0.9999886705644145\n",
"Training MSE\n",
- "6.359080163429899\n",
+ "3.90943518299982\n",
"Test R2\n",
- "0.9999859407754539\n",
+ "0.9999697792755088\n",
"Test MSE\n",
- "6.980914000813206\n"
+ "25.32441051671905\n"
]
}
],
@@ -2041,7 +2041,7 @@
{
"data": {
"text/plain": [
- ""
+ ""
]
},
"execution_count": 16,
@@ -2353,27 +2353,27 @@
"MSE before scaling: 0.00\n",
"R2 score before scaling 0.99\n",
"Feature min values before scaling:\n",
- " [1.00000000e+00 4.28119384e-04 8.30273573e-04 1.83286207e-07\n",
- " 3.55456211e-07 6.89354206e-07 7.84683780e-11 1.52177694e-10\n",
- " 2.95125898e-10 5.72352580e-10 3.35938336e-14 6.51502206e-14\n",
- " 1.26349118e-13 2.45035234e-13 4.75209222e-13 1.43821714e-17\n",
- " 2.78920723e-17 5.40925064e-17 1.04904333e-16 2.03446279e-16\n",
- " 3.94553659e-16]\n",
+ " [1.00000000e+00 1.97624658e-03 6.76071445e-04 3.90555053e-06\n",
+ " 1.33608388e-06 4.57072598e-07 7.71833086e-09 2.64043119e-09\n",
+ " 9.03288157e-10 3.09013732e-10 1.52533249e-11 5.21814310e-12\n",
+ " 1.78512013e-12 6.10687329e-13 2.08915360e-13 3.01443312e-14\n",
+ " 1.03123374e-14 3.52783754e-15 1.20686874e-15 4.12868265e-16\n",
+ " 1.41241709e-16]\n",
"Feature max values before scaling:\n",
- " [1. 0.99959919 0.99554286 0.99919855 0.99514384 0.99110558\n",
- " 0.99879806 0.99474497 0.99070834 0.98668808 0.99839773 0.99434627\n",
- " 0.99031125 0.98629261 0.98229027 0.99799757 0.99394773 0.98991433\n",
- " 0.98589729 0.98189656 0.97791206]\n",
+ " [1. 0.99729116 0.99990303 0.99458965 0.99719445 0.99980607\n",
+ " 0.99189546 0.9944932 0.99709775 0.99970911 0.98920857 0.99179928\n",
+ " 0.99439677 0.99700106 0.99961217 0.98652896 0.98911265 0.9917031\n",
+ " 0.99430034 0.99690438 0.99951524]\n",
"Feature min values after scaling:\n",
- " [ 0. -1.69931545 -1.67469653 -1.11879252 -1.10594061 -1.09316288\n",
- " -0.88278129 -0.87818569 -0.8737743 -0.8695324 -0.74532693 -0.74499485\n",
- " -0.74480651 -0.74474355 -0.7447873 -0.65291273 -0.65458157 -0.65636186\n",
- " -0.6582414 -0.6602078 -0.66224856]\n",
+ " [ 0. -1.72006556 -1.76752166 -1.10773734 -1.11611153 -1.12503152\n",
+ " -0.87804483 -0.88146268 -0.88496565 -0.8885653 -0.75100539 -0.75305518\n",
+ " -0.75511928 -0.75719979 -0.75929911 -0.66720819 -0.66863343 -0.67005915\n",
+ " -0.67148589 -0.67291428 -0.67434497]\n",
"Feature max values after scaling:\n",
- " [0. 1.73355301 1.72505955 2.27111673 2.24946337 2.22510326\n",
- " 2.69980853 2.67945831 2.65749797 2.63400218 3.05843173 3.04339787\n",
- " 3.02720478 3.00984683 2.99131512 3.36770789 3.3585133 3.3484316\n",
- " 3.33743441 3.32549161 3.31257165]\n",
+ " [0. 1.74774217 1.73485006 2.2506647 2.23491553 2.21893993\n",
+ " 2.6752011 2.65930564 2.64314172 2.62671501 3.05237641 3.03669249\n",
+ " 3.02075875 3.00457804 2.98815333 3.39653406 3.38082542 3.36489022\n",
+ " 3.34873108 3.33235061 3.31575145]\n",
"MSE after scaling: 0.00\n",
"R2 score for scaled data: 0.99\n"
]
@@ -3623,10 +3623,10 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "0.10594950732957698\n",
- "4.624126522020202\n",
- "[[ 0.994928 3.03386068]\n",
- " [ 3.03386068 10.13854864]]\n"
+ "0.12208685625303164\n",
+ "4.452659449239899\n",
+ "[[ 1.00910422 3.12769989]\n",
+ " [ 3.12769989 10.63920917]]\n"
]
}
],
@@ -3667,10 +3667,10 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "0.07844342450165018\n",
- "1.1438626259785865\n",
- "[[1. 0.60716876]\n",
- " [0.60716876 1. ]]\n"
+ "0.08487462066865184\n",
+ "1.7716882265595972\n",
+ "[[1. 0.74332853]\n",
+ " [0.74332853 1. ]]\n"
]
}
],
@@ -3724,30 +3724,30 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "[[-0.1066151 0.79747251]\n",
- " [ 0.75209514 1.96762409]\n",
- " [-0.41638994 -2.34035396]\n",
- " [-0.2780316 -1.49418072]\n",
- " [ 0.86865915 2.72245363]\n",
- " [ 0.20418073 0.86260647]\n",
- " [-0.79048758 -0.42464144]\n",
- " [-0.01768994 -0.1467412 ]\n",
- " [-0.26355349 -1.81771904]\n",
- " [ 0.04783264 -0.12652035]]\n",
+ "[[-0.63821798 -2.03548189]\n",
+ " [ 0.98355854 2.40965456]\n",
+ " [ 0.48870683 2.68995497]\n",
+ " [ 0.44655566 1.28908336]\n",
+ " [ 0.3871261 -0.67155367]\n",
+ " [-0.32256574 -0.55849157]\n",
+ " [ 1.3507663 2.75066843]\n",
+ " [-1.44489727 -5.37462032]\n",
+ " [-0.42087991 1.26840089]\n",
+ " [-0.83015254 -1.76761477]]\n",
" 0 1\n",
- "0 -0.106615 0.797473\n",
- "1 0.752095 1.967624\n",
- "2 -0.416390 -2.340354\n",
- "3 -0.278032 -1.494181\n",
- "4 0.868659 2.722454\n",
- "5 0.204181 0.862606\n",
- "6 -0.790488 -0.424641\n",
- "7 -0.017690 -0.146741\n",
- "8 -0.263553 -1.817719\n",
- "9 0.047833 -0.126520\n",
+ "0 -0.638218 -2.035482\n",
+ "1 0.983559 2.409655\n",
+ "2 0.488707 2.689955\n",
+ "3 0.446556 1.289083\n",
+ "4 0.387126 -0.671554\n",
+ "5 -0.322566 -0.558492\n",
+ "6 1.350766 2.750668\n",
+ "7 -1.444897 -5.374620\n",
+ "8 -0.420880 1.268401\n",
+ "9 -0.830153 -1.767615\n",
" 0 1\n",
- "0 1.000000 0.824095\n",
- "1 0.824095 1.000000\n"
+ "0 1.000000 0.877156\n",
+ "1 0.877156 1.000000\n"
]
}
],
@@ -3789,37 +3789,37 @@
"text": [
" 0 1 2 3 4 5 6 7 \\\n",
"0 0.0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 \n",
- "1 0.0 0.090154 0.084830 0.094410 0.086610 0.079643 0.088034 0.080631 \n",
- "2 0.0 0.084830 0.081616 0.091708 0.085377 0.079558 0.087469 0.081068 \n",
- "3 0.0 0.094410 0.091708 0.104704 0.097816 0.091403 0.101195 0.093913 \n",
- "4 0.0 0.086610 0.085377 0.097816 0.092341 0.087099 0.095895 0.089763 \n",
- "5 0.0 0.079643 0.079558 0.091403 0.087099 0.082837 0.090734 0.085584 \n",
- "6 0.0 0.088034 0.087469 0.101195 0.095895 0.090734 0.100269 0.094057 \n",
- "7 0.0 0.080631 0.081068 0.093913 0.089763 0.085584 0.094057 0.088862 \n",
- "8 0.0 0.074145 0.075363 0.087388 0.084186 0.080823 0.088367 0.084031 \n",
- "9 0.0 0.068449 0.070272 0.081540 0.079119 0.076438 0.083169 0.079557 \n",
- "10 0.0 0.080692 0.081580 0.095076 0.091141 0.087107 0.095945 0.090806 \n",
- "11 0.0 0.074184 0.075759 0.088306 0.085279 0.082038 0.089878 0.085590 \n",
- "12 0.0 0.068486 0.070593 0.082283 0.080006 0.077425 0.084399 0.080829 \n",
- "13 0.0 0.063479 0.065996 0.076913 0.075254 0.073225 0.079446 0.076483 \n",
- "14 0.0 0.059064 0.061893 0.072112 0.070966 0.069398 0.074962 0.072512 \n",
+ "1 0.0 0.085618 0.079643 0.085857 0.084047 0.081888 0.076531 0.075718 \n",
+ "2 0.0 0.079643 0.075359 0.078265 0.077130 0.075774 0.069143 0.068658 \n",
+ "3 0.0 0.085857 0.078265 0.090778 0.088194 0.085138 0.083648 0.082461 \n",
+ "4 0.0 0.084047 0.077130 0.088194 0.085938 0.083258 0.080985 0.079981 \n",
+ "5 0.0 0.081888 0.075774 0.085138 0.083258 0.081011 0.077856 0.077054 \n",
+ "6 0.0 0.076531 0.069143 0.083648 0.080985 0.077856 0.078889 0.077645 \n",
+ "7 0.0 0.075718 0.068658 0.082461 0.079981 0.077054 0.077645 0.076512 \n",
+ "8 0.0 0.074845 0.068154 0.081161 0.078881 0.076175 0.076275 0.075261 \n",
+ "9 0.0 0.073877 0.067608 0.079704 0.077645 0.075189 0.074736 0.073852 \n",
+ "10 0.0 0.067084 0.060409 0.075015 0.072536 0.069633 0.071991 0.070821 \n",
+ "11 0.0 0.066572 0.060088 0.074312 0.071948 0.069168 0.071268 0.070173 \n",
+ "12 0.0 0.066065 0.059784 0.073591 0.071348 0.068699 0.070516 0.069500 \n",
+ "13 0.0 0.065552 0.059492 0.072838 0.070724 0.068215 0.069723 0.068789 \n",
+ "14 0.0 0.065022 0.059205 0.072037 0.070061 0.067706 0.068871 0.068023 \n",
"\n",
" 8 9 10 11 12 13 14 \n",
"0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 \n",
- "1 0.074145 0.068449 0.080692 0.074184 0.068486 0.063479 0.059064 \n",
- "2 0.075363 0.070272 0.081580 0.075759 0.070593 0.065996 0.061893 \n",
- "3 0.087388 0.081540 0.095076 0.088306 0.082283 0.076913 0.072112 \n",
- "4 0.084186 0.079119 0.091141 0.085279 0.080006 0.075254 0.070966 \n",
- "5 0.080823 0.076438 0.087107 0.082038 0.077425 0.073225 0.069398 \n",
- "6 0.088367 0.083169 0.095945 0.089878 0.084399 0.079446 0.074962 \n",
- "7 0.084031 0.079557 0.090806 0.085590 0.080829 0.076483 0.072512 \n",
- "8 0.079929 0.076076 0.085994 0.081509 0.077368 0.073550 0.070030 \n",
- "9 0.076076 0.072757 0.081515 0.077656 0.074052 0.070694 0.067570 \n",
- "10 0.085994 0.081515 0.093107 0.087851 0.083035 0.078625 0.074586 \n",
- "11 0.081509 0.077656 0.087851 0.083337 0.079156 0.075290 0.071718 \n",
- "12 0.077368 0.074052 0.083035 0.079156 0.075521 0.072127 0.068962 \n",
- "13 0.073550 0.070694 0.078625 0.075290 0.072127 0.069142 0.066334 \n",
- "14 0.070030 0.067570 0.074586 0.071718 0.068962 0.066334 0.063837 \n"
+ "1 0.074845 0.073877 0.067084 0.066572 0.066065 0.065552 0.065022 \n",
+ "2 0.068154 0.067608 0.060409 0.060088 0.059784 0.059492 0.059205 \n",
+ "3 0.081161 0.079704 0.075015 0.074312 0.073591 0.072838 0.072037 \n",
+ "4 0.078881 0.077645 0.072536 0.071948 0.071348 0.070724 0.070061 \n",
+ "5 0.076175 0.075189 0.069633 0.069168 0.068699 0.068215 0.067706 \n",
+ "6 0.076275 0.074736 0.071991 0.071268 0.070516 0.069723 0.068871 \n",
+ "7 0.075261 0.073852 0.070821 0.070173 0.069500 0.068789 0.068023 \n",
+ "8 0.074139 0.072869 0.069531 0.068962 0.068371 0.067746 0.067072 \n",
+ "9 0.072869 0.071752 0.068081 0.067595 0.067092 0.066559 0.065985 \n",
+ "10 0.069531 0.068081 0.066617 0.065944 0.065240 0.064493 0.063686 \n",
+ "11 0.068962 0.067595 0.065944 0.065324 0.064676 0.063985 0.063237 \n",
+ "12 0.068371 0.067092 0.065240 0.064676 0.064083 0.063452 0.062765 \n",
+ "13 0.067746 0.066559 0.064493 0.063985 0.063452 0.062881 0.062258 \n",
+ "14 0.067072 0.065985 0.063686 0.063237 0.062765 0.062258 0.061702 \n"
]
}
],
@@ -4405,10 +4405,10 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "Runtime: 0.425629 sec\n",
+ "Runtime: 0.430516 sec\n",
"Jackknife Statistics :\n",
"original bias std. error\n",
- " 99.99 99.98 0.151321\n"
+ " 100.186 100.176 0.153008\n"
]
}
],
@@ -4559,10 +4559,10 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "Runtime: 2.1542 sec\n",
+ "Runtime: 2.20285 sec\n",
"Bootstrap Statistics :\n",
"original bias std. error\n",
- " 99.8081 15.0184 99.8106 0.150604\n"
+ " 100.167 14.919 100.169 0.150847\n"
]
},
{
@@ -4584,7 +4584,7 @@
},
{
"data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAsMAAAHjCAYAAADGyBLpAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3df2zdd33v8ZeJEztrXAHdMelCFonBFikTDQKxha3OuqEkNDFmpohQRMq4QMsglC5kK0nUqlC0wFJllK4VbBTUAkJpaHESde4GhWwsMNRoa+gapAnarM06x0lhsUvsxPa5f3DxpYTiX+fEjj+Ph1SpPvmc+P3NJz7n2dPv+Z6GarVaDQAAFOh50z0AAABMFzEMAECxxDAAAMUSwwAAFEsMAwBQLDEMAECxxDAAAMVqnO4Bft4Pf/hMRkam79LHF120ICdO9E/b9+e52ZuZy97MXPZm5rI3M5e9mbkuumhBfvjDZ/KCF1xQs99zxsXwyEh1WmP4pzMwM9mbmcvezFz2ZuayNzOXvZm5ar03TpMAAKBYYhgAgGKJYQAAiiWGAQAolhgGAKBYYhgAgGKJYQAAiiWGAQAolhgGAKBYYhgAgGKJYQAAiiWGAQAolhgGAKBYYhgAgGKJYQAAiiWGAQAolhgGAKBYYhgAgGI1TvcAANROy4Xz09z07If2SqXlOdcPDA6l7+Speo8FMGOJYYBZpLmpMe2busa9fu8tHemr4zwAM53TJAAAKJYYBgCgWGIYA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fpJk9erV6e7uzvve975x3f95z2uo9UhjWrCgOU0/82rpWH9hBgeH0t8/UO+xxuXnZx+P1hfMH/faeXPn5P/c/A/jXv+Zbasm9PtPdJ6Jrp9Js5S2fibNUtr6mTTL+b5+Js1S2vqZNMv5vn4iz+Wf2bZqws/7z5zjdqt1KzZUq9VqLX/DT33qU/nxj3+c6667Lklyzz335NChQ/nIRz5Sy28DAABTVvNLq42MjKSh4f8Xe7VafdbXAAAwU9Q8hhcuXJje3t7Rr3t7e9Pa2lrrbwMAAFNW8xh+zWtek29961t5+umnc+rUqfzDP/xD2traav1tAABgymr+BroXvehFue6667Jhw4acOXMmV1xxRV7+8pfX+tsAAMCU1fwNdAAAcL6o+WkSAABwvhDDAAAUSwwDAFAsMQwAQLGKieFPf/rTWb16ddrb23PHHXckSe69995cfvnlaW9vz80335yhoaGz7nfw4MFcccUV6ejoyFVXXZWjR4+e69GLMNn9+alHH300v/3bv32uxi3KZPfm2LFjefe73503vOENWb9+fZ588slzPfqsN9m9efLJJ/PWt741HR0dedvb3uZxrUb6+/uzbt260b/rBw4cSHt7e1atWpWdO3eOrjt8+HA6OzuzevXqbN269Rfu0cmTJ/Pud787r3vd6/LWt771WdfvZ3JquT/f//73R3+G3vzmN+fw4cPn7Dhmo1ruzU/9z//8T1796leP77mnWoB/+Zd/qa5bt67a19dXHRoaql599dXVT33qU9VLL7202tPTU61Wq9Ubb7yxeuedd55138suu6x6+PDharVard5zzz3Va6655pzOXoKp7E+1Wq3++Mc/rq5fv776m7/5m+dy7CJMZW+uuuqq6he/+MVqtVqtfvGLX6xee+2153T22W4qe/PBD36w+oUvfKFarVard911V3XTpk3ndPbZ6N///d+r69atqy5btqz6xBNPVE+dOlVduXJl9b/+67+qZ86cqb7jHe+ofuMb36hWq9Xq2rVrq//2b/9WrVar1Q996EOje/GzbrrppuqnPvWparVard53331+fqao1vuzfv366te//vVqtVqtHjhwoNre3n7OjmW2qfXeVKvV6vDwcPUd73hHdfny5dUnnnhizBmKeGX40Ucfze///u9nwYIFmTNnTi699NLcdtttWb58+ein41122WX56le/+qz7nT59Otdee22WLl2aJPmt3/qtPPXUU+d8/tlusvvzU9u3b89VV111LkcuxmT35umnn873vve9rF+/Pknyxje+MR/4wAfO+fyz2VR+bkZGRtLf358kOXXqVJqbm8/p7LPRrl27cuONN47+2R86dChLlizJ4sWL09jYmPb29nR3d+fo0aMZGBjI8uXLkySdnZ3p7u4+6/f7xje+kfb29iTJunXr8k//9E85c+bMuTugWabW+/OmN70pl156aRJtMFW13psk+bu/+7u85jWvyQte8IJxzVBEDC9btizf/OY386Mf/SiDg4N58MEHs3z58jz88MN56qmnMjw8nO7u7hw/fvxZ95s3b146OjqS/OTJ45gXHmEAAAT5SURBVLbbbstrX/va6TiEWW2y+5MkX/va1zIwMJA1a9ZMw+Sz32T35oknnsiv/dqvZfv27XnjG9+Y97///Zk7d+40HcXsNJWfm2uvvTaf+9zncumll+bOO+/Mu971rmk4gtnlox/9aF71qleNfn3s2LFUKpXRr1tbW9PT03PW7ZVKJT09PWf9fj+7rrGxMQsWLMjTTz9dxyOY3Wq9P52dnZkzZ06S5NZbb9UGU1DrvXnkkUfy7W9/O3/yJ38y7hlq/gl0M9GKFSvS2dmZt73tbXn+85+fFStW5OGHH86mTZvynve8J83NzVmzZk2++93v/sL7nz59Otdff32GhoZy9dVXn+PpZ7/J7k9vb2/uuOOOfO5zn5uewQsw2b0ZGhrKo48+mo0bN+ZDH/pQ7rnnnlx//fW5++67p+lIZp+pPK79xV/8RT784Q/nta99bR544IG8733vy549e9LQ0DANRzI7jYyMPOvPs1qtpqGh4TlvH0u1Ws3znlfE61fnRC32p1qt5uMf/3gefvjh3HXXXXWfuRRT2ZtTp07lpptuyic+8YkJ/bwU8ZPV39+fVatWZe/evbn77rszb968vOhFL8rLX/7yfOUrX8mXvvSlvOhFL8rixYvPuu8zzzyTd77znRkaGsodd9zh1a06mOz+fOMb38iPfvSj0TcxJElHR8fo//5l6ia7N5VKJRdccEEuu+yyJD/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tHtur7jiinz3u9/N0aNHMzQ0lO985ztZsWJFHn300Rw4cCBDQ0PZuXNn2traMn/+/LS0tGTv3r1Jks7OzrS1tY3f2QAAwAs47Su3l1xySd773vfmHe94R06cOJHXv/71efvb356Xv/zlWbt2bQYGBrJ06dKsWLEiSbJly5Zs3LgxfX19WbRoUdasWdPwkwAAgCRpqqrqnNoDYFsCjWDdpibrNjVZt6nJuk1N03HdznpbAgAATBWn3ZYAQLlaL5ibOS2jfyroHxhM79FjDZwRwNkRtwDT2JyW5rSv6xz1+B13rM70+gtQYKqxLQEAgGJ45RaAUTt+YmhUN4z/vzG2MQATTdwCMGqzZ820jQE4p9mWAABAMcQtAADFELcAABRD3AIAUAxxCwBAMcQtAADFELcAABRD3AIAUAxxCwBAMcQtAADFELcAABRD3AIAUAxxCwBAMcQtAADFELcAABRD3AIAUAxxCwBAMcQtAADFaJ7sCQAwflovmJs5LS7twPTlCghQkDktzWlf1znq8TvuWN3A2QBMPNsSAAAohrgFAKAYtiUAnOPsowUYPVdLgAl2JrE62n209tAC0524BZhg3vQF0Dj23AIAUAxxCwBAMcQtAADFELcAABRD3AIAUAxxCwBAMcQtAADFELcAABRD3AIAUAxxCwBAMcQtAADFELcAABRD3AIAUAxxCwBAMcQtAADFELcAABRD3AIAUAxxCwBAMZonewIAlOv4iaHUaq2jHt8/MJjeo8caOCOgdOIWgIaZPWtm2td1jnr8jjtWp7eB8wHKZ1sCAADFELcAABRD3AIAUAxxCwBAMcQtAADFELcAABRD3AIAUAxxCwBAMcQtAADFELcAABRD3AIAUAxxCwBAMcQtAADFaB7NoHe+85156qmn0tz8v8M/9rGP5emnn85f/dVfZWBgIG9605ty4403Jkn279+fDRs25Omnn85rXvOa3HrrrSOPAwCARjptdVZVlcceeyzf+ta3RiK1v78/K1asyN13352XvvSlue6667J79+4sXbo0N910U2677bYsXrw469evz7Zt2/KOd7yj4ScCAACn3Zbws5/9LEnynve8J29+85vz5S9/Ofv27cvChQuzYMGCNDc3p729PV1dXT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PdfvrTn4787r3tbW/L/v37J+w8ppvxXLf/89///d957Wtf67mugcZz3fr6+rJu3bpcddVVueqqq/KjH/1ows5j0lRUVVVV//Zv/1atWrWq6u3trQYHB6vrrruu+tznPlddfvnlVXd3d1VVVXXLLbdUX/jCF0557Lve9a7qnnvuqaqqqu65557q+uuvn9C5T2dns24f/ehHq6985StVVVXVl770pWrdunUTOvfp6Ic//GG1atWqatGiRdXjjz9eHTt2rFq6dGn1X//1X9WJEyeq97znPdW3v/3tqqqqauXKldW///u/V1VVVX/+538+slbPduutt1af+9znqqqqqvvvv9/vXoOM97pdc8011be+9a2qqqpqz549VXt7+4Sdy3Qy3utWVVU1NDRUvec976kWL15cPf744xN2LtPJeK/b+vXrq09+8pNVVVXV7t27q7e85S0TdzKTxCu3z/jxj3+c3/u938v555+fmTNn5vLLL89nPvOZLF68eOQT1q644or88z//80mPe+qpp/KTn/wk11xzTZLk6quvzg033DDh85+uznTdkv/9qOi+vr4kybFjxzJnzpwJnft0tG3bttxyyy0ja7Nv374sXLgwCxYsSHNzc9rb29PV1ZWDBw+mv78/ixcvTpJ0dHSkq6vrlD/v29/+dtrb25Mkq1atyr/+67/mxIkTE3dC08R4r9tb3/rWXH755UmSV77ylXnyyScn7mSmkfFetyT5m7/5m1x22WW58MILJ+w8ppvxXLeqqvLNb34z73//+5MkbW1t+cu//MuJPaFJIG6fsWjRonz3u9/NL37xiwwMDOTBBx/M4sWL8/DDD+fJJ5/M0NBQurq6cvjw4ZMe9/jjj+c3fuM3snnz5lx99dX5yEc+klmzZk3SWUw/Z7puSXL99dfn7/7u73L55ZfnC1/4Qt73vvdNwhlML7fffnte85rXjHx96NCh1Gq1ka/r9Xq6u7tPOV6r1dLd3X3Kn/fscc3NzTn//PPz1FNPNfAMpqfxXreOjo7MnDkzSXLnnXfmjW98YwNnP32N97o98sgj+f73v58//uM/buzEp7nxXAMcPEoAAAQUSURBVLcjR45k9uzZueeee/K2t70ta9asydDQUONPYpKJ22csWbIkHR0deec735n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asWZMk+dSnPpV6vZ63v/3tuf7663PzzTdn5cqVaW1tzZYtWybzdKaNs1m35cuX5ytf+Upe9rKX5a1vfevIn9nZ2Tkp5zKdnO3vG5PjbNft9ttvz6ZNm3LPPfekubk5W7duLX5rSVNlkyEAAIUoO90BAJhWxC0AAMUQtwAAFEPcAgBQDHELAEAxxC0AAMUQtwAAFEPcAgBQjP8fZtvHcPNWAbIAAAAASUVORK5CYII=\n",
"text/plain": [
""
]
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter4_278_2.png b/doc/src/LectureNotes/_build/jupyter_execute/chapter4_278_2.png
index 3fcad478b..5a4fe5abe 100644
Binary files a/doc/src/LectureNotes/_build/jupyter_execute/chapter4_278_2.png and b/doc/src/LectureNotes/_build/jupyter_execute/chapter4_278_2.png differ
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter7.ipynb b/doc/src/LectureNotes/_build/jupyter_execute/chapter7.ipynb
new file mode 100644
index 000000000..b84053770
--- /dev/null
+++ b/doc/src/LectureNotes/_build/jupyter_execute/chapter7.ipynb
@@ -0,0 +1,2052 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Support Vector Machines, overarching aims\n",
+ "\n",
+ "A Support Vector Machine (SVM) is a very powerful and versatile\n",
+ "Machine Learning method, capable of performing linear or nonlinear\n",
+ "classification, regression, and even outlier detection. It is one of\n",
+ "the most popular models in Machine Learning, and anyone interested in\n",
+ "Machine Learning should have it in their toolbox. SVMs are\n",
+ "particularly well suited for classification of complex but small-sized or\n",
+ "medium-sized datasets. \n",
+ "\n",
+ "The case with two well-separated classes only can be understood in an\n",
+ "intuitive way in terms of lines in a two-dimensional space separating\n",
+ "the two classes (see figure below).\n",
+ "\n",
+ "The basic mathematics behind the SVM is however less familiar to most of us. \n",
+ "It relies on the definition of hyperplanes and the\n",
+ "definition of a **margin** which separates classes (in case of\n",
+ "classification problems) of variables. It is also used for regression\n",
+ "problems.\n",
+ "\n",
+ "With SVMs we distinguish between hard margin and soft margins. The\n",
+ "latter introduces a so-called softening parameter to be discussed\n",
+ "below. We distinguish also between linear and non-linear\n",
+ "approaches. The latter are the most frequent ones since it is rather\n",
+ "unlikely that we can separate classes easily by say straight lines.\n",
+ "\n",
+ "\n",
+ "## Hyperplanes and all that\n",
+ "\n",
+ "The theory behind support vector machines (SVM hereafter) is based on\n",
+ "the mathematical description of so-called hyperplanes. Let us start\n",
+ "with a two-dimensional case. This will also allow us to introduce our\n",
+ "first SVM examples. These will be tailored to the case of two specific\n",
+ "classes, as displayed in the figure here based on the usage of the petal data.\n",
+ "\n",
+ "We assume here that our data set can be well separated into two\n",
+ "domains, where a straight line does the job in the separating the two\n",
+ "classes. Here the two classes are represented by either squares or\n",
+ "circles."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "LinearSVC: [0.28475098] [[1.05364854 1.09903804]]\n",
+ "SVC: [0.31896852] [[1.1203284 1.02625193]]\n",
+ "SGDClassifier(alpha=0.00200): [0.117] [[0.77714169 0.72981762]]\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAqcAAAESCAYAAADACnxfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nOzdd1xX1f/A8deRJUMDU0HFESKSWzFXpjhzVJZoGu6RpumvobYsNbVs2viaM3Cn5sys/Grf3KmJZm5xoLhw7wEI5/fHgQ8jQD4sGe/n43EfcT/33nPPRdI3557zfiutNUIIIYQQQuQGhR52B4QQQgghhIgnwakQQgghhMg1JDgVQgghhBC5hgSnQgghhBAi15DgVAghhBBC5BoSnAohhBBCi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u+Kj8DOmHwN34mdKKwCfm5nLcHw5YHVOHZpZTeBp4CIgFogEKgJ1CzDO1kDbQECaJiLQ7ynAxkDbT5nOSwJqBr4+A0hKC0wD5gGpQY5hSSAwzdj3uUGeKyJyHAWnIiLH+y8wCDiMD9wOA5hZ/cDn3YG1mc45nEuf4/FB6d34QDYZmAGUz+Gc3EQATwKTsvhsa4avM4/Nkb6sywLv8yunvkVE8kzBqYjI8fY755Zn0b4EH1TGZX5Mn8GhwJ+RmdovAO5yzk0BMLNY/PrNgvgROCObsQbrF+A0M6vlnEsKtLXh2AAzu3sSESl0Ck5FRILknNtjZsOAYWZm+BnWyviNRKnOuTHAFvwGqkvNbDVw0Dm3G1gG9DWzufi0VC+SHvTl11PAZDNbA0zEb2pqBrR1zj0QZB9fAkuB8YECABWBfwT6SptRze6eREQKnR69iIjkzWPAE8B9wGJ8cNeLQLqlwPrLu4CB+PWXHwfOuxkfyP4ATADGkcs61dw456YB3fDrWL8PvB7i+CUHOfWRit9hHx04fzzwLD4wPZjLPYmIFDpL38wpIiICZtYCn+qqjXPuh+Iej4iULQpORUTKODPrCewDfgPq4R/rG9DK6ZeEiBQxrTkVEZEq+OT8dYCdQCJwtwJTESkOmjkVERERkbChDVEiIiIiEjYUnIqIiIhI2FBwKiIiIiJhQ8GpiIiIiIQNBaciIiIiEjb+H5ZwzWvT7w/PAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "filenames": {
+ "image/png": "/Users/hjensen/Teaching/FYS-STK4150/doc/src/LectureNotes/_build/jupyter_execute/chapter7_1_1.png"
+ },
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "%matplotlib inline\n",
+ "\n",
+ "from sklearn import datasets\n",
+ "from sklearn.svm import SVC, LinearSVC\n",
+ "from sklearn.linear_model import SGDClassifier\n",
+ "from sklearn.preprocessing import StandardScaler\n",
+ "import matplotlib\n",
+ "import matplotlib.pyplot as plt\n",
+ "plt.rcParams['axes.labelsize'] = 14\n",
+ "plt.rcParams['xtick.labelsize'] = 12\n",
+ "plt.rcParams['ytick.labelsize'] = 12\n",
+ "\n",
+ "\n",
+ "iris = datasets.load_iris()\n",
+ "X = iris[\"data\"][:, (2, 3)] # petal length, petal width\n",
+ "y = iris[\"target\"]\n",
+ "\n",
+ "setosa_or_versicolor = (y == 0) | (y == 1)\n",
+ "X = X[setosa_or_versicolor]\n",
+ "y = y[setosa_or_versicolor]\n",
+ "\n",
+ "\n",
+ "\n",
+ "C = 5\n",
+ "alpha = 1 / (C * len(X))\n",
+ "\n",
+ "lin_clf = LinearSVC(loss=\"hinge\", C=C, random_state=42)\n",
+ "svm_clf = SVC(kernel=\"linear\", C=C)\n",
+ "sgd_clf = SGDClassifier(loss=\"hinge\", learning_rate=\"constant\", eta0=0.001, alpha=alpha,\n",
+ " max_iter=100000, random_state=42)\n",
+ "\n",
+ "scaler = StandardScaler()\n",
+ "X_scaled = scaler.fit_transform(X)\n",
+ "\n",
+ "lin_clf.fit(X_scaled, y)\n",
+ "svm_clf.fit(X_scaled, y)\n",
+ "sgd_clf.fit(X_scaled, y)\n",
+ "\n",
+ "print(\"LinearSVC: \", lin_clf.intercept_, lin_clf.coef_)\n",
+ "print(\"SVC: \", svm_clf.intercept_, svm_clf.coef_)\n",
+ "print(\"SGDClassifier(alpha={:.5f}):\".format(sgd_clf.alpha), sgd_clf.intercept_, sgd_clf.coef_)\n",
+ "\n",
+ "# Compute the slope and bias of each decision boundary\n",
+ "w1 = -lin_clf.coef_[0, 0]/lin_clf.coef_[0, 1]\n",
+ "b1 = -lin_clf.intercept_[0]/lin_clf.coef_[0, 1]\n",
+ "w2 = -svm_clf.coef_[0, 0]/svm_clf.coef_[0, 1]\n",
+ "b2 = -svm_clf.intercept_[0]/svm_clf.coef_[0, 1]\n",
+ "w3 = -sgd_clf.coef_[0, 0]/sgd_clf.coef_[0, 1]\n",
+ "b3 = -sgd_clf.intercept_[0]/sgd_clf.coef_[0, 1]\n",
+ "\n",
+ "# Transform the decision boundary lines back to the original scale\n",
+ "line1 = scaler.inverse_transform([[-10, -10 * w1 + b1], [10, 10 * w1 + b1]])\n",
+ "line2 = scaler.inverse_transform([[-10, -10 * w2 + b2], [10, 10 * w2 + b2]])\n",
+ "line3 = scaler.inverse_transform([[-10, -10 * w3 + b3], [10, 10 * w3 + b3]])\n",
+ "\n",
+ "# Plot all three decision boundaries\n",
+ "plt.figure(figsize=(11, 4))\n",
+ "plt.plot(line1[:, 0], line1[:, 1], \"k:\", label=\"LinearSVC\")\n",
+ "plt.plot(line2[:, 0], line2[:, 1], \"b--\", linewidth=2, label=\"SVC\")\n",
+ "plt.plot(line3[:, 0], line3[:, 1], \"r-\", label=\"SGDClassifier\")\n",
+ "plt.plot(X[:, 0][y==1], X[:, 1][y==1], \"bs\") # label=\"Iris-Versicolor\"\n",
+ "plt.plot(X[:, 0][y==0], X[:, 1][y==0], \"yo\") # label=\"Iris-Setosa\"\n",
+ "plt.xlabel(\"Petal length\", fontsize=14)\n",
+ "plt.ylabel(\"Petal width\", fontsize=14)\n",
+ "plt.legend(loc=\"upper center\", fontsize=14)\n",
+ "plt.axis([0, 5.5, 0, 2])\n",
+ "\n",
+ "plt.show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## What is a hyperplane?\n",
+ "\n",
+ "The aim of the SVM algorithm is to find a hyperplane in a\n",
+ "$p$-dimensional space, where $p$ is the number of features that\n",
+ "distinctly classifies the data points.\n",
+ "\n",
+ "In a $p$-dimensional space, a hyperplane is what we call an affine subspace of dimension of $p-1$.\n",
+ "As an example, in two dimension, a hyperplane is simply as straight line while in three dimensions it is \n",
+ "a two-dimensional subspace, or stated simply, a plane. \n",
+ "\n",
+ "In two dimensions, with the variables $x_1$ and $x_2$, the hyperplane is defined as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "b+w_1x_1+w_2x_2=0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where $b$ is the intercept and $w_1$ and $w_2$ define the elements of a vector orthogonal to the line \n",
+ "$b+w_1x_1+w_2x_2=0$. \n",
+ "In two dimensions we define the vectors $\\boldsymbol{x} =[x1,x2]$ and $\\boldsymbol{w}=[w1,w2]$. \n",
+ "We can then rewrite the above equation as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{x}^T\\boldsymbol{w}+b=0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## A $p$-dimensional space of features\n",
+ "\n",
+ "We limit ourselves to two classes of outputs $y_i$ and assign these classes the values $y_i = \\pm 1$. \n",
+ "In a $p$-dimensional space of say $p$ features we have a hyperplane defines as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "b+wx_1+w_2x_2+\\dots +w_px_p=0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "If we define a \n",
+ "matrix $\\boldsymbol{X}=\\left[\\boldsymbol{x}_1,\\boldsymbol{x}_2,\\dots, \\boldsymbol{x}_p\\right]$\n",
+ "of dimension $n\\times p$, where $n$ represents the observations for each feature and each vector $x_i$ is a column vector of the matrix $\\boldsymbol{X}$,"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{x}_i = \\begin{bmatrix} x_{i1} \\\\ x_{i2} \\\\ \\dots \\\\ \\dots \\\\ x_{ip} \\end{bmatrix}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "If the above condition is not met for a given vector $\\boldsymbol{x}_i$ we have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "b+w_1x_{i1}+w_2x_{i2}+\\dots +w_px_{ip} >0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "if our output $y_i=1$.\n",
+ "In this case we say that $\\boldsymbol{x}_i$ lies on one of the sides of the hyperplane and if"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "b+w_1x_{i1}+w_2x_{i2}+\\dots +w_px_{ip} < 0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "for the class of observations $y_i=-1$, \n",
+ "then $\\boldsymbol{x}_i$ lies on the other side. \n",
+ "\n",
+ "Equivalently, for the two classes of observations we have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i\\left(b+w_1x_{i1}+w_2x_{i2}+\\dots +w_px_{ip}\\right) > 0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "When we try to separate hyperplanes, if it exists, we can use it to construct a natural classifier: a test observation is assigned a given class depending on which side of the hyperplane it is located.\n",
+ "\n",
+ "\n",
+ "## The two-dimensional case\n",
+ "\n",
+ "Let us try to develop our intuition about SVMs by limiting ourselves to a two-dimensional\n",
+ "plane. To separate the two classes of data points, there are many\n",
+ "possible lines (hyperplanes if you prefer a more strict naming) \n",
+ "that could be chosen. Our objective is to find a\n",
+ "plane that has the maximum margin, i.e the maximum distance between\n",
+ "data points of both classes. Maximizing the margin distance provides\n",
+ "some reinforcement so that future data points can be classified with\n",
+ "more confidence.\n",
+ "\n",
+ "What a linear classifier attempts to accomplish is to split the\n",
+ "feature space into two half spaces by placing a hyperplane between the\n",
+ "data points. This hyperplane will be our decision boundary. All\n",
+ "points on one side of the plane will belong to class one and all points\n",
+ "on the other side of the plane will belong to the second class two.\n",
+ "\n",
+ "Unfortunately there are many ways in which we can place a hyperplane\n",
+ "to divide the data. Below is an example of two candidate hyperplanes\n",
+ "for our data sample.\n",
+ "\n",
+ "\n",
+ "## Getting into the details\n",
+ "\n",
+ "Let us define the function"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "f(x) = \\boldsymbol{w}^T\\boldsymbol{x}+b = 0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "as the function that determines the line $L$ that separates two classes (our two features), see the figure here. \n",
+ "\n",
+ "\n",
+ "Any point defined by $\\boldsymbol{x}_i$ and $\\boldsymbol{x}_2$ on the line $L$ will satisfy $\\boldsymbol{w}^T(\\boldsymbol{x}_1-\\boldsymbol{x}_2)=0$. \n",
+ "\n",
+ "The signed distance $\\delta$ from any point defined by a vector $\\boldsymbol{x}$ and a point $\\boldsymbol{x}_0$ on the line $L$ is then"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\delta = \\frac{1}{\\vert\\vert \\boldsymbol{w}\\vert\\vert}(\\boldsymbol{w}^T\\boldsymbol{x}+b).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## First attempt at a minimization approach\n",
+ "\n",
+ "How do we find the parameter $b$ and the vector $\\boldsymbol{w}$? What we could\n",
+ "do is to define a cost function which now contains the set of all\n",
+ "misclassified points $M$ and attempt to minimize this function"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "C(\\boldsymbol{w},b) = -\\sum_{i\\in M} y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We could now for example define all values $y_i =1$ as misclassified in case we have $\\boldsymbol{w}^T\\boldsymbol{x}_i+b < 0$ and the opposite if we have $y_i=-1$. Taking the derivatives gives us"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial C}{\\partial b} = -\\sum_{i\\in M} y_i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial C}{\\partial \\boldsymbol{w}} = -\\sum_{i\\in M} y_ix_i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Solving the equations\n",
+ "\n",
+ "We can now use the Newton-Raphson method or different variants of the gradient descent family (from plain gradient descent to various stochastic gradient descent approaches) to solve the equations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "b \\leftarrow b +\\eta \\frac{\\partial C}{\\partial b},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{w} \\leftarrow \\boldsymbol{w} +\\eta \\frac{\\partial C}{\\partial \\boldsymbol{w}},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where $\\eta$ is our by now well-known learning rate. \n",
+ "\n",
+ "\n",
+ "\n",
+ "## Code Example\n",
+ "\n",
+ "The equations we discussed above can be coded rather easily (the\n",
+ "framework is similar to what we developed for logistic\n",
+ "regression). We are going to set up a simple case with two classes only and we want to find a line which separates them the best possible way."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Problems with the Simpler Approach\n",
+ "\n",
+ "\n",
+ "There are however problems with this approach, although it looks\n",
+ "pretty straightforward to implement. When running the above code, we see that we can easily end up with many diffeent lines which separate the two classes.\n",
+ "\n",
+ "\n",
+ "For small\n",
+ "gaps between the entries, we may also end up needing many iterations\n",
+ "before the solutions converge and if the data cannot be separated\n",
+ "properly into two distinct classes, we may not experience a converge\n",
+ "at all.\n",
+ "\n",
+ "\n",
+ "## A better approach\n",
+ "\n",
+ "A better approach is rather to try to define a large margin between\n",
+ "the two classes (if they are well separated from the beginning).\n",
+ "\n",
+ "Thus, we wish to find a margin $M$ with $\\boldsymbol{w}$ normalized to\n",
+ "$\\vert\\vert \\boldsymbol{w}\\vert\\vert =1$ subject to the condition"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) \\geq M \\hspace{0.1cm}\\forall i=1,2,\\dots, p.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "All points are thus at a signed distance from the decision boundary defined by the line $L$. The parameters $b$ and $w_1$ and $w_2$ define this line. \n",
+ "\n",
+ "We seek thus the largest value $M$ defined by"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{1}{\\vert \\vert \\boldsymbol{w}\\vert\\vert}y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) \\geq M \\hspace{0.1cm}\\forall i=1,2,\\dots, n,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "or just"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) \\geq M\\vert \\vert \\boldsymbol{w}\\vert\\vert \\hspace{0.1cm}\\forall i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "If we scale the equation so that $\\vert \\vert \\boldsymbol{w}\\vert\\vert = 1/M$, we have to find the minimum of \n",
+ "$\\boldsymbol{w}^T\\boldsymbol{w}=\\vert \\vert \\boldsymbol{w}\\vert\\vert$ (the norm) subject to the condition"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) \\geq 1 \\hspace{0.1cm}\\forall i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We have thus defined our margin as the invers of the norm of\n",
+ "$\\boldsymbol{w}$. We want to minimize the norm in order to have a as large as\n",
+ "possible margin $M$. Before we proceed, we need to remind ourselves\n",
+ "about Lagrangian multipliers.\n",
+ "\n",
+ "\n",
+ "## A quick Reminder on Lagrangian Multipliers\n",
+ "\n",
+ "Consider a function of three independent variables $f(x,y,z)$ . For the function $f$ to be an\n",
+ "extreme we have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "df=0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "A necessary and sufficient condition is"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial f}{\\partial x} =\\frac{\\partial f}{\\partial y}=\\frac{\\partial f}{\\partial z}=0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "due to"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "df = \\frac{\\partial f}{\\partial x}dx+\\frac{\\partial f}{\\partial y}dy+\\frac{\\partial f}{\\partial z}dz.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "In many problems the variables $x,y,z$ are often subject to constraints (such as those above for the margin)\n",
+ "so that they are no longer all independent. It is possible at least in principle to use each \n",
+ "constraint to eliminate one variable\n",
+ "and to proceed with a new and smaller set of independent varables.\n",
+ "\n",
+ "The use of so-called Lagrangian multipliers is an alternative technique when the elimination\n",
+ "of variables is incovenient or undesirable. Assume that we have an equation of constraint on \n",
+ "the variables $x,y,z$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\phi(x,y,z) = 0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "resulting in"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "d\\phi = \\frac{\\partial \\phi}{\\partial x}dx+\\frac{\\partial \\phi}{\\partial y}dy+\\frac{\\partial \\phi}{\\partial z}dz =0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Now we cannot set anymore"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial f}{\\partial x} =\\frac{\\partial f}{\\partial y}=\\frac{\\partial f}{\\partial z}=0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "if $df=0$ is wanted\n",
+ "because there are now only two independent variables! Assume $x$ and $y$ are the independent \n",
+ "variables.\n",
+ "Then $dz$ is no longer arbitrary.\n",
+ "\n",
+ "\n",
+ "## Adding the Multiplier\n",
+ "\n",
+ "However, we can add to"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "df = \\frac{\\partial f}{\\partial x}dx+\\frac{\\partial f}{\\partial y}dy+\\frac{\\partial f}{\\partial z}dz,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "a multiplum of $d\\phi$, viz. $\\lambda d\\phi$, resulting in"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "df+\\lambda d\\phi = (\\frac{\\partial f}{\\partial z}+\\lambda\n",
+ "\\frac{\\partial \\phi}{\\partial x})dx+(\\frac{\\partial f}{\\partial y}+\\lambda\\frac{\\partial \\phi}{\\partial y})dy+\n",
+ "(\\frac{\\partial f}{\\partial z}+\\lambda\\frac{\\partial \\phi}{\\partial z})dz =0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Our multiplier is chosen so that"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial f}{\\partial z}+\\lambda\\frac{\\partial \\phi}{\\partial z} =0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We need to remember that we took $dx$ and $dy$ to be arbitrary and thus we must have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial f}{\\partial x}+\\lambda\\frac{\\partial \\phi}{\\partial x} =0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial f}{\\partial y}+\\lambda\\frac{\\partial \\phi}{\\partial y} =0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "When all these equations are satisfied, $df=0$. We have four unknowns, $x,y,z$ and\n",
+ "$\\lambda$. Actually we want only $x,y,z$, $\\lambda$ needs not to be determined, \n",
+ "it is therefore often called\n",
+ "Lagrange's undetermined multiplier.\n",
+ "If we have a set of constraints $\\phi_k$ we have the equations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial f}{\\partial x_i}+\\sum_k\\lambda_k\\frac{\\partial \\phi_k}{\\partial x_i} =0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Setting up the Problem\n",
+ "In order to solve the above problem, we define the following Lagrangian function to be minimized"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "{\\cal L}(\\lambda,b,\\boldsymbol{w})=\\frac{1}{2}\\boldsymbol{w}^T\\boldsymbol{w}-\\sum_{i=1}^n\\lambda_i\\left[y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)-1\\right],\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where $\\lambda_i$ is a so-called Lagrange multiplier subject to the condition $\\lambda_i \\geq 0$.\n",
+ "\n",
+ "Taking the derivatives with respect to $b$ and $\\boldsymbol{w}$ we obtain"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial {\\cal L}}{\\partial b} = -\\sum_{i} \\lambda_iy_i=0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial {\\cal L}}{\\partial \\boldsymbol{w}} = 0 = \\boldsymbol{w}-\\sum_{i} \\lambda_iy_i\\boldsymbol{x}_i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Inserting these constraints into the equation for ${\\cal L}$ we obtain"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{x}_i^T\\boldsymbol{x}_j,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to the constraints $\\lambda_i\\geq 0$ and $\\sum_i\\lambda_iy_i=0$. \n",
+ "We must in addition satisfy the [Karush-Kuhn-Tucker](https://en.wikipedia.org/wiki/Karush%E2%80%93Kuhn%E2%80%93Tucker_conditions) (KKT) condition"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\lambda_i\\left[y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) -1\\right] \\hspace{0.1cm}\\forall i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "1. If $\\lambda_i > 0$, then $y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1$ and we say that $x_i$ is on the boundary.\n",
+ "\n",
+ "2. If $y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)> 1$, we say $x_i$ is not on the boundary and we set $\\lambda_i=0$. \n",
+ "\n",
+ "When $\\lambda_i > 0$, the vectors $\\boldsymbol{x}_i$ are called support vectors. They are the vectors closest to the line (or hyperplane) and define the margin $M$. \n",
+ "\n",
+ "\n",
+ "## The problem to solve\n",
+ "\n",
+ "We can rewrite"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{x}_i^T\\boldsymbol{x}_j,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and its constraints in terms of a matrix-vector problem where we minimize w.r.t. $\\lambda$ the following problem"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{1}{2} \\boldsymbol{\\lambda}^T\\begin{bmatrix} y_1y_1\\boldsymbol{x}_1^T\\boldsymbol{x}_1 & y_1y_2\\boldsymbol{x}_1^T\\boldsymbol{x}_2 & \\dots & \\dots & y_1y_n\\boldsymbol{x}_1^T\\boldsymbol{x}_n \\\\\n",
+ "y_2y_1\\boldsymbol{x}_2^T\\boldsymbol{x}_1 & y_2y_2\\boldsymbol{x}_2^T\\boldsymbol{x}_2 & \\dots & \\dots & y_1y_n\\boldsymbol{x}_2^T\\boldsymbol{x}_n \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "y_ny_1\\boldsymbol{x}_n^T\\boldsymbol{x}_1 & y_ny_2\\boldsymbol{x}_n^T\\boldsymbol{x}_2 & \\dots & \\dots & y_ny_n\\boldsymbol{x}_n^T\\boldsymbol{x}_n \\\\\n",
+ "\\end{bmatrix}\\boldsymbol{\\lambda}-\\mathbb{1}\\boldsymbol{\\lambda},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to $\\boldsymbol{y}^T\\boldsymbol{\\lambda}=0$. Here we defined the vectors $\\boldsymbol{\\lambda} =[\\lambda_1,\\lambda_2,\\dots,\\lambda_n]$ and \n",
+ "$\\boldsymbol{y}=[y_1,y_2,\\dots,y_n]$. \n",
+ "\n",
+ "\n",
+ "\n",
+ "## The last steps\n",
+ "\n",
+ "Solving the above problem, yields the values of $\\lambda_i$.\n",
+ "To find the coefficients of your hyperplane we need simply to compute"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{w}=\\sum_{i} \\lambda_iy_i\\boldsymbol{x}_i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "With our vector $\\boldsymbol{w}$ we can in turn find the value of the intercept $b$ (here in two dimensions) via"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "resulting in"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "b = \\frac{1}{y_i}-\\boldsymbol{w}^T\\boldsymbol{x}_i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "or if we write it out in terms of the support vectors only, with $N_s$ being their number, we have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "b = \\frac{1}{N_s}\\sum_{j\\in N_s}\\left(y_j-\\sum_{i=1}^n\\lambda_iy_i\\boldsymbol{x}_i^T\\boldsymbol{x}_j\\right).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "With our hyperplane coefficients we can use our classifier to assign any observation by simply using"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i = \\mathrm{sign}(\\boldsymbol{w}^T\\boldsymbol{x}_i+b).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Below we discuss how to find the optimal values of $\\lambda_i$. Before we proceed however, we discuss now the so-called soft classifier. \n",
+ "\n",
+ "\n",
+ "## A soft classifier\n",
+ "\n",
+ "Till now, the margin is strictly defined by the support vectors. This defines what is called a hard classifier, that is the margins are well defined.\n",
+ "\n",
+ "Suppose now that classes overlap in feature space, as shown in the\n",
+ "figure here. One way to deal with this problem before we define the\n",
+ "so-called **kernel approach**, is to allow a kind of slack in the sense\n",
+ "that we allow some points to be on the wrong side of the margin.\n",
+ "\n",
+ "We introduce thus the so-called **slack** variables $\\boldsymbol{\\xi} =[\\xi_1,x_2,\\dots,x_n]$ and \n",
+ "modify our previous equation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "to"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1-\\xi_i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "with the requirement $\\xi_i\\geq 0$. The total violation is now $\\sum_i\\xi$. \n",
+ "The value $\\xi_i$ in the constraint the last constraint corresponds to the amount by which the prediction\n",
+ "$y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1$ is on the wrong side of its margin. Hence by bounding the sum $\\sum_i \\xi_i$,\n",
+ "we bound the total amount by which predictions fall on the wrong side of their margins.\n",
+ "\n",
+ "Misclassifications occur when $\\xi_i > 1$. Thus bounding the total sum by some value $C$ bounds in turn the total number of\n",
+ "misclassifications.\n",
+ "\n",
+ "\n",
+ "## Soft optmization problem\n",
+ "\n",
+ "\n",
+ "This has in turn the consequences that we change our optmization problem to finding the minimum of"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "{\\cal L}=\\frac{1}{2}\\boldsymbol{w}^T\\boldsymbol{w}-\\sum_{i=1}^n\\lambda_i\\left[y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)-(1-\\xi_)\\right]+C\\sum_{i=1}^n\\xi_i-\\sum_{i=1}^n\\gamma_i\\xi_i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1-\\xi_i \\hspace{0.1cm}\\forall i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "with the requirement $\\xi_i\\geq 0$.\n",
+ "\n",
+ "Taking the derivatives with respect to $b$ and $\\boldsymbol{w}$ we obtain"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial {\\cal L}}{\\partial b} = -\\sum_{i} \\lambda_iy_i=0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial {\\cal L}}{\\partial \\boldsymbol{w}} = 0 = \\boldsymbol{w}-\\sum_{i} \\lambda_iy_i\\boldsymbol{x}_i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\lambda_i = C-\\gamma_i \\hspace{0.1cm}\\forall i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Inserting these constraints into the equation for ${\\cal L}$ we obtain the same equation as before"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{x}_i^T\\boldsymbol{x}_j,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "but now subject to the constraints $\\lambda_i\\geq 0$, $\\sum_i\\lambda_iy_i=0$ and $0\\leq\\lambda_i \\leq C$. \n",
+ "We must in addition satisfy the Karush-Kuhn-Tucker condition which now reads"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "5\n",
+ "0\n",
+ " \n",
+ "<\n",
+ "<\n",
+ "<\n",
+ "!\n",
+ "!\n",
+ "M\n",
+ "A\n",
+ "T\n",
+ "H\n",
+ "_\n",
+ "B\n",
+ "L\n",
+ "O\n",
+ "C\n",
+ "K"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\gamma_i\\xi_i = 0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) -(1-\\xi_) \\geq 0 \\hspace{0.1cm}\\forall i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Kernels and non-linearity\n",
+ "\n",
+ "The cases we have studied till now, were all characterized by two classes\n",
+ "with a close to linear separability. The classifiers we have described\n",
+ "so far find linear boundaries in our input feature space. It is\n",
+ "possible to make our procedure more flexible by exploring the feature\n",
+ "space using other basis expansions such as higher-order polynomials,\n",
+ "wavelets, splines etc.\n",
+ "\n",
+ "If our feature space is not easy to separate, as shown in the figure\n",
+ "here, we can achieve a better separation by introducing more complex\n",
+ "basis functions. The ideal would be, as shown in the next figure, to, via a specific transformation to \n",
+ "obtain a separation between the classes which is almost linear. \n",
+ "\n",
+ "The change of basis, from $x\\rightarrow z=\\phi(x)$ leads to the same type of equations to be solved, except that\n",
+ "we need to introduce for example a polynomial transformation to a two-dimensional training set."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAsYAAAESCAYAAAD+LxMRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0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PqIeGbRwiRJ68J5XoPEYKxiIuKFwGeBQ8BLM/Mw8C5gI+BnWkrSgHOe16AxGKuIhc+1/AJwBPiVzJwGWPjz2SRwTUS8qGCJkqQuOM9rEBmM1XcR8XQ6H9OTwMsy89vLNnn7wn8/0NfCJEnrwnleg2pj6QI0ejLzPmDLadZ/FYj+VSRJWk/O8xpUBmMNjIjYBDx94dfHAT8dEZcDP8zM+8tVJklaD87zKs1vvtPAiIgG8PWKVZ/IzNf2txpJ0npznldpBmNJkiQJ33wnSZIkAQZjSZIkCTAYS5IkSYDBWJIkSQIMxpIkSRJgMJYkSZIAg7EkSZIEGIwlSZIkAP4fCcOTTWQGCKIAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "filenames": {
+ "image/png": "/Users/hjensen/Teaching/FYS-STK4150/doc/src/LectureNotes/_build/jupyter_execute/chapter7_109_0.png"
+ },
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "import os\n",
+ "\n",
+ "np.random.seed(42)\n",
+ "\n",
+ "# To plot pretty figures\n",
+ "import matplotlib\n",
+ "import matplotlib.pyplot as plt\n",
+ "plt.rcParams['axes.labelsize'] = 14\n",
+ "plt.rcParams['xtick.labelsize'] = 12\n",
+ "plt.rcParams['ytick.labelsize'] = 12\n",
+ "\n",
+ "\n",
+ "from sklearn.svm import SVC\n",
+ "from sklearn import datasets\n",
+ "\n",
+ "\n",
+ "\n",
+ "X1D = np.linspace(-4, 4, 9).reshape(-1, 1)\n",
+ "X2D = np.c_[X1D, X1D**2]\n",
+ "y = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])\n",
+ "\n",
+ "plt.figure(figsize=(11, 4))\n",
+ "\n",
+ "plt.subplot(121)\n",
+ "plt.grid(True, which='both')\n",
+ "plt.axhline(y=0, color='k')\n",
+ "plt.plot(X1D[:, 0][y==0], np.zeros(4), \"bs\")\n",
+ "plt.plot(X1D[:, 0][y==1], np.zeros(5), \"g^\")\n",
+ "plt.gca().get_yaxis().set_ticks([])\n",
+ "plt.xlabel(r\"$x_1$\", fontsize=20)\n",
+ "plt.axis([-4.5, 4.5, -0.2, 0.2])\n",
+ "\n",
+ "plt.subplot(122)\n",
+ "plt.grid(True, which='both')\n",
+ "plt.axhline(y=0, color='k')\n",
+ "plt.axvline(x=0, color='k')\n",
+ "plt.plot(X2D[:, 0][y==0], X2D[:, 1][y==0], \"bs\")\n",
+ "plt.plot(X2D[:, 0][y==1], X2D[:, 1][y==1], \"g^\")\n",
+ "plt.xlabel(r\"$x_1$\", fontsize=20)\n",
+ "plt.ylabel(r\"$x_2$\", fontsize=20, rotation=0)\n",
+ "plt.gca().get_yaxis().set_ticks([0, 4, 8, 12, 16])\n",
+ "plt.plot([-4.5, 4.5], [6.5, 6.5], \"r--\", linewidth=3)\n",
+ "plt.axis([-4.5, 4.5, -1, 17])\n",
+ "plt.subplots_adjust(right=1)\n",
+ "plt.show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## The equations\n",
+ "\n",
+ "Suppose we define a polynomial transformation of degree two only (we continue to live in a plane with $x_i$ and $y_i$ as variables)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "z = \\phi(x_i) =\\left(x_i^2, y_i^2, \\sqrt{2}x_iy_i\\right).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "With our new basis, the equations we solved earlier are basically the same, that is we have now (without the slack option for simplicity)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{z}_i^T\\boldsymbol{z}_j,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to the constraints $\\lambda_i\\geq 0$, $\\sum_i\\lambda_iy_i=0$, and for the support vectors"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{z}_i+b)= 1 \\hspace{0.1cm}\\forall i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "from which we also find $b$.\n",
+ "To compute $\\boldsymbol{z}_i^T\\boldsymbol{z}_j$ we define the kernel $K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)$ as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)=\\boldsymbol{z}_i^T\\boldsymbol{z}_j= \\phi(\\boldsymbol{x}_i)^T\\phi(\\boldsymbol{x}_j).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "For the above example, the kernel reads"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)=[x_i^2, y_i^2, \\sqrt{2}x_iy_i]^T\\begin{bmatrix} x_j^2 \\\\ y_j^2 \\\\ \\sqrt{2}x_jy_j \\end{bmatrix}=x_i^2x_j^2+2x_ix_jy_iy_j+y_i^2y_j^2.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We note that this is nothing but the dot product of the two original\n",
+ "vectors $(\\boldsymbol{x}_i^T\\boldsymbol{x}_j)^2$. Instead of thus computing the\n",
+ "product in the Lagrangian of $\\boldsymbol{z}_i^T\\boldsymbol{z}_j$ we simply compute\n",
+ "the dot product $(\\boldsymbol{x}_i^T\\boldsymbol{x}_j)^2$.\n",
+ "\n",
+ "\n",
+ "This leads to the so-called\n",
+ "kernel trick and the result leads to the same as if we went through\n",
+ "the trouble of performing the transformation\n",
+ "$\\phi(\\boldsymbol{x}_i)^T\\phi(\\boldsymbol{x}_j)$ during the SVM calculations.\n",
+ "\n",
+ "\n",
+ "\n",
+ "## The problem to solve\n",
+ "Using our definition of the kernel We can rewrite again the Lagrangian"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{x}_i^T\\boldsymbol{z}_j,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to the constraints $\\lambda_i\\geq 0$, $\\sum_i\\lambda_iy_i=0$ in terms of a convex optimization problem"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{1}{2} \\boldsymbol{\\lambda}^T\\begin{bmatrix} y_1y_1K(\\boldsymbol{x}_1,\\boldsymbol{x}_1) & y_1y_2K(\\boldsymbol{x}_1,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_1,\\boldsymbol{x}_n) \\\\\n",
+ "y_2y_1K(\\boldsymbol{x}_2,\\boldsymbol{x}_1) & y_2y_2(\\boldsymbol{x}_2,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_2,\\boldsymbol{x}_n) \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "y_ny_1K(\\boldsymbol{x}_n,\\boldsymbol{x}_1) & y_ny_2K(\\boldsymbol{x}_n\\boldsymbol{x}_2) & \\dots & \\dots & y_ny_nK(\\boldsymbol{x}_n,\\boldsymbol{x}_n) \\\\\n",
+ "\\end{bmatrix}\\boldsymbol{\\lambda}-\\mathbb{1}\\boldsymbol{\\lambda},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to $\\boldsymbol{y}^T\\boldsymbol{\\lambda}=0$. Here we defined the vectors $\\boldsymbol{\\lambda} =[\\lambda_1,\\lambda_2,\\dots,\\lambda_n]$ and \n",
+ "$\\boldsymbol{y}=[y_1,y_2,\\dots,y_n]$. \n",
+ "If we add the slack constants this leads to the additional constraint $0\\leq \\lambda_i \\leq C$.\n",
+ "\n",
+ "We can rewrite this (see the solutions below) in terms of a convex optimization problem of the type"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\begin{align*}\n",
+ " &\\mathrm{min}_{\\lambda}\\hspace{0.2cm} \\frac{1}{2}\\boldsymbol{\\lambda}^T\\boldsymbol{P}\\boldsymbol{\\lambda}+\\boldsymbol{q}^T\\boldsymbol{\\lambda},\\\\ \\nonumber\n",
+ " &\\mathrm{subject\\hspace{0.1cm}to} \\hspace{0.2cm} \\boldsymbol{G}\\boldsymbol{\\lambda} \\preceq \\boldsymbol{h} \\hspace{0.2cm} \\wedge \\boldsymbol{A}\\boldsymbol{\\lambda}=f.\n",
+ "\\end{align*}\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Below we discuss how to solve these equations. Here we note that the matrix $\\boldsymbol{P}$ has matrix elements $p_{ij}=y_iy_jK(\\boldsymbol{x}_i,\\boldsymbol{x}_j)$.\n",
+ "Given a kernel $K$ and the targets $y_i$ this matrix is easy to set up. The constraint $\\boldsymbol{y}^T\\boldsymbol{\\lambda}=0$ leads to $f=0$ and $\\boldsymbol{A}=\\boldsymbol{y}$. How to set up the matrix $\\boldsymbol{G}$ is discussed later. Here note that the inequalities $0\\leq \\lambda_i \\leq C$ can be split up into\n",
+ "$0\\leq \\lambda_i$ and $\\lambda_i \\leq C$. These two inequalities define then the matrix $\\boldsymbol{G}$ and the vector $\\boldsymbol{h}$.\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Different kernels and Mercer's theorem\n",
+ "\n",
+ "There are several popular kernels being used. These are\n",
+ "1. Linear: $K(\\boldsymbol{x},\\boldsymbol{y})=\\boldsymbol{x}^T\\boldsymbol{y}$,\n",
+ "\n",
+ "2. Polynomial: $K(\\boldsymbol{x},\\boldsymbol{y})=(\\boldsymbol{x}^T\\boldsymbol{y}+\\gamma)^d$,\n",
+ "\n",
+ "3. Gaussian Radial Basis Function: $K(\\boldsymbol{x},\\boldsymbol{y})=\\exp{\\left(-\\gamma\\vert\\vert\\boldsymbol{x}-\\boldsymbol{y}\\vert\\vert^2\\right)}$,\n",
+ "\n",
+ "4. Tanh: $K(\\boldsymbol{x},\\boldsymbol{y})=\\tanh{(\\boldsymbol{x}^T\\boldsymbol{y}+\\gamma)}$,\n",
+ "\n",
+ "and many other ones.\n",
+ "\n",
+ "An important theorem for us is [Mercer's\n",
+ "theorem](https://en.wikipedia.org/wiki/Mercer%27s_theorem). The\n",
+ "theorem states that if a kernel function $K$ is symmetric, continuous\n",
+ "and leads to a positive semi-definite matrix $\\boldsymbol{P}$ then there\n",
+ "exists a function $\\phi$ that maps $\\boldsymbol{x}_i$ and $\\boldsymbol{x}_j$ into\n",
+ "another space (possibly with much higher dimensions) such that"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)=\\phi(\\boldsymbol{x}_i)^T\\phi(\\boldsymbol{x}_j).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "So you can use $K$ as a kernel since you know $\\phi$ exists, even if\n",
+ "you don’t know what $\\phi$ is. \n",
+ "\n",
+ "Note that some frequently used kernels (such as the Sigmoid kernel)\n",
+ "don’t respect all of Mercer’s conditions, yet they generally work well\n",
+ "in practice.\n",
+ "\n",
+ "\n",
+ "\n",
+ "## The moons example"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZkAAAEXCAYAAAB/HzlmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAfg0lEQVR4nO3df4xd5X3n8ffXTIItD6zsxRpHigyxgpNCU0Ag7SoheKaoYVOaJTJUSqAorkgNWEiQiNVChIuxWVK12dBu5E1DBDgmS4SbOglLXEoTzUBZkHZNzI84y3obWHtZzzhgI+Nxic3Y3/3j3utc3zn3zv1xnnOec87nJV155t5n7vn6mTvne56fx9wdERGREOblHYCIiJSXkoyIiASjJCMiIsEoyYiISDBKMiIiEoySjIiIBKMkIyIiwUSRZMzsFjPbYWZHzWxzh3Krzey4mU03PUazi1RERHoxlHcAdfuAe4ErgAVzlH3e3S8NH5KIiAwqiiTj7tsAzOwS4IM5hyMiIimJIsn06CIzews4CDwCfNXdZ5IKmtkaYA3A/PnzL162bFl2UfbpxIkTzJsXRS9mR4ozXUWIswgxguJM2+7du99y9yV9v4G7R/Og1mW2ucPry4EPURtL+hjwC+DObt57xYoVXgTj4+N5h9AVxZmuIsRZhBjdFWfagB0+wHk9/jTaxN1fc/fX3f2Eu78CbACuyTsuERFJVqgkk8AByzsIERFJFkWSMbMhM5sPnAacZmbzzWzWeJGZfdrMRupffxRYB/wo22hFRKRbUSQZ4C7gXeAO4I/qX99lZsvqa2EaI/aXAy+b2RFgO7ANuC+PgEVEZG5RzC5z9/XA+jYvDzeVux24PYOQREQkBbG0ZEREpISUZEREJBglGRERCUZJRkREglGSERGRYJRkREQkGCUZEREJRklGRESCUZIREZFglGRERCQYJRmJ0tKlYDb7sXRp3pGJSC+UZCRK+/f39ryIxEl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z8All1EItlTkhGJjJkNAx+ufzsPWGZmFwIH3X1vfpGJ9E4r/kUiY2ajwHjCS99x99XZRiMyGCUZEREJRgP/IiISjJKMiIgEoyQjIiLBKMmIiEgwSjIiIhKMkoyIiASjJCMiIsEoyYiISDD/H82YWIps3CzBAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "filenames": {
+ "image/png": "/Users/hjensen/Teaching/FYS-STK4150/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_0.png"
+ },
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/Users/hjensen/opt/anaconda3/lib/python3.8/site-packages/sklearn/svm/_base.py:976: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.\n",
+ " warnings.warn(\"Liblinear failed to converge, increase \"\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZkAAAEXCAYAAAB/HzlmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3de3Sc9X3v+/dXkoUlW0K2LMtcLNuAkMEixiVpE8cNTnxSjtsSdzdp9q6bLGA1i5X0cNrVrnBO0hV2yeWUnjZN907JgUV3ApTWWSQUAqGQBBSbcktqwHZsYxthsC0bWx6PZFuyJI8u3/PHzMij0Yw0l+eZ5/Z9raWFNHpm5suj8Xzmd31EVTHGGGPcUOV1AcYYY8LLQsYYY4xrLGSMMca4xkLGGGOMayxkjDHGuMZCxhhjjGssZIwxxrjGFyEjIneIyGsicl5EHprhuFtFZFxEBjO+1leuUmOMMcWo8bqAlPeAbwA3AXWzHPuqqq5zvyRjjDHl8kXIqOrjACLyfuByj8sxxhjjEF+ETJHWiMgpoA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BEpeozxg0WMsZUgIj8NvAwyUvtvg/YD3wudYVBY0LLQsYYl4nIOuAx4CjwW6oaI3np2hrA1saYULOQMcZFqfUxTwNngI+r6nGAVFfYa8AmEflND0s0xlUWMsa4RESuIjlFWYGbVPVg1iFfTv337ypamDEVVON1AcaElaq+DSyZ4ffPA1K5ioypPAsZY3xGROYDV6V+rALaROR6oE9Vj3hXmTHFsxX/xviMiKwHtub41cOqemtlqzGmPBYyxhhjXGMD/8YYY1xjIWOMMcY1FjLGGGNcYyFjjDHGNRYyxhhjXGMhY4wxxjUWMsYYY1xjIWOMMcY1/z/sq4WEyK9qvAAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "filenames": {
+ "image/png": "/Users/hjensen/Teaching/FYS-STK4150/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_2.png"
+ },
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAqcAAAEoCAYAAABl61iUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nOzde3yU533n/c8lCSGNDgiEJMxBAseybMDBcu3Gi4mByAlLY0yySdqGJhv7aR+37ittd/vEu02f5mmaZJvdpjlsmtReNy1OnSrrnGxjGm9qK+CCiRtsAxYYhIwBiZMYRgIhJDEa6Xr+GI0YpBlp7pn7cN33/N6vFy9jaWbuS2L01e++jkprjRBCCCGEECYo8LoBQgghhBBCJEhxKoQQQgghjCHFqRBCCCGEMIYUp0IIIYQQwhhSnAohhBBCCGNIcSqEEEIIIYwhxakQQgghhDCGFKdCCCGEEMIYUpyK6yil7lZKaaXU73rdFiGEcIPknhBmkeJUTPbu8f/uc+oCSqkmpdQ/KaUOK6UuK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3l93neX+MaebgI3AFzJzf+li1Dy/G/bNd+L+MadW9U7DaTnXAPuBq4Cv9B9fU7Sicr5Fb8qP/wJ3AJc5HYr7x0wRcSLwTXrT5rwQEXv7P18uXJqa5Xejx745mPvHDG3snU4lJUmSpGp45FSSJEnVMJxKkiSpGoZTSZIkVcNwKkmSpGoYTiVJklQNw6kkSZKqYTiVJElSNQynkiRJqobhVJ0UEX+KiIyIi2Y8HxFxa/93N5SqT5JqY99UU1whSp0UEZuAvwNPAqdn5oH+8z8GrgR+npmXFCxRkqpi31RTPHKqTsrM7cA2YCPwVYCIuJpeg70TuLRcdZJUH/ummuKRU3VWRKwDdgB7gBuBnwJ/BC7IzDdL1iZJNbJvqgkeOVVnZeZu4CfAifQa7EPARTMbbEScHRG/jojn+tdUbW2+Wkkqz76pJhhO1XVj0x5fnJmvDXjNauAx4ApgfyNVSVK97JtaVoZTdVZEfJHeaakX+k9dMeh1mfn7zLw6M+8CJpuqT5JqY99UEwyn6qSIOB+4DXgc+AjwBPCNiPhw0cIkqVL2TTXFcKrOiYhPAncBu4HPZ+YY8D1gBHCOPkmawb6pJhlO1Sn9efp+C7wMfC4z/wPQP/X0MHBhRHyqYImSVBX7pppmOFVnRMR6elOeJLAlM3fOeMl3+//+qNHCJKlS9k2VMFK6AKkpmfk08L53+P2fgWiuIkmqm31TJRhOpXlExGpgfX/zCOCEiDgD+F9m7ipXmSTVyb6pQ+EKUdI8IuIc4P4Bv7otM7c2W40k1c++qUNhOJUkSVI1vCFKkiRJ1TCcSpIkqRqGU0mSJFXDcCpJkqRqGE4lSZJUDcOpJEmSqmE4lSRJUjUMp5IkSarG/wH7aTFYJrFlwgAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "filenames": {
+ "image/png": "/Users/hjensen/Teaching/FYS-STK4150/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_3.png"
+ },
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ },
+ {
+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xO92LTCmllD+IyFTsKLYDgV9EpLlvUYYxJsO9yFRNoiX3SjlERBKBJaUsmmOM+aOz0SillPI3ESkrUzXBGPOEk7Gomksz90oppZRSSoUIbVCrlFJKKaVUiNDMvVJKKaWUUiFCM/dKKaWUUkqFCM3cK6WUUkopFSI0c6+UUkoppVSI0My9UkoppZRSIUIz90oppZRSSoUIzdwrpZRSSikVIv4f5jrNQEiAvaEAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "filenames": {
+ "image/png": "/Users/hjensen/Teaching/FYS-STK4150/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_4.png"
+ },
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Phi(-1.0, -2) = [0.74081822]\n",
+ "Phi(-1.0, 1) = [0.30119421]\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAqcAAAHJCAYAAAC485CzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nOy9e5hU1Znv/1ndTUM3dEt3cYtIg4YWBRJFzWWQKIZJPExGSSbJmQzHHDVjfGKS4zmZo79j8ozPJDGJM5lMnDEaM8YB4qWNiQmKGIxIxGAwiqLcBGwQuV+qqxroe3V1rd8f1bvZXb131d5V+17r8zz10FTty6rdvd/13e9tCSklCoVCoVAoFApFEKjwewAKhUKhUCgUCoWGEqcKhUKhUCgUisCgxKlCoVAoFAqFIjAocapQKBQKhUKhCAxKnCoUCoVCoVAoAoMSpwqFQqFQKBSKwKDEqUKhUCgUCoUiMChxqlAoFAqFQqEIDEqcKnxFCDFNCPGkEOKUEOK0EOK3QogmC/udI4T4iRDiFSFEtxBCC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nbqRKfhwHsALAXSyHwvNDSwgxFcC/IFU256gQomfw8o8+N428xfdGCvtNfTw/NAqx72QpKSIiIiIKDGZOiYiIiCgwGJwSERERUWAwOCUiIiKiwGBwSkRERESBweCUiIiIiAKDwSkRERERBQaDUyIiIiIKDAanRERERBQYDE6pKAkhNgghpBDie5rrhRBi2eDv/tOv9hERBQ37TfIKd4iioiSEuBjAVgDNAC6UUg4MXv8kgJ8A+B8p5R0+NpGIKFDYb5JXmDmloiSl3A5gOYCZAP4JAIQQP0Wqg30ZwJ3+tY6IKHjYb5JXmDmloiWEmAxgH4BjAH4J4HcA3gZwvZQy7mfbiIiCiP0meYGZUypaUspDAH4DYCpSHexmAN/TdrBCiG8IIdYIIT4fnFN1q/etJSLyH/tN8gKDUyp2YdX/fyCl7NW5zWgAuwD8G4A+T1pFRBRc7DfJVQxOqWgJIb6P1LDU0cGr/k3vdlLKt6SUP5VSvgog6VX7iIiChv0meYHBKRUlIcS1AJ4H0ATgIgB7AfxQCHGerw0jIgoo9pvkFQanVHSEEHMAvArgEIBvSynDAB4BUAaANfqIiDTYb5KXGJxSURms07cWQBeAb0kpjwDA4NDTxwDmCyGu9LGJRESBwn6TvMbglIqGEGI6UiVPJIBrpJT7NTd5ePDf//a0YUREAcV+k/xQ5ncDiLwipWwBMDHL798FILxrERFRsLHfJD8wOCXKQQgxGsD0wR9LAEwRQlwCICqlbPOvZUREwcR+k+zgDlFEOQgh5gJ4T+dXz0spb/W2NUREwcd+k+xgcEpEREREgcEFUUREREQUGAxOiYiIiCgwGJwSERERUWAwOCUiIiKiwGBwSkRERESBweCUiIiIiAKDwSkRERERBQaDUyIiIiIKjP8Pf5UPT/5bYTcAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "filenames": {
+ "image/png": "/Users/hjensen/Teaching/FYS-STK4150/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_6.png"
+ },
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from __future__ import division, print_function, unicode_literals\n",
+ "\n",
+ "import numpy as np\n",
+ "np.random.seed(42)\n",
+ "\n",
+ "import matplotlib\n",
+ "import matplotlib.pyplot as plt\n",
+ "plt.rcParams['axes.labelsize'] = 14\n",
+ "plt.rcParams['xtick.labelsize'] = 12\n",
+ "plt.rcParams['ytick.labelsize'] = 12\n",
+ "\n",
+ "\n",
+ "from sklearn.svm import SVC\n",
+ "from sklearn import datasets\n",
+ "\n",
+ "\n",
+ "\n",
+ "from sklearn.pipeline import Pipeline\n",
+ "from sklearn.preprocessing import StandardScaler\n",
+ "from sklearn.svm import LinearSVC\n",
+ "\n",
+ "\n",
+ "from sklearn.datasets import make_moons\n",
+ "X, y = make_moons(n_samples=100, noise=0.15, random_state=42)\n",
+ "\n",
+ "def plot_dataset(X, y, axes):\n",
+ " plt.plot(X[:, 0][y==0], X[:, 1][y==0], \"bs\")\n",
+ " plt.plot(X[:, 0][y==1], X[:, 1][y==1], \"g^\")\n",
+ " plt.axis(axes)\n",
+ " plt.grid(True, which='both')\n",
+ " plt.xlabel(r\"$x_1$\", fontsize=20)\n",
+ " plt.ylabel(r\"$x_2$\", fontsize=20, rotation=0)\n",
+ "\n",
+ "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n",
+ "plt.show()\n",
+ "\n",
+ "from sklearn.datasets import make_moons\n",
+ "from sklearn.pipeline import Pipeline\n",
+ "from sklearn.preprocessing import PolynomialFeatures\n",
+ "\n",
+ "polynomial_svm_clf = Pipeline([\n",
+ " (\"poly_features\", PolynomialFeatures(degree=3)),\n",
+ " (\"scaler\", StandardScaler()),\n",
+ " (\"svm_clf\", LinearSVC(C=10, loss=\"hinge\", random_state=42))\n",
+ " ])\n",
+ "\n",
+ "polynomial_svm_clf.fit(X, y)\n",
+ "\n",
+ "def plot_predictions(clf, axes):\n",
+ " x0s = np.linspace(axes[0], axes[1], 100)\n",
+ " x1s = np.linspace(axes[2], axes[3], 100)\n",
+ " x0, x1 = np.meshgrid(x0s, x1s)\n",
+ " X = np.c_[x0.ravel(), x1.ravel()]\n",
+ " y_pred = clf.predict(X).reshape(x0.shape)\n",
+ " y_decision = clf.decision_function(X).reshape(x0.shape)\n",
+ " plt.contourf(x0, x1, y_pred, cmap=plt.cm.brg, alpha=0.2)\n",
+ " plt.contourf(x0, x1, y_decision, cmap=plt.cm.brg, alpha=0.1)\n",
+ "\n",
+ "plot_predictions(polynomial_svm_clf, [-1.5, 2.5, -1, 1.5])\n",
+ "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n",
+ "\n",
+ "plt.show()\n",
+ "\n",
+ "\n",
+ "from sklearn.svm import SVC\n",
+ "\n",
+ "poly_kernel_svm_clf = Pipeline([\n",
+ " (\"scaler\", StandardScaler()),\n",
+ " (\"svm_clf\", SVC(kernel=\"poly\", degree=3, coef0=1, C=5))\n",
+ " ])\n",
+ "poly_kernel_svm_clf.fit(X, y)\n",
+ "\n",
+ "poly100_kernel_svm_clf = Pipeline([\n",
+ " (\"scaler\", StandardScaler()),\n",
+ " (\"svm_clf\", SVC(kernel=\"poly\", degree=10, coef0=100, C=5))\n",
+ " ])\n",
+ "poly100_kernel_svm_clf.fit(X, y)\n",
+ "\n",
+ "plt.figure(figsize=(11, 4))\n",
+ "\n",
+ "plt.subplot(121)\n",
+ "plot_predictions(poly_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])\n",
+ "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n",
+ "plt.title(r\"$d=3, r=1, C=5$\", fontsize=18)\n",
+ "\n",
+ "plt.subplot(122)\n",
+ "plot_predictions(poly100_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])\n",
+ "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n",
+ "plt.title(r\"$d=10, r=100, C=5$\", fontsize=18)\n",
+ "\n",
+ "plt.show()\n",
+ "\n",
+ "def gaussian_rbf(x, landmark, gamma):\n",
+ " return np.exp(-gamma * np.linalg.norm(x - landmark, axis=1)**2)\n",
+ "\n",
+ "gamma = 0.3\n",
+ "\n",
+ "x1s = np.linspace(-4.5, 4.5, 200).reshape(-1, 1)\n",
+ "x2s = gaussian_rbf(x1s, -2, gamma)\n",
+ "x3s = gaussian_rbf(x1s, 1, gamma)\n",
+ "\n",
+ "XK = np.c_[gaussian_rbf(X1D, -2, gamma), gaussian_rbf(X1D, 1, gamma)]\n",
+ "yk = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])\n",
+ "\n",
+ "plt.figure(figsize=(11, 4))\n",
+ "\n",
+ "plt.subplot(121)\n",
+ "plt.grid(True, which='both')\n",
+ "plt.axhline(y=0, color='k')\n",
+ "plt.scatter(x=[-2, 1], y=[0, 0], s=150, alpha=0.5, c=\"red\")\n",
+ "plt.plot(X1D[:, 0][yk==0], np.zeros(4), \"bs\")\n",
+ "plt.plot(X1D[:, 0][yk==1], np.zeros(5), \"g^\")\n",
+ "plt.plot(x1s, x2s, \"g--\")\n",
+ "plt.plot(x1s, x3s, \"b:\")\n",
+ "plt.gca().get_yaxis().set_ticks([0, 0.25, 0.5, 0.75, 1])\n",
+ "plt.xlabel(r\"$x_1$\", fontsize=20)\n",
+ "plt.ylabel(r\"Similarity\", fontsize=14)\n",
+ "plt.annotate(r'$\\mathbf{x}$',\n",
+ " xy=(X1D[3, 0], 0),\n",
+ " xytext=(-0.5, 0.20),\n",
+ " ha=\"center\",\n",
+ " arrowprops=dict(facecolor='black', shrink=0.1),\n",
+ " fontsize=18,\n",
+ " )\n",
+ "plt.text(-2, 0.9, \"$x_2$\", ha=\"center\", fontsize=20)\n",
+ "plt.text(1, 0.9, \"$x_3$\", ha=\"center\", fontsize=20)\n",
+ "plt.axis([-4.5, 4.5, -0.1, 1.1])\n",
+ "\n",
+ "plt.subplot(122)\n",
+ "plt.grid(True, which='both')\n",
+ "plt.axhline(y=0, color='k')\n",
+ "plt.axvline(x=0, color='k')\n",
+ "plt.plot(XK[:, 0][yk==0], XK[:, 1][yk==0], \"bs\")\n",
+ "plt.plot(XK[:, 0][yk==1], XK[:, 1][yk==1], \"g^\")\n",
+ "plt.xlabel(r\"$x_2$\", fontsize=20)\n",
+ "plt.ylabel(r\"$x_3$ \", fontsize=20, rotation=0)\n",
+ "plt.annotate(r'$\\phi\\left(\\mathbf{x}\\right)$',\n",
+ " xy=(XK[3, 0], XK[3, 1]),\n",
+ " xytext=(0.65, 0.50),\n",
+ " ha=\"center\",\n",
+ " arrowprops=dict(facecolor='black', shrink=0.1),\n",
+ " fontsize=18,\n",
+ " )\n",
+ "plt.plot([-0.1, 1.1], [0.57, -0.1], \"r--\", linewidth=3)\n",
+ "plt.axis([-0.1, 1.1, -0.1, 1.1])\n",
+ " \n",
+ "plt.subplots_adjust(right=1)\n",
+ "\n",
+ "plt.show()\n",
+ "\n",
+ "\n",
+ "x1_example = X1D[3, 0]\n",
+ "for landmark in (-2, 1):\n",
+ " k = gaussian_rbf(np.array([[x1_example]]), np.array([[landmark]]), gamma)\n",
+ " print(\"Phi({}, {}) = {}\".format(x1_example, landmark, k))\n",
+ "\n",
+ "rbf_kernel_svm_clf = Pipeline([\n",
+ " (\"scaler\", StandardScaler()),\n",
+ " (\"svm_clf\", SVC(kernel=\"rbf\", gamma=5, C=0.001))\n",
+ " ])\n",
+ "rbf_kernel_svm_clf.fit(X, y)\n",
+ "\n",
+ "\n",
+ "from sklearn.svm import SVC\n",
+ "\n",
+ "gamma1, gamma2 = 0.1, 5\n",
+ "C1, C2 = 0.001, 1000\n",
+ "hyperparams = (gamma1, C1), (gamma1, C2), (gamma2, C1), (gamma2, C2)\n",
+ "\n",
+ "svm_clfs = []\n",
+ "for gamma, C in hyperparams:\n",
+ " rbf_kernel_svm_clf = Pipeline([\n",
+ " (\"scaler\", StandardScaler()),\n",
+ " (\"svm_clf\", SVC(kernel=\"rbf\", gamma=gamma, C=C))\n",
+ " ])\n",
+ " rbf_kernel_svm_clf.fit(X, y)\n",
+ " svm_clfs.append(rbf_kernel_svm_clf)\n",
+ "\n",
+ "plt.figure(figsize=(11, 7))\n",
+ "\n",
+ "for i, svm_clf in enumerate(svm_clfs):\n",
+ " plt.subplot(221 + i)\n",
+ " plot_predictions(svm_clf, [-1.5, 2.5, -1, 1.5])\n",
+ " plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n",
+ " gamma, C = hyperparams[i]\n",
+ " plt.title(r\"$\\gamma = {}, C = {}$\".format(gamma, C), fontsize=16)\n",
+ "\n",
+ "plt.show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Mathematical optimization of convex functions\n",
+ "\n",
+ "A mathematical (quadratic) optimization problem, or just optimization problem, has the form"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\begin{align*}\n",
+ " &\\mathrm{min}_{\\lambda}\\hspace{0.2cm} \\frac{1}{2}\\boldsymbol{\\lambda}^T\\boldsymbol{P}\\boldsymbol{\\lambda}+\\boldsymbol{q}^T\\boldsymbol{\\lambda},\\\\ \\nonumber\n",
+ " &\\mathrm{subject\\hspace{0.1cm}to} \\hspace{0.2cm} \\boldsymbol{G}\\boldsymbol{\\lambda} \\preceq \\boldsymbol{h} \\wedge \\boldsymbol{A}\\boldsymbol{\\lambda}=f.\n",
+ "\\end{align*}\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to some constraints for say a selected set $i=1,2,\\dots, n$.\n",
+ "In our case we are optimizing with respect to the Lagrangian multipliers $\\lambda_i$, and the\n",
+ "vector $\\boldsymbol{\\lambda}=[\\lambda_1, \\lambda_2,\\dots, \\lambda_n]$ is the optimization variable we are dealing with.\n",
+ "\n",
+ "In our case we are particularly interested in a class of optimization problems called convex optmization problems. \n",
+ "In our discussion on gradient descent methods we discussed at length the definition of a convex function. \n",
+ "\n",
+ "Convex optimization problems play a central role in applied mathematics and we recommend strongly [Boyd and Vandenberghe's text on the topics](http://web.stanford.edu/~boyd/cvxbook/).\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "## How do we solve these problems?\n",
+ "\n",
+ "If we use Python as programming language and wish to venture beyond\n",
+ "**scikit-learn**, **tensorflow** and similar software which makes our\n",
+ "lives so much easier, we need to dive into the wonderful world of\n",
+ "quadratic programming. We can, if we wish, solve the minimization\n",
+ "problem using say standard gradient methods or conjugate gradient\n",
+ "methods. However, these methods tend to exhibit a rather slow\n",
+ "converge. So, welcome to the promised land of quadratic programming.\n",
+ "\n",
+ "The functions we need are contained in the quadratic programming package **CVXOPT** and we need to import it together with **numpy** as"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "import numpy\n",
+ "import cvxopt"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "This will make our life much easier. You don't need t write your own optimizer.\n",
+ "\n",
+ "\n",
+ "\n",
+ "## A simple example\n",
+ "\n",
+ "We remind ourselves about the general problem we want to solve"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\begin{align*}\n",
+ " &\\mathrm{min}_{x}\\hspace{0.2cm} \\frac{1}{2}\\boldsymbol{x}^T\\boldsymbol{P}\\boldsymbol{x}+\\boldsymbol{q}^T\\boldsymbol{x},\\\\ \\nonumber\n",
+ " &\\mathrm{subject\\hspace{0.1cm} to} \\hspace{0.2cm} \\boldsymbol{G}\\boldsymbol{x} \\preceq \\boldsymbol{h} \\wedge \\boldsymbol{A}\\boldsymbol{x}=f.\n",
+ "\\end{align*}\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Let us show how to perform the optmization using a simple case. Assume we want to optimize the following problem"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\begin{align*}\n",
+ " &\\mathrm{min}_{x}\\hspace{0.2cm} \\frac{1}{2}x^2+5x+3y \\\\ \\nonumber\n",
+ " &\\mathrm{subject to} \\\\ \\nonumber\n",
+ " &x, y \\geq 0 \\\\ \\nonumber\n",
+ " &x+3y \\geq 15 \\\\ \\nonumber\n",
+ " &2x+5y \\leq 100 \\\\ \\nonumber\n",
+ " &3x+4y \\leq 80. \\\\ \\nonumber\n",
+ "\\end{align*}\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "The minimization problem can be rewritten in terms of vectors and matrices as (with $x$ and $y$ being the unknowns)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{1}{2}\\begin{bmatrix} x\\\\ y \\end{bmatrix}^T \\begin{bmatrix} 1 & 0\\\\ 0 & 0 \\end{bmatrix} \\begin{bmatrix} x \\\\ y \\end{bmatrix} + \\begin{bmatrix}3\\\\ 4 \\end{bmatrix}^T \\begin{bmatrix}x \\\\ y \\end{bmatrix}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Similarly, we can now set up the inequalities (we need to change $\\geq$ to $\\leq$ by multiplying with $-1$ on bot sides) as the following matrix-vector equation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\begin{bmatrix} -1 & 0 \\\\ 0 & -1 \\\\ -1 & -3 \\\\ 2 & 5 \\\\ 3 & 4\\end{bmatrix}\\begin{bmatrix} x \\\\ y\\end{bmatrix} \\preceq \\begin{bmatrix}0 \\\\ 0\\\\ -15 \\\\ 100 \\\\ 80\\end{bmatrix}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We have collapsed all the inequalities into a single matrix $\\boldsymbol{G}$. We see also that our matrix"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{P} =\\begin{bmatrix} 1 & 0\\\\ 0 & 0 \\end{bmatrix}\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "is clearly positive semi-definite (all eigenvalues larger or equal zero). \n",
+ "Finally, the vector $\\boldsymbol{h}$ is defined as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{h} = \\begin{bmatrix}0 \\\\ 0\\\\ -15 \\\\ 100 \\\\ 80\\end{bmatrix}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Since we don't have any equalities the matrix $\\boldsymbol{A}$ is set to zero\n",
+ "The following code solves the equations for us"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "ename": "SyntaxError",
+ "evalue": "invalid character in identifier (, line 5)",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[0;36m File \u001b[0;32m\"\"\u001b[0;36m, line \u001b[0;32m5\u001b[0m\n\u001b[0;31m P = matrix(numpy.diag([1,0]), tc=’d’)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid character in identifier\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Import the necessary packages\n",
+ "import numpy\n",
+ "from cvxopt import matrix\n",
+ "from cvxopt import solvers\n",
+ "P = matrix(numpy.diag([1,0]), tc=’d’)\n",
+ "q = matrix(numpy.array([3,4]), tc=’d’)\n",
+ "G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc=’d’)\n",
+ "h = matrix(numpy.array([0,0,-15,100,80]), tc=’d’)\n",
+ "# Construct the QP, invoke solver\n",
+ "sol = solvers.qp(P,q,G,h)\n",
+ "# Extract optimal value and solution\n",
+ "sol[’x’] \n",
+ "sol[’primal objective’]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Back to the more realistic cases\n",
+ "\n",
+ "We are now ready to return to our setup of the optmization problem for a more realistic case. Introducing the **slack** parameter $C$ we have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{1}{2} \\boldsymbol{\\lambda}^T\\begin{bmatrix} y_1y_1K(\\boldsymbol{x}_1,\\boldsymbol{x}_1) & y_1y_2K(\\boldsymbol{x}_1,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_1,\\boldsymbol{x}_n) \\\\\n",
+ "y_2y_1K(\\boldsymbol{x}_2,\\boldsymbol{x}_1) & y_2y_2K(\\boldsymbol{x}_2,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_2,\\boldsymbol{x}_n) \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "y_ny_1K(\\boldsymbol{x}_n,\\boldsymbol{x}_1) & y_ny_2K(\\boldsymbol{x}_n\\boldsymbol{x}_2) & \\dots & \\dots & y_ny_nK(\\boldsymbol{x}_n,\\boldsymbol{x}_n) \\\\\n",
+ "\\end{bmatrix}\\boldsymbol{\\lambda}-\\mathbb{I}\\boldsymbol{\\lambda},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to $\\boldsymbol{y}^T\\boldsymbol{\\lambda}=0$. Here we defined the vectors $\\boldsymbol{\\lambda} =[\\lambda_1,\\lambda_2,\\dots,\\lambda_n]$ and \n",
+ "$\\boldsymbol{y}=[y_1,y_2,\\dots,y_n]$. \n",
+ "With the slack constants this leads to the additional constraint $0\\leq \\lambda_i \\leq C$.\n",
+ "\n",
+ "**code will be added**"
+ ]
+ }
+ ],
+ "metadata": {
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.8.3"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
\ No newline at end of file
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter7.py b/doc/src/LectureNotes/_build/jupyter_execute/chapter7.py
new file mode 100644
index 000000000..ecf74ee9d
--- /dev/null
+++ b/doc/src/LectureNotes/_build/jupyter_execute/chapter7.py
@@ -0,0 +1,1114 @@
+# Support Vector Machines, overarching aims
+
+A Support Vector Machine (SVM) is a very powerful and versatile
+Machine Learning method, capable of performing linear or nonlinear
+classification, regression, and even outlier detection. It is one of
+the most popular models in Machine Learning, and anyone interested in
+Machine Learning should have it in their toolbox. SVMs are
+particularly well suited for classification of complex but small-sized or
+medium-sized datasets.
+
+The case with two well-separated classes only can be understood in an
+intuitive way in terms of lines in a two-dimensional space separating
+the two classes (see figure below).
+
+The basic mathematics behind the SVM is however less familiar to most of us.
+It relies on the definition of hyperplanes and the
+definition of a **margin** which separates classes (in case of
+classification problems) of variables. It is also used for regression
+problems.
+
+With SVMs we distinguish between hard margin and soft margins. The
+latter introduces a so-called softening parameter to be discussed
+below. We distinguish also between linear and non-linear
+approaches. The latter are the most frequent ones since it is rather
+unlikely that we can separate classes easily by say straight lines.
+
+
+## Hyperplanes and all that
+
+The theory behind support vector machines (SVM hereafter) is based on
+the mathematical description of so-called hyperplanes. Let us start
+with a two-dimensional case. This will also allow us to introduce our
+first SVM examples. These will be tailored to the case of two specific
+classes, as displayed in the figure here based on the usage of the petal data.
+
+We assume here that our data set can be well separated into two
+domains, where a straight line does the job in the separating the two
+classes. Here the two classes are represented by either squares or
+circles.
+
+%matplotlib inline
+
+from sklearn import datasets
+from sklearn.svm import SVC, LinearSVC
+from sklearn.linear_model import SGDClassifier
+from sklearn.preprocessing import StandardScaler
+import matplotlib
+import matplotlib.pyplot as plt
+plt.rcParams['axes.labelsize'] = 14
+plt.rcParams['xtick.labelsize'] = 12
+plt.rcParams['ytick.labelsize'] = 12
+
+
+iris = datasets.load_iris()
+X = iris["data"][:, (2, 3)] # petal length, petal width
+y = iris["target"]
+
+setosa_or_versicolor = (y == 0) | (y == 1)
+X = X[setosa_or_versicolor]
+y = y[setosa_or_versicolor]
+
+
+
+C = 5
+alpha = 1 / (C * len(X))
+
+lin_clf = LinearSVC(loss="hinge", C=C, random_state=42)
+svm_clf = SVC(kernel="linear", C=C)
+sgd_clf = SGDClassifier(loss="hinge", learning_rate="constant", eta0=0.001, alpha=alpha,
+ max_iter=100000, random_state=42)
+
+scaler = StandardScaler()
+X_scaled = scaler.fit_transform(X)
+
+lin_clf.fit(X_scaled, y)
+svm_clf.fit(X_scaled, y)
+sgd_clf.fit(X_scaled, y)
+
+print("LinearSVC: ", lin_clf.intercept_, lin_clf.coef_)
+print("SVC: ", svm_clf.intercept_, svm_clf.coef_)
+print("SGDClassifier(alpha={:.5f}):".format(sgd_clf.alpha), sgd_clf.intercept_, sgd_clf.coef_)
+
+# Compute the slope and bias of each decision boundary
+w1 = -lin_clf.coef_[0, 0]/lin_clf.coef_[0, 1]
+b1 = -lin_clf.intercept_[0]/lin_clf.coef_[0, 1]
+w2 = -svm_clf.coef_[0, 0]/svm_clf.coef_[0, 1]
+b2 = -svm_clf.intercept_[0]/svm_clf.coef_[0, 1]
+w3 = -sgd_clf.coef_[0, 0]/sgd_clf.coef_[0, 1]
+b3 = -sgd_clf.intercept_[0]/sgd_clf.coef_[0, 1]
+
+# Transform the decision boundary lines back to the original scale
+line1 = scaler.inverse_transform([[-10, -10 * w1 + b1], [10, 10 * w1 + b1]])
+line2 = scaler.inverse_transform([[-10, -10 * w2 + b2], [10, 10 * w2 + b2]])
+line3 = scaler.inverse_transform([[-10, -10 * w3 + b3], [10, 10 * w3 + b3]])
+
+# Plot all three decision boundaries
+plt.figure(figsize=(11, 4))
+plt.plot(line1[:, 0], line1[:, 1], "k:", label="LinearSVC")
+plt.plot(line2[:, 0], line2[:, 1], "b--", linewidth=2, label="SVC")
+plt.plot(line3[:, 0], line3[:, 1], "r-", label="SGDClassifier")
+plt.plot(X[:, 0][y==1], X[:, 1][y==1], "bs") # label="Iris-Versicolor"
+plt.plot(X[:, 0][y==0], X[:, 1][y==0], "yo") # label="Iris-Setosa"
+plt.xlabel("Petal length", fontsize=14)
+plt.ylabel("Petal width", fontsize=14)
+plt.legend(loc="upper center", fontsize=14)
+plt.axis([0, 5.5, 0, 2])
+
+plt.show()
+
+## What is a hyperplane?
+
+The aim of the SVM algorithm is to find a hyperplane in a
+$p$-dimensional space, where $p$ is the number of features that
+distinctly classifies the data points.
+
+In a $p$-dimensional space, a hyperplane is what we call an affine subspace of dimension of $p-1$.
+As an example, in two dimension, a hyperplane is simply as straight line while in three dimensions it is
+a two-dimensional subspace, or stated simply, a plane.
+
+In two dimensions, with the variables $x_1$ and $x_2$, the hyperplane is defined as
+
+$$
+b+w_1x_1+w_2x_2=0,
+$$
+
+where $b$ is the intercept and $w_1$ and $w_2$ define the elements of a vector orthogonal to the line
+$b+w_1x_1+w_2x_2=0$.
+In two dimensions we define the vectors $\boldsymbol{x} =[x1,x2]$ and $\boldsymbol{w}=[w1,w2]$.
+We can then rewrite the above equation as
+
+$$
+\boldsymbol{x}^T\boldsymbol{w}+b=0.
+$$
+
+## A $p$-dimensional space of features
+
+We limit ourselves to two classes of outputs $y_i$ and assign these classes the values $y_i = \pm 1$.
+In a $p$-dimensional space of say $p$ features we have a hyperplane defines as
+
+$$
+b+wx_1+w_2x_2+\dots +w_px_p=0.
+$$
+
+If we define a
+matrix $\boldsymbol{X}=\left[\boldsymbol{x}_1,\boldsymbol{x}_2,\dots, \boldsymbol{x}_p\right]$
+of dimension $n\times p$, where $n$ represents the observations for each feature and each vector $x_i$ is a column vector of the matrix $\boldsymbol{X}$,
+
+$$
+\boldsymbol{x}_i = \begin{bmatrix} x_{i1} \\ x_{i2} \\ \dots \\ \dots \\ x_{ip} \end{bmatrix}.
+$$
+
+If the above condition is not met for a given vector $\boldsymbol{x}_i$ we have
+
+$$
+b+w_1x_{i1}+w_2x_{i2}+\dots +w_px_{ip} >0,
+$$
+
+if our output $y_i=1$.
+In this case we say that $\boldsymbol{x}_i$ lies on one of the sides of the hyperplane and if
+
+$$
+b+w_1x_{i1}+w_2x_{i2}+\dots +w_px_{ip} < 0,
+$$
+
+for the class of observations $y_i=-1$,
+then $\boldsymbol{x}_i$ lies on the other side.
+
+Equivalently, for the two classes of observations we have
+
+$$
+y_i\left(b+w_1x_{i1}+w_2x_{i2}+\dots +w_px_{ip}\right) > 0.
+$$
+
+When we try to separate hyperplanes, if it exists, we can use it to construct a natural classifier: a test observation is assigned a given class depending on which side of the hyperplane it is located.
+
+
+## The two-dimensional case
+
+Let us try to develop our intuition about SVMs by limiting ourselves to a two-dimensional
+plane. To separate the two classes of data points, there are many
+possible lines (hyperplanes if you prefer a more strict naming)
+that could be chosen. Our objective is to find a
+plane that has the maximum margin, i.e the maximum distance between
+data points of both classes. Maximizing the margin distance provides
+some reinforcement so that future data points can be classified with
+more confidence.
+
+What a linear classifier attempts to accomplish is to split the
+feature space into two half spaces by placing a hyperplane between the
+data points. This hyperplane will be our decision boundary. All
+points on one side of the plane will belong to class one and all points
+on the other side of the plane will belong to the second class two.
+
+Unfortunately there are many ways in which we can place a hyperplane
+to divide the data. Below is an example of two candidate hyperplanes
+for our data sample.
+
+
+## Getting into the details
+
+Let us define the function
+
+$$
+f(x) = \boldsymbol{w}^T\boldsymbol{x}+b = 0,
+$$
+
+as the function that determines the line $L$ that separates two classes (our two features), see the figure here.
+
+
+Any point defined by $\boldsymbol{x}_i$ and $\boldsymbol{x}_2$ on the line $L$ will satisfy $\boldsymbol{w}^T(\boldsymbol{x}_1-\boldsymbol{x}_2)=0$.
+
+The signed distance $\delta$ from any point defined by a vector $\boldsymbol{x}$ and a point $\boldsymbol{x}_0$ on the line $L$ is then
+
+$$
+\delta = \frac{1}{\vert\vert \boldsymbol{w}\vert\vert}(\boldsymbol{w}^T\boldsymbol{x}+b).
+$$
+
+## First attempt at a minimization approach
+
+How do we find the parameter $b$ and the vector $\boldsymbol{w}$? What we could
+do is to define a cost function which now contains the set of all
+misclassified points $M$ and attempt to minimize this function
+
+$$
+C(\boldsymbol{w},b) = -\sum_{i\in M} y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b).
+$$
+
+We could now for example define all values $y_i =1$ as misclassified in case we have $\boldsymbol{w}^T\boldsymbol{x}_i+b < 0$ and the opposite if we have $y_i=-1$. Taking the derivatives gives us
+
+$$
+\frac{\partial C}{\partial b} = -\sum_{i\in M} y_i,
+$$
+
+and
+
+$$
+\frac{\partial C}{\partial \boldsymbol{w}} = -\sum_{i\in M} y_ix_i.
+$$
+
+## Solving the equations
+
+We can now use the Newton-Raphson method or different variants of the gradient descent family (from plain gradient descent to various stochastic gradient descent approaches) to solve the equations
+
+$$
+b \leftarrow b +\eta \frac{\partial C}{\partial b},
+$$
+
+and
+
+$$
+\boldsymbol{w} \leftarrow \boldsymbol{w} +\eta \frac{\partial C}{\partial \boldsymbol{w}},
+$$
+
+where $\eta$ is our by now well-known learning rate.
+
+
+
+## Code Example
+
+The equations we discussed above can be coded rather easily (the
+framework is similar to what we developed for logistic
+regression). We are going to set up a simple case with two classes only and we want to find a line which separates them the best possible way.
+
+## Problems with the Simpler Approach
+
+
+There are however problems with this approach, although it looks
+pretty straightforward to implement. When running the above code, we see that we can easily end up with many diffeent lines which separate the two classes.
+
+
+For small
+gaps between the entries, we may also end up needing many iterations
+before the solutions converge and if the data cannot be separated
+properly into two distinct classes, we may not experience a converge
+at all.
+
+
+## A better approach
+
+A better approach is rather to try to define a large margin between
+the two classes (if they are well separated from the beginning).
+
+Thus, we wish to find a margin $M$ with $\boldsymbol{w}$ normalized to
+$\vert\vert \boldsymbol{w}\vert\vert =1$ subject to the condition
+
+$$
+y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, p.
+$$
+
+All points are thus at a signed distance from the decision boundary defined by the line $L$. The parameters $b$ and $w_1$ and $w_2$ define this line.
+
+We seek thus the largest value $M$ defined by
+
+$$
+\frac{1}{\vert \vert \boldsymbol{w}\vert\vert}y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, n,
+$$
+
+or just
+
+$$
+y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq M\vert \vert \boldsymbol{w}\vert\vert \hspace{0.1cm}\forall i.
+$$
+
+If we scale the equation so that $\vert \vert \boldsymbol{w}\vert\vert = 1/M$, we have to find the minimum of
+$\boldsymbol{w}^T\boldsymbol{w}=\vert \vert \boldsymbol{w}\vert\vert$ (the norm) subject to the condition
+
+$$
+y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq 1 \hspace{0.1cm}\forall i.
+$$
+
+We have thus defined our margin as the invers of the norm of
+$\boldsymbol{w}$. We want to minimize the norm in order to have a as large as
+possible margin $M$. Before we proceed, we need to remind ourselves
+about Lagrangian multipliers.
+
+
+## A quick Reminder on Lagrangian Multipliers
+
+Consider a function of three independent variables $f(x,y,z)$ . For the function $f$ to be an
+extreme we have
+
+$$
+df=0.
+$$
+
+A necessary and sufficient condition is
+
+$$
+\frac{\partial f}{\partial x} =\frac{\partial f}{\partial y}=\frac{\partial f}{\partial z}=0,
+$$
+
+due to
+
+$$
+df = \frac{\partial f}{\partial x}dx+\frac{\partial f}{\partial y}dy+\frac{\partial f}{\partial z}dz.
+$$
+
+In many problems the variables $x,y,z$ are often subject to constraints (such as those above for the margin)
+so that they are no longer all independent. It is possible at least in principle to use each
+constraint to eliminate one variable
+and to proceed with a new and smaller set of independent varables.
+
+The use of so-called Lagrangian multipliers is an alternative technique when the elimination
+of variables is incovenient or undesirable. Assume that we have an equation of constraint on
+the variables $x,y,z$
+
+$$
+\phi(x,y,z) = 0,
+$$
+
+resulting in
+
+$$
+d\phi = \frac{\partial \phi}{\partial x}dx+\frac{\partial \phi}{\partial y}dy+\frac{\partial \phi}{\partial z}dz =0.
+$$
+
+Now we cannot set anymore
+
+$$
+\frac{\partial f}{\partial x} =\frac{\partial f}{\partial y}=\frac{\partial f}{\partial z}=0,
+$$
+
+if $df=0$ is wanted
+because there are now only two independent variables! Assume $x$ and $y$ are the independent
+variables.
+Then $dz$ is no longer arbitrary.
+
+
+## Adding the Multiplier
+
+However, we can add to
+
+$$
+df = \frac{\partial f}{\partial x}dx+\frac{\partial f}{\partial y}dy+\frac{\partial f}{\partial z}dz,
+$$
+
+a multiplum of $d\phi$, viz. $\lambda d\phi$, resulting in
+
+$$
+df+\lambda d\phi = (\frac{\partial f}{\partial z}+\lambda
+\frac{\partial \phi}{\partial x})dx+(\frac{\partial f}{\partial y}+\lambda\frac{\partial \phi}{\partial y})dy+
+(\frac{\partial f}{\partial z}+\lambda\frac{\partial \phi}{\partial z})dz =0.
+$$
+
+Our multiplier is chosen so that
+
+$$
+\frac{\partial f}{\partial z}+\lambda\frac{\partial \phi}{\partial z} =0.
+$$
+
+We need to remember that we took $dx$ and $dy$ to be arbitrary and thus we must have
+
+$$
+\frac{\partial f}{\partial x}+\lambda\frac{\partial \phi}{\partial x} =0,
+$$
+
+and
+
+$$
+\frac{\partial f}{\partial y}+\lambda\frac{\partial \phi}{\partial y} =0.
+$$
+
+When all these equations are satisfied, $df=0$. We have four unknowns, $x,y,z$ and
+$\lambda$. Actually we want only $x,y,z$, $\lambda$ needs not to be determined,
+it is therefore often called
+Lagrange's undetermined multiplier.
+If we have a set of constraints $\phi_k$ we have the equations
+
+$$
+\frac{\partial f}{\partial x_i}+\sum_k\lambda_k\frac{\partial \phi_k}{\partial x_i} =0.
+$$
+
+## Setting up the Problem
+In order to solve the above problem, we define the following Lagrangian function to be minimized
+
+$$
+{\cal L}(\lambda,b,\boldsymbol{w})=\frac{1}{2}\boldsymbol{w}^T\boldsymbol{w}-\sum_{i=1}^n\lambda_i\left[y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)-1\right],
+$$
+
+where $\lambda_i$ is a so-called Lagrange multiplier subject to the condition $\lambda_i \geq 0$.
+
+Taking the derivatives with respect to $b$ and $\boldsymbol{w}$ we obtain
+
+$$
+\frac{\partial {\cal L}}{\partial b} = -\sum_{i} \lambda_iy_i=0,
+$$
+
+and
+
+$$
+\frac{\partial {\cal L}}{\partial \boldsymbol{w}} = 0 = \boldsymbol{w}-\sum_{i} \lambda_iy_i\boldsymbol{x}_i.
+$$
+
+Inserting these constraints into the equation for ${\cal L}$ we obtain
+
+$$
+{\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\boldsymbol{x}_i^T\boldsymbol{x}_j,
+$$
+
+subject to the constraints $\lambda_i\geq 0$ and $\sum_i\lambda_iy_i=0$.
+We must in addition satisfy the [Karush-Kuhn-Tucker](https://en.wikipedia.org/wiki/Karush%E2%80%93Kuhn%E2%80%93Tucker_conditions) (KKT) condition
+
+$$
+\lambda_i\left[y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) -1\right] \hspace{0.1cm}\forall i.
+$$
+
+1. If $\lambda_i > 0$, then $y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1$ and we say that $x_i$ is on the boundary.
+
+2. If $y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)> 1$, we say $x_i$ is not on the boundary and we set $\lambda_i=0$.
+
+When $\lambda_i > 0$, the vectors $\boldsymbol{x}_i$ are called support vectors. They are the vectors closest to the line (or hyperplane) and define the margin $M$.
+
+
+## The problem to solve
+
+We can rewrite
+
+$$
+{\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\boldsymbol{x}_i^T\boldsymbol{x}_j,
+$$
+
+and its constraints in terms of a matrix-vector problem where we minimize w.r.t. $\lambda$ the following problem
+
+$$
+\frac{1}{2} \boldsymbol{\lambda}^T\begin{bmatrix} y_1y_1\boldsymbol{x}_1^T\boldsymbol{x}_1 & y_1y_2\boldsymbol{x}_1^T\boldsymbol{x}_2 & \dots & \dots & y_1y_n\boldsymbol{x}_1^T\boldsymbol{x}_n \\
+y_2y_1\boldsymbol{x}_2^T\boldsymbol{x}_1 & y_2y_2\boldsymbol{x}_2^T\boldsymbol{x}_2 & \dots & \dots & y_1y_n\boldsymbol{x}_2^T\boldsymbol{x}_n \\
+\dots & \dots & \dots & \dots & \dots \\
+\dots & \dots & \dots & \dots & \dots \\
+y_ny_1\boldsymbol{x}_n^T\boldsymbol{x}_1 & y_ny_2\boldsymbol{x}_n^T\boldsymbol{x}_2 & \dots & \dots & y_ny_n\boldsymbol{x}_n^T\boldsymbol{x}_n \\
+\end{bmatrix}\boldsymbol{\lambda}-\mathbb{1}\boldsymbol{\lambda},
+$$
+
+subject to $\boldsymbol{y}^T\boldsymbol{\lambda}=0$. Here we defined the vectors $\boldsymbol{\lambda} =[\lambda_1,\lambda_2,\dots,\lambda_n]$ and
+$\boldsymbol{y}=[y_1,y_2,\dots,y_n]$.
+
+
+
+## The last steps
+
+Solving the above problem, yields the values of $\lambda_i$.
+To find the coefficients of your hyperplane we need simply to compute
+
+$$
+\boldsymbol{w}=\sum_{i} \lambda_iy_i\boldsymbol{x}_i.
+$$
+
+With our vector $\boldsymbol{w}$ we can in turn find the value of the intercept $b$ (here in two dimensions) via
+
+$$
+y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1,
+$$
+
+resulting in
+
+$$
+b = \frac{1}{y_i}-\boldsymbol{w}^T\boldsymbol{x}_i,
+$$
+
+or if we write it out in terms of the support vectors only, with $N_s$ being their number, we have
+
+$$
+b = \frac{1}{N_s}\sum_{j\in N_s}\left(y_j-\sum_{i=1}^n\lambda_iy_i\boldsymbol{x}_i^T\boldsymbol{x}_j\right).
+$$
+
+With our hyperplane coefficients we can use our classifier to assign any observation by simply using
+
+$$
+y_i = \mathrm{sign}(\boldsymbol{w}^T\boldsymbol{x}_i+b).
+$$
+
+Below we discuss how to find the optimal values of $\lambda_i$. Before we proceed however, we discuss now the so-called soft classifier.
+
+
+## A soft classifier
+
+Till now, the margin is strictly defined by the support vectors. This defines what is called a hard classifier, that is the margins are well defined.
+
+Suppose now that classes overlap in feature space, as shown in the
+figure here. One way to deal with this problem before we define the
+so-called **kernel approach**, is to allow a kind of slack in the sense
+that we allow some points to be on the wrong side of the margin.
+
+We introduce thus the so-called **slack** variables $\boldsymbol{\xi} =[\xi_1,x_2,\dots,x_n]$ and
+modify our previous equation
+
+$$
+y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1,
+$$
+
+to
+
+$$
+y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1-\xi_i,
+$$
+
+with the requirement $\xi_i\geq 0$. The total violation is now $\sum_i\xi$.
+The value $\xi_i$ in the constraint the last constraint corresponds to the amount by which the prediction
+$y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1$ is on the wrong side of its margin. Hence by bounding the sum $\sum_i \xi_i$,
+we bound the total amount by which predictions fall on the wrong side of their margins.
+
+Misclassifications occur when $\xi_i > 1$. Thus bounding the total sum by some value $C$ bounds in turn the total number of
+misclassifications.
+
+
+## Soft optmization problem
+
+
+This has in turn the consequences that we change our optmization problem to finding the minimum of
+
+$$
+{\cal L}=\frac{1}{2}\boldsymbol{w}^T\boldsymbol{w}-\sum_{i=1}^n\lambda_i\left[y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)-(1-\xi_)\right]+C\sum_{i=1}^n\xi_i-\sum_{i=1}^n\gamma_i\xi_i,
+$$
+
+subject to
+
+$$
+y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1-\xi_i \hspace{0.1cm}\forall i,
+$$
+
+with the requirement $\xi_i\geq 0$.
+
+Taking the derivatives with respect to $b$ and $\boldsymbol{w}$ we obtain
+
+$$
+\frac{\partial {\cal L}}{\partial b} = -\sum_{i} \lambda_iy_i=0,
+$$
+
+and
+
+$$
+\frac{\partial {\cal L}}{\partial \boldsymbol{w}} = 0 = \boldsymbol{w}-\sum_{i} \lambda_iy_i\boldsymbol{x}_i,
+$$
+
+and
+
+$$
+\lambda_i = C-\gamma_i \hspace{0.1cm}\forall i.
+$$
+
+Inserting these constraints into the equation for ${\cal L}$ we obtain the same equation as before
+
+$$
+{\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\boldsymbol{x}_i^T\boldsymbol{x}_j,
+$$
+
+but now subject to the constraints $\lambda_i\geq 0$, $\sum_i\lambda_iy_i=0$ and $0\leq\lambda_i \leq C$.
+We must in addition satisfy the Karush-Kuhn-Tucker condition which now reads
+
+5
+0
+
+<
+<
+<
+!
+!
+M
+A
+T
+H
+_
+B
+L
+O
+C
+K
+
+$$
+\gamma_i\xi_i = 0,
+$$
+
+and
+
+$$
+y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) -(1-\xi_) \geq 0 \hspace{0.1cm}\forall i.
+$$
+
+## Kernels and non-linearity
+
+The cases we have studied till now, were all characterized by two classes
+with a close to linear separability. The classifiers we have described
+so far find linear boundaries in our input feature space. It is
+possible to make our procedure more flexible by exploring the feature
+space using other basis expansions such as higher-order polynomials,
+wavelets, splines etc.
+
+If our feature space is not easy to separate, as shown in the figure
+here, we can achieve a better separation by introducing more complex
+basis functions. The ideal would be, as shown in the next figure, to, via a specific transformation to
+obtain a separation between the classes which is almost linear.
+
+The change of basis, from $x\rightarrow z=\phi(x)$ leads to the same type of equations to be solved, except that
+we need to introduce for example a polynomial transformation to a two-dimensional training set.
+
+import numpy as np
+import os
+
+np.random.seed(42)
+
+# To plot pretty figures
+import matplotlib
+import matplotlib.pyplot as plt
+plt.rcParams['axes.labelsize'] = 14
+plt.rcParams['xtick.labelsize'] = 12
+plt.rcParams['ytick.labelsize'] = 12
+
+
+from sklearn.svm import SVC
+from sklearn import datasets
+
+
+
+X1D = np.linspace(-4, 4, 9).reshape(-1, 1)
+X2D = np.c_[X1D, X1D**2]
+y = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])
+
+plt.figure(figsize=(11, 4))
+
+plt.subplot(121)
+plt.grid(True, which='both')
+plt.axhline(y=0, color='k')
+plt.plot(X1D[:, 0][y==0], np.zeros(4), "bs")
+plt.plot(X1D[:, 0][y==1], np.zeros(5), "g^")
+plt.gca().get_yaxis().set_ticks([])
+plt.xlabel(r"$x_1$", fontsize=20)
+plt.axis([-4.5, 4.5, -0.2, 0.2])
+
+plt.subplot(122)
+plt.grid(True, which='both')
+plt.axhline(y=0, color='k')
+plt.axvline(x=0, color='k')
+plt.plot(X2D[:, 0][y==0], X2D[:, 1][y==0], "bs")
+plt.plot(X2D[:, 0][y==1], X2D[:, 1][y==1], "g^")
+plt.xlabel(r"$x_1$", fontsize=20)
+plt.ylabel(r"$x_2$", fontsize=20, rotation=0)
+plt.gca().get_yaxis().set_ticks([0, 4, 8, 12, 16])
+plt.plot([-4.5, 4.5], [6.5, 6.5], "r--", linewidth=3)
+plt.axis([-4.5, 4.5, -1, 17])
+plt.subplots_adjust(right=1)
+plt.show()
+
+## The equations
+
+Suppose we define a polynomial transformation of degree two only (we continue to live in a plane with $x_i$ and $y_i$ as variables)
+
+$$
+z = \phi(x_i) =\left(x_i^2, y_i^2, \sqrt{2}x_iy_i\right).
+$$
+
+With our new basis, the equations we solved earlier are basically the same, that is we have now (without the slack option for simplicity)
+
+$$
+{\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\boldsymbol{z}_i^T\boldsymbol{z}_j,
+$$
+
+subject to the constraints $\lambda_i\geq 0$, $\sum_i\lambda_iy_i=0$, and for the support vectors
+
+$$
+y_i(\boldsymbol{w}^T\boldsymbol{z}_i+b)= 1 \hspace{0.1cm}\forall i,
+$$
+
+from which we also find $b$.
+To compute $\boldsymbol{z}_i^T\boldsymbol{z}_j$ we define the kernel $K(\boldsymbol{x}_i,\boldsymbol{x}_j)$ as
+
+$$
+K(\boldsymbol{x}_i,\boldsymbol{x}_j)=\boldsymbol{z}_i^T\boldsymbol{z}_j= \phi(\boldsymbol{x}_i)^T\phi(\boldsymbol{x}_j).
+$$
+
+For the above example, the kernel reads
+
+$$
+K(\boldsymbol{x}_i,\boldsymbol{x}_j)=[x_i^2, y_i^2, \sqrt{2}x_iy_i]^T\begin{bmatrix} x_j^2 \\ y_j^2 \\ \sqrt{2}x_jy_j \end{bmatrix}=x_i^2x_j^2+2x_ix_jy_iy_j+y_i^2y_j^2.
+$$
+
+We note that this is nothing but the dot product of the two original
+vectors $(\boldsymbol{x}_i^T\boldsymbol{x}_j)^2$. Instead of thus computing the
+product in the Lagrangian of $\boldsymbol{z}_i^T\boldsymbol{z}_j$ we simply compute
+the dot product $(\boldsymbol{x}_i^T\boldsymbol{x}_j)^2$.
+
+
+This leads to the so-called
+kernel trick and the result leads to the same as if we went through
+the trouble of performing the transformation
+$\phi(\boldsymbol{x}_i)^T\phi(\boldsymbol{x}_j)$ during the SVM calculations.
+
+
+
+## The problem to solve
+Using our definition of the kernel We can rewrite again the Lagrangian
+
+$$
+{\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\boldsymbol{x}_i^T\boldsymbol{z}_j,
+$$
+
+subject to the constraints $\lambda_i\geq 0$, $\sum_i\lambda_iy_i=0$ in terms of a convex optimization problem
+
+$$
+\frac{1}{2} \boldsymbol{\lambda}^T\begin{bmatrix} y_1y_1K(\boldsymbol{x}_1,\boldsymbol{x}_1) & y_1y_2K(\boldsymbol{x}_1,\boldsymbol{x}_2) & \dots & \dots & y_1y_nK(\boldsymbol{x}_1,\boldsymbol{x}_n) \\
+y_2y_1K(\boldsymbol{x}_2,\boldsymbol{x}_1) & y_2y_2(\boldsymbol{x}_2,\boldsymbol{x}_2) & \dots & \dots & y_1y_nK(\boldsymbol{x}_2,\boldsymbol{x}_n) \\
+\dots & \dots & \dots & \dots & \dots \\
+\dots & \dots & \dots & \dots & \dots \\
+y_ny_1K(\boldsymbol{x}_n,\boldsymbol{x}_1) & y_ny_2K(\boldsymbol{x}_n\boldsymbol{x}_2) & \dots & \dots & y_ny_nK(\boldsymbol{x}_n,\boldsymbol{x}_n) \\
+\end{bmatrix}\boldsymbol{\lambda}-\mathbb{1}\boldsymbol{\lambda},
+$$
+
+subject to $\boldsymbol{y}^T\boldsymbol{\lambda}=0$. Here we defined the vectors $\boldsymbol{\lambda} =[\lambda_1,\lambda_2,\dots,\lambda_n]$ and
+$\boldsymbol{y}=[y_1,y_2,\dots,y_n]$.
+If we add the slack constants this leads to the additional constraint $0\leq \lambda_i \leq C$.
+
+We can rewrite this (see the solutions below) in terms of a convex optimization problem of the type
+
+$$
+\begin{align*}
+ &\mathrm{min}_{\lambda}\hspace{0.2cm} \frac{1}{2}\boldsymbol{\lambda}^T\boldsymbol{P}\boldsymbol{\lambda}+\boldsymbol{q}^T\boldsymbol{\lambda},\\ \nonumber
+ &\mathrm{subject\hspace{0.1cm}to} \hspace{0.2cm} \boldsymbol{G}\boldsymbol{\lambda} \preceq \boldsymbol{h} \hspace{0.2cm} \wedge \boldsymbol{A}\boldsymbol{\lambda}=f.
+\end{align*}
+$$
+
+Below we discuss how to solve these equations. Here we note that the matrix $\boldsymbol{P}$ has matrix elements $p_{ij}=y_iy_jK(\boldsymbol{x}_i,\boldsymbol{x}_j)$.
+Given a kernel $K$ and the targets $y_i$ this matrix is easy to set up. The constraint $\boldsymbol{y}^T\boldsymbol{\lambda}=0$ leads to $f=0$ and $\boldsymbol{A}=\boldsymbol{y}$. How to set up the matrix $\boldsymbol{G}$ is discussed later. Here note that the inequalities $0\leq \lambda_i \leq C$ can be split up into
+$0\leq \lambda_i$ and $\lambda_i \leq C$. These two inequalities define then the matrix $\boldsymbol{G}$ and the vector $\boldsymbol{h}$.
+
+
+
+## Different kernels and Mercer's theorem
+
+There are several popular kernels being used. These are
+1. Linear: $K(\boldsymbol{x},\boldsymbol{y})=\boldsymbol{x}^T\boldsymbol{y}$,
+
+2. Polynomial: $K(\boldsymbol{x},\boldsymbol{y})=(\boldsymbol{x}^T\boldsymbol{y}+\gamma)^d$,
+
+3. Gaussian Radial Basis Function: $K(\boldsymbol{x},\boldsymbol{y})=\exp{\left(-\gamma\vert\vert\boldsymbol{x}-\boldsymbol{y}\vert\vert^2\right)}$,
+
+4. Tanh: $K(\boldsymbol{x},\boldsymbol{y})=\tanh{(\boldsymbol{x}^T\boldsymbol{y}+\gamma)}$,
+
+and many other ones.
+
+An important theorem for us is [Mercer's
+theorem](https://en.wikipedia.org/wiki/Mercer%27s_theorem). The
+theorem states that if a kernel function $K$ is symmetric, continuous
+and leads to a positive semi-definite matrix $\boldsymbol{P}$ then there
+exists a function $\phi$ that maps $\boldsymbol{x}_i$ and $\boldsymbol{x}_j$ into
+another space (possibly with much higher dimensions) such that
+
+$$
+K(\boldsymbol{x}_i,\boldsymbol{x}_j)=\phi(\boldsymbol{x}_i)^T\phi(\boldsymbol{x}_j).
+$$
+
+So you can use $K$ as a kernel since you know $\phi$ exists, even if
+you don’t know what $\phi$ is.
+
+Note that some frequently used kernels (such as the Sigmoid kernel)
+don’t respect all of Mercer’s conditions, yet they generally work well
+in practice.
+
+
+
+## The moons example
+
+from __future__ import division, print_function, unicode_literals
+
+import numpy as np
+np.random.seed(42)
+
+import matplotlib
+import matplotlib.pyplot as plt
+plt.rcParams['axes.labelsize'] = 14
+plt.rcParams['xtick.labelsize'] = 12
+plt.rcParams['ytick.labelsize'] = 12
+
+
+from sklearn.svm import SVC
+from sklearn import datasets
+
+
+
+from sklearn.pipeline import Pipeline
+from sklearn.preprocessing import StandardScaler
+from sklearn.svm import LinearSVC
+
+
+from sklearn.datasets import make_moons
+X, y = make_moons(n_samples=100, noise=0.15, random_state=42)
+
+def plot_dataset(X, y, axes):
+ plt.plot(X[:, 0][y==0], X[:, 1][y==0], "bs")
+ plt.plot(X[:, 0][y==1], X[:, 1][y==1], "g^")
+ plt.axis(axes)
+ plt.grid(True, which='both')
+ plt.xlabel(r"$x_1$", fontsize=20)
+ plt.ylabel(r"$x_2$", fontsize=20, rotation=0)
+
+plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
+plt.show()
+
+from sklearn.datasets import make_moons
+from sklearn.pipeline import Pipeline
+from sklearn.preprocessing import PolynomialFeatures
+
+polynomial_svm_clf = Pipeline([
+ ("poly_features", PolynomialFeatures(degree=3)),
+ ("scaler", StandardScaler()),
+ ("svm_clf", LinearSVC(C=10, loss="hinge", random_state=42))
+ ])
+
+polynomial_svm_clf.fit(X, y)
+
+def plot_predictions(clf, axes):
+ x0s = np.linspace(axes[0], axes[1], 100)
+ x1s = np.linspace(axes[2], axes[3], 100)
+ x0, x1 = np.meshgrid(x0s, x1s)
+ X = np.c_[x0.ravel(), x1.ravel()]
+ y_pred = clf.predict(X).reshape(x0.shape)
+ y_decision = clf.decision_function(X).reshape(x0.shape)
+ plt.contourf(x0, x1, y_pred, cmap=plt.cm.brg, alpha=0.2)
+ plt.contourf(x0, x1, y_decision, cmap=plt.cm.brg, alpha=0.1)
+
+plot_predictions(polynomial_svm_clf, [-1.5, 2.5, -1, 1.5])
+plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
+
+plt.show()
+
+
+from sklearn.svm import SVC
+
+poly_kernel_svm_clf = Pipeline([
+ ("scaler", StandardScaler()),
+ ("svm_clf", SVC(kernel="poly", degree=3, coef0=1, C=5))
+ ])
+poly_kernel_svm_clf.fit(X, y)
+
+poly100_kernel_svm_clf = Pipeline([
+ ("scaler", StandardScaler()),
+ ("svm_clf", SVC(kernel="poly", degree=10, coef0=100, C=5))
+ ])
+poly100_kernel_svm_clf.fit(X, y)
+
+plt.figure(figsize=(11, 4))
+
+plt.subplot(121)
+plot_predictions(poly_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])
+plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
+plt.title(r"$d=3, r=1, C=5$", fontsize=18)
+
+plt.subplot(122)
+plot_predictions(poly100_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])
+plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
+plt.title(r"$d=10, r=100, C=5$", fontsize=18)
+
+plt.show()
+
+def gaussian_rbf(x, landmark, gamma):
+ return np.exp(-gamma * np.linalg.norm(x - landmark, axis=1)**2)
+
+gamma = 0.3
+
+x1s = np.linspace(-4.5, 4.5, 200).reshape(-1, 1)
+x2s = gaussian_rbf(x1s, -2, gamma)
+x3s = gaussian_rbf(x1s, 1, gamma)
+
+XK = np.c_[gaussian_rbf(X1D, -2, gamma), gaussian_rbf(X1D, 1, gamma)]
+yk = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])
+
+plt.figure(figsize=(11, 4))
+
+plt.subplot(121)
+plt.grid(True, which='both')
+plt.axhline(y=0, color='k')
+plt.scatter(x=[-2, 1], y=[0, 0], s=150, alpha=0.5, c="red")
+plt.plot(X1D[:, 0][yk==0], np.zeros(4), "bs")
+plt.plot(X1D[:, 0][yk==1], np.zeros(5), "g^")
+plt.plot(x1s, x2s, "g--")
+plt.plot(x1s, x3s, "b:")
+plt.gca().get_yaxis().set_ticks([0, 0.25, 0.5, 0.75, 1])
+plt.xlabel(r"$x_1$", fontsize=20)
+plt.ylabel(r"Similarity", fontsize=14)
+plt.annotate(r'$\mathbf{x}$',
+ xy=(X1D[3, 0], 0),
+ xytext=(-0.5, 0.20),
+ ha="center",
+ arrowprops=dict(facecolor='black', shrink=0.1),
+ fontsize=18,
+ )
+plt.text(-2, 0.9, "$x_2$", ha="center", fontsize=20)
+plt.text(1, 0.9, "$x_3$", ha="center", fontsize=20)
+plt.axis([-4.5, 4.5, -0.1, 1.1])
+
+plt.subplot(122)
+plt.grid(True, which='both')
+plt.axhline(y=0, color='k')
+plt.axvline(x=0, color='k')
+plt.plot(XK[:, 0][yk==0], XK[:, 1][yk==0], "bs")
+plt.plot(XK[:, 0][yk==1], XK[:, 1][yk==1], "g^")
+plt.xlabel(r"$x_2$", fontsize=20)
+plt.ylabel(r"$x_3$ ", fontsize=20, rotation=0)
+plt.annotate(r'$\phi\left(\mathbf{x}\right)$',
+ xy=(XK[3, 0], XK[3, 1]),
+ xytext=(0.65, 0.50),
+ ha="center",
+ arrowprops=dict(facecolor='black', shrink=0.1),
+ fontsize=18,
+ )
+plt.plot([-0.1, 1.1], [0.57, -0.1], "r--", linewidth=3)
+plt.axis([-0.1, 1.1, -0.1, 1.1])
+
+plt.subplots_adjust(right=1)
+
+plt.show()
+
+
+x1_example = X1D[3, 0]
+for landmark in (-2, 1):
+ k = gaussian_rbf(np.array([[x1_example]]), np.array([[landmark]]), gamma)
+ print("Phi({}, {}) = {}".format(x1_example, landmark, k))
+
+rbf_kernel_svm_clf = Pipeline([
+ ("scaler", StandardScaler()),
+ ("svm_clf", SVC(kernel="rbf", gamma=5, C=0.001))
+ ])
+rbf_kernel_svm_clf.fit(X, y)
+
+
+from sklearn.svm import SVC
+
+gamma1, gamma2 = 0.1, 5
+C1, C2 = 0.001, 1000
+hyperparams = (gamma1, C1), (gamma1, C2), (gamma2, C1), (gamma2, C2)
+
+svm_clfs = []
+for gamma, C in hyperparams:
+ rbf_kernel_svm_clf = Pipeline([
+ ("scaler", StandardScaler()),
+ ("svm_clf", SVC(kernel="rbf", gamma=gamma, C=C))
+ ])
+ rbf_kernel_svm_clf.fit(X, y)
+ svm_clfs.append(rbf_kernel_svm_clf)
+
+plt.figure(figsize=(11, 7))
+
+for i, svm_clf in enumerate(svm_clfs):
+ plt.subplot(221 + i)
+ plot_predictions(svm_clf, [-1.5, 2.5, -1, 1.5])
+ plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
+ gamma, C = hyperparams[i]
+ plt.title(r"$\gamma = {}, C = {}$".format(gamma, C), fontsize=16)
+
+plt.show()
+
+## Mathematical optimization of convex functions
+
+A mathematical (quadratic) optimization problem, or just optimization problem, has the form
+
+$$
+\begin{align*}
+ &\mathrm{min}_{\lambda}\hspace{0.2cm} \frac{1}{2}\boldsymbol{\lambda}^T\boldsymbol{P}\boldsymbol{\lambda}+\boldsymbol{q}^T\boldsymbol{\lambda},\\ \nonumber
+ &\mathrm{subject\hspace{0.1cm}to} \hspace{0.2cm} \boldsymbol{G}\boldsymbol{\lambda} \preceq \boldsymbol{h} \wedge \boldsymbol{A}\boldsymbol{\lambda}=f.
+\end{align*}
+$$
+
+subject to some constraints for say a selected set $i=1,2,\dots, n$.
+In our case we are optimizing with respect to the Lagrangian multipliers $\lambda_i$, and the
+vector $\boldsymbol{\lambda}=[\lambda_1, \lambda_2,\dots, \lambda_n]$ is the optimization variable we are dealing with.
+
+In our case we are particularly interested in a class of optimization problems called convex optmization problems.
+In our discussion on gradient descent methods we discussed at length the definition of a convex function.
+
+Convex optimization problems play a central role in applied mathematics and we recommend strongly [Boyd and Vandenberghe's text on the topics](http://web.stanford.edu/~boyd/cvxbook/).
+
+
+
+
+## How do we solve these problems?
+
+If we use Python as programming language and wish to venture beyond
+**scikit-learn**, **tensorflow** and similar software which makes our
+lives so much easier, we need to dive into the wonderful world of
+quadratic programming. We can, if we wish, solve the minimization
+problem using say standard gradient methods or conjugate gradient
+methods. However, these methods tend to exhibit a rather slow
+converge. So, welcome to the promised land of quadratic programming.
+
+The functions we need are contained in the quadratic programming package **CVXOPT** and we need to import it together with **numpy** as
+
+import numpy
+import cvxopt
+
+This will make our life much easier. You don't need t write your own optimizer.
+
+
+
+## A simple example
+
+We remind ourselves about the general problem we want to solve
+
+$$
+\begin{align*}
+ &\mathrm{min}_{x}\hspace{0.2cm} \frac{1}{2}\boldsymbol{x}^T\boldsymbol{P}\boldsymbol{x}+\boldsymbol{q}^T\boldsymbol{x},\\ \nonumber
+ &\mathrm{subject\hspace{0.1cm} to} \hspace{0.2cm} \boldsymbol{G}\boldsymbol{x} \preceq \boldsymbol{h} \wedge \boldsymbol{A}\boldsymbol{x}=f.
+\end{align*}
+$$
+
+Let us show how to perform the optmization using a simple case. Assume we want to optimize the following problem
+
+$$
+\begin{align*}
+ &\mathrm{min}_{x}\hspace{0.2cm} \frac{1}{2}x^2+5x+3y \\ \nonumber
+ &\mathrm{subject to} \\ \nonumber
+ &x, y \geq 0 \\ \nonumber
+ &x+3y \geq 15 \\ \nonumber
+ &2x+5y \leq 100 \\ \nonumber
+ &3x+4y \leq 80. \\ \nonumber
+\end{align*}
+$$
+
+The minimization problem can be rewritten in terms of vectors and matrices as (with $x$ and $y$ being the unknowns)
+
+$$
+\frac{1}{2}\begin{bmatrix} x\\ y \end{bmatrix}^T \begin{bmatrix} 1 & 0\\ 0 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} + \begin{bmatrix}3\\ 4 \end{bmatrix}^T \begin{bmatrix}x \\ y \end{bmatrix}.
+$$
+
+Similarly, we can now set up the inequalities (we need to change $\geq$ to $\leq$ by multiplying with $-1$ on bot sides) as the following matrix-vector equation
+
+$$
+\begin{bmatrix} -1 & 0 \\ 0 & -1 \\ -1 & -3 \\ 2 & 5 \\ 3 & 4\end{bmatrix}\begin{bmatrix} x \\ y\end{bmatrix} \preceq \begin{bmatrix}0 \\ 0\\ -15 \\ 100 \\ 80\end{bmatrix}.
+$$
+
+We have collapsed all the inequalities into a single matrix $\boldsymbol{G}$. We see also that our matrix
+
+$$
+\boldsymbol{P} =\begin{bmatrix} 1 & 0\\ 0 & 0 \end{bmatrix}
+$$
+
+is clearly positive semi-definite (all eigenvalues larger or equal zero).
+Finally, the vector $\boldsymbol{h}$ is defined as
+
+$$
+\boldsymbol{h} = \begin{bmatrix}0 \\ 0\\ -15 \\ 100 \\ 80\end{bmatrix}.
+$$
+
+Since we don't have any equalities the matrix $\boldsymbol{A}$ is set to zero
+The following code solves the equations for us
+
+# Import the necessary packages
+import numpy
+from cvxopt import matrix
+from cvxopt import solvers
+P = matrix(numpy.diag([1,0]), tc=’d’)
+q = matrix(numpy.array([3,4]), tc=’d’)
+G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc=’d’)
+h = matrix(numpy.array([0,0,-15,100,80]), tc=’d’)
+# Construct the QP, invoke solver
+sol = solvers.qp(P,q,G,h)
+# Extract optimal value and solution
+sol[’x’]
+sol[’primal objective’]
+
+## Back to the more realistic cases
+
+We are now ready to return to our setup of the optmization problem for a more realistic case. Introducing the **slack** parameter $C$ we have
+
+$$
+\frac{1}{2} \boldsymbol{\lambda}^T\begin{bmatrix} y_1y_1K(\boldsymbol{x}_1,\boldsymbol{x}_1) & y_1y_2K(\boldsymbol{x}_1,\boldsymbol{x}_2) & \dots & \dots & y_1y_nK(\boldsymbol{x}_1,\boldsymbol{x}_n) \\
+y_2y_1K(\boldsymbol{x}_2,\boldsymbol{x}_1) & y_2y_2K(\boldsymbol{x}_2,\boldsymbol{x}_2) & \dots & \dots & y_1y_nK(\boldsymbol{x}_2,\boldsymbol{x}_n) \\
+\dots & \dots & \dots & \dots & \dots \\
+\dots & \dots & \dots & \dots & \dots \\
+y_ny_1K(\boldsymbol{x}_n,\boldsymbol{x}_1) & y_ny_2K(\boldsymbol{x}_n\boldsymbol{x}_2) & \dots & \dots & y_ny_nK(\boldsymbol{x}_n,\boldsymbol{x}_n) \\
+\end{bmatrix}\boldsymbol{\lambda}-\mathbb{I}\boldsymbol{\lambda},
+$$
+
+subject to $\boldsymbol{y}^T\boldsymbol{\lambda}=0$. Here we defined the vectors $\boldsymbol{\lambda} =[\lambda_1,\lambda_2,\dots,\lambda_n]$ and
+$\boldsymbol{y}=[y_1,y_2,\dots,y_n]$.
+With the slack constants this leads to the additional constraint $0\leq \lambda_i \leq C$.
+
+**code will be added**
\ No newline at end of file
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter7_109_0.png b/doc/src/LectureNotes/_build/jupyter_execute/chapter7_109_0.png
new file mode 100644
index 000000000..7188f63c7
Binary files /dev/null and b/doc/src/LectureNotes/_build/jupyter_execute/chapter7_109_0.png differ
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_0.png b/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_0.png
new file mode 100644
index 000000000..659dee595
Binary files /dev/null and b/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_0.png differ
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_2.png b/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_2.png
new file mode 100644
index 000000000..370e23072
Binary files /dev/null and b/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_2.png differ
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_3.png b/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_3.png
new file mode 100644
index 000000000..268924dea
Binary files /dev/null and b/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_3.png differ
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_4.png b/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_4.png
new file mode 100644
index 000000000..88bb051f7
Binary files /dev/null and b/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_4.png differ
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_6.png b/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_6.png
new file mode 100644
index 000000000..34cab365c
Binary files /dev/null and b/doc/src/LectureNotes/_build/jupyter_execute/chapter7_129_6.png differ
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter7_1_1.png b/doc/src/LectureNotes/_build/jupyter_execute/chapter7_1_1.png
new file mode 100644
index 000000000..42481a07e
Binary files /dev/null and b/doc/src/LectureNotes/_build/jupyter_execute/chapter7_1_1.png differ
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter8.ipynb b/doc/src/LectureNotes/_build/jupyter_execute/chapter8.ipynb
new file mode 100644
index 000000000..3df8759dd
--- /dev/null
+++ b/doc/src/LectureNotes/_build/jupyter_execute/chapter8.ipynb
@@ -0,0 +1,2404 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Dimensionality Reduction\n",
+ "\n",
+ "\n",
+ "## Reducing the number of degrees of freedom, overarching view\n",
+ "\n",
+ "Many Machine Learning problems involve thousands or even millions of\n",
+ "features for each training instance. Not only does this make training\n",
+ "extremely slow, it can also make it much harder to find a good\n",
+ "solution, as we will see. This problem is often referred to as the\n",
+ "curse of dimensionality. Fortunately, in real-world problems, it is\n",
+ "often possible to reduce the number of features considerably, turning\n",
+ "an intractable problem into a tractable one.\n",
+ "\n",
+ "Here we will discuss some of the most popular dimensionality reduction\n",
+ "techniques: the principal component analysis (PCA), Kernel PCA, and\n",
+ "Locally Linear Embedding (LLE). Furthermore, we will start by looking\n",
+ "at some simple preprocessing of the data which allow us to rescale the\n",
+ "data.\n",
+ "\n",
+ "Principal component analysis and its various variants deal with the\n",
+ "problem of fitting a low-dimensional [affine\n",
+ "subspace](https://en.wikipedia.org/wiki/Affine_space) to a set of of\n",
+ "data points in a high-dimensional space. With its family of methods it\n",
+ "is one of the most used tools in data modeling, compression and\n",
+ "visualization.\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Preprocessing our data\n",
+ "\n",
+ "Before we proceed however, we will discuss how to preprocess our\n",
+ "data. Till now and in connection with our previous examples we have\n",
+ "not met so many cases where we are too sensitive to the scaling of our\n",
+ "data. Normally the data may need a rescaling and/or may be sensitive\n",
+ "to extreme values. Scaling the data renders our inputs much more\n",
+ "suitable for the algorithms we want to employ.\n",
+ "\n",
+ "**Scikit-Learn** has several functions which allow us to rescale the\n",
+ "data, normally resulting in much better results in terms of various\n",
+ "accuracy scores. The **StandardScaler** function in **Scikit-Learn**\n",
+ "ensures that for each feature/predictor we study the mean value is\n",
+ "zero and the variance is one (every column in the design/feature\n",
+ "matrix). This scaling has the drawback that it does not ensure that\n",
+ "we have a particular maximum or minimum in our data set. Another\n",
+ "function included in **Scikit-Learn** is the **MinMaxScaler** which\n",
+ "ensures that all features are exactly between $0$ and $1$. The\n",
+ "\n",
+ "\n",
+ "## More preprocessing\n",
+ "\n",
+ "\n",
+ "The **Normalizer** scales each data\n",
+ "point such that the feature vector has a euclidean length of one. In other words, it\n",
+ "projects a data point on the circle (or sphere in the case of higher dimensions) with a\n",
+ "radius of 1. This means every data point is scaled by a different number (by the\n",
+ "inverse of it’s length).\n",
+ "This normalization is often used when only the direction (or angle) of the data matters,\n",
+ "not the length of the feature vector.\n",
+ "\n",
+ "The **RobustScaler** works similarly to the StandardScaler in that it\n",
+ "ensures statistical properties for each feature that guarantee that\n",
+ "they are on the same scale. However, the RobustScaler uses the median\n",
+ "and quartiles, instead of mean and variance. This makes the\n",
+ "RobustScaler ignore data points that are very different from the rest\n",
+ "(like measurement errors). These odd data points are also called\n",
+ "outliers, and might often lead to trouble for other scaling\n",
+ "techniques.\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Simple preprocessing examples, Franke function and regression"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "MSE before scaling: 0.01\n",
+ "R2 score before scaling 0.93\n",
+ "Feature min values before scaling:\n",
+ " [1.00000000e+00 7.43297505e-04 1.67887686e-04 5.52491181e-07\n",
+ " 1.24790498e-07 2.81862750e-08 4.10665316e-10 9.27564656e-11\n",
+ " 2.09507879e-11 4.73212847e-12 3.05246505e-13 6.89456494e-14\n",
+ " 1.55726683e-14 3.51737928e-15 7.94466097e-16 2.26888965e-16\n",
+ " 5.12471292e-17 1.15751255e-17 2.61445925e-18 5.90524667e-19\n",
+ " 1.33381074e-19]\n",
+ "Feature max values before scaling:\n",
+ " [1. 0.99422559 0.99481826 0.98848453 0.98907377 0.98966337\n",
+ " 0.98277662 0.98336246 0.98394865 0.98453519 0.97710167 0.97768412\n",
+ " 0.97826693 0.97885008 0.97943358 0.97145948 0.97203858 0.97261802\n",
+ " 0.9731978 0.97377793 0.97435841]\n",
+ "Feature min values after scaling:\n",
+ " [ 0. -1.7697784 -1.72415276 -1.14649434 -1.12953807 -1.11320874\n",
+ " -0.90535485 -0.8968819 -0.88864254 -0.88062733 -0.77069333 -0.76574003\n",
+ " -0.76089806 -0.7561637 -0.75153337 -0.68210821 -0.6789547 -0.67586334\n",
+ " -0.67283231 -0.66985986 -0.66694428]\n",
+ "Feature max values after scaling:\n",
+ " [0. 1.68453745 1.71039356 2.1618639 2.17707405 2.19168422\n",
+ " 2.54536814 2.55730765 2.56887875 2.58009023 2.87398064 2.88442648\n",
+ " 2.89461285 2.90454384 2.91422324 3.16472629 3.17449812 3.18407693\n",
+ " 3.19346461 3.20266288 3.21167335]\n",
+ "MSE after scaling: 0.00\n",
+ "R2 score for scaled data: 0.97\n"
+ ]
+ }
+ ],
+ "source": [
+ "%matplotlib inline\n",
+ "\n",
+ "# Common imports\n",
+ "import os\n",
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "import matplotlib.pyplot as plt\n",
+ "import sklearn.linear_model as skl\n",
+ "from sklearn.metrics import mean_squared_error\n",
+ "from sklearn.model_selection import train_test_split\n",
+ "from sklearn.preprocessing import MinMaxScaler, StandardScaler, Normalizer\n",
+ "from sklearn.svm import SVR\n",
+ "\n",
+ "# Where to save the figures and data files\n",
+ "PROJECT_ROOT_DIR = \"Results\"\n",
+ "FIGURE_ID = \"Results/FigureFiles\"\n",
+ "DATA_ID = \"DataFiles/\"\n",
+ "\n",
+ "if not os.path.exists(PROJECT_ROOT_DIR):\n",
+ " os.mkdir(PROJECT_ROOT_DIR)\n",
+ "\n",
+ "if not os.path.exists(FIGURE_ID):\n",
+ " os.makedirs(FIGURE_ID)\n",
+ "\n",
+ "if not os.path.exists(DATA_ID):\n",
+ " os.makedirs(DATA_ID)\n",
+ "\n",
+ "def image_path(fig_id):\n",
+ " return os.path.join(FIGURE_ID, fig_id)\n",
+ "\n",
+ "def data_path(dat_id):\n",
+ " return os.path.join(DATA_ID, dat_id)\n",
+ "\n",
+ "def save_fig(fig_id):\n",
+ " plt.savefig(image_path(fig_id) + \".png\", format='png')\n",
+ "\n",
+ "\n",
+ "def FrankeFunction(x,y):\n",
+ "\tterm1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))\n",
+ "\tterm2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))\n",
+ "\tterm3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))\n",
+ "\tterm4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)\n",
+ "\treturn term1 + term2 + term3 + term4\n",
+ "\n",
+ "\n",
+ "def create_X(x, y, n ):\n",
+ "\tif len(x.shape) > 1:\n",
+ "\t\tx = np.ravel(x)\n",
+ "\t\ty = np.ravel(y)\n",
+ "\n",
+ "\tN = len(x)\n",
+ "\tl = int((n+1)*(n+2)/2)\t\t# Number of elements in beta\n",
+ "\tX = np.ones((N,l))\n",
+ "\n",
+ "\tfor i in range(1,n+1):\n",
+ "\t\tq = int((i)*(i+1)/2)\n",
+ "\t\tfor k in range(i+1):\n",
+ "\t\t\tX[:,q+k] = (x**(i-k))*(y**k)\n",
+ "\n",
+ "\treturn X\n",
+ "\n",
+ "\n",
+ "# Making meshgrid of datapoints and compute Franke's function\n",
+ "n = 5\n",
+ "N = 1000\n",
+ "x = np.sort(np.random.uniform(0, 1, N))\n",
+ "y = np.sort(np.random.uniform(0, 1, N))\n",
+ "z = FrankeFunction(x, y)\n",
+ "X = create_X(x, y, n=n) \n",
+ "# split in training and test data\n",
+ "X_train, X_test, y_train, y_test = train_test_split(X,z,test_size=0.2)\n",
+ "\n",
+ "\n",
+ "svm = SVR(gamma='auto',C=10.0)\n",
+ "svm.fit(X_train, y_train)\n",
+ "\n",
+ "# The mean squared error and R2 score\n",
+ "print(\"MSE before scaling: {:.2f}\".format(mean_squared_error(svm.predict(X_test), y_test)))\n",
+ "print(\"R2 score before scaling {:.2f}\".format(svm.score(X_test,y_test)))\n",
+ "\n",
+ "scaler = StandardScaler()\n",
+ "scaler.fit(X_train)\n",
+ "X_train_scaled = scaler.transform(X_train)\n",
+ "X_test_scaled = scaler.transform(X_test)\n",
+ "\n",
+ "print(\"Feature min values before scaling:\\n {}\".format(X_train.min(axis=0)))\n",
+ "print(\"Feature max values before scaling:\\n {}\".format(X_train.max(axis=0)))\n",
+ "\n",
+ "print(\"Feature min values after scaling:\\n {}\".format(X_train_scaled.min(axis=0)))\n",
+ "print(\"Feature max values after scaling:\\n {}\".format(X_train_scaled.max(axis=0)))\n",
+ "\n",
+ "svm = SVR(gamma='auto',C=10.0)\n",
+ "svm.fit(X_train_scaled, y_train)\n",
+ "\n",
+ "print(\"MSE after scaling: {:.2f}\".format(mean_squared_error(svm.predict(X_test_scaled), y_test)))\n",
+ "print(\"R2 score for scaled data: {:.2f}\".format(svm.score(X_test_scaled,y_test)))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Simple preprocessing examples, breast cancer data and classification, Support Vector Machines\n",
+ "\n",
+ "We show here how we can use a simple regression case on the breast\n",
+ "cancer data using support vector machines (SVM) as algorithm for\n",
+ "classification."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(426, 30)\n",
+ "(143, 30)\n",
+ "Test set accuracy: 0.94\n",
+ "Feature min values before scaling:\n",
+ " [6.981e+00 9.710e+00 4.379e+01 1.435e+02 5.263e-02 1.938e-02 0.000e+00\n",
+ " 0.000e+00 1.060e-01 4.996e-02 1.115e-01 3.628e-01 7.570e-01 7.228e+00\n",
+ " 1.713e-03 2.252e-03 0.000e+00 0.000e+00 7.882e-03 8.948e-04 7.930e+00\n",
+ " 1.202e+01 5.041e+01 1.852e+02 7.117e-02 2.729e-02 0.000e+00 0.000e+00\n",
+ " 1.565e-01 5.504e-02]\n",
+ "Feature max values before scaling:\n",
+ " [2.811e+01 3.381e+01 1.885e+02 2.501e+03 1.447e-01 3.114e-01 4.268e-01\n",
+ " 2.012e-01 3.040e-01 9.744e-02 2.873e+00 4.885e+00 2.198e+01 5.422e+02\n",
+ " 2.333e-02 1.064e-01 3.960e-01 5.279e-02 6.146e-02 2.984e-02 3.604e+01\n",
+ " 4.954e+01 2.512e+02 4.254e+03 2.226e-01 1.058e+00 1.252e+00 2.903e-01\n",
+ " 6.638e-01 2.075e-01]\n",
+ "Feature min values before scaling:\n",
+ " [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
+ " 0. 0. 0. 0. 0. 0.]"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "Feature max values before scaling:\n",
+ " [1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.\n",
+ " 1. 1. 1. 1. 1. 1.]\n",
+ "Test set accuracy scaled data with Min-Max scaling: 0.97\n",
+ "Test set accuracy scaled data with Standar Scaler: 0.96\n"
+ ]
+ }
+ ],
+ "source": [
+ "import matplotlib.pyplot as plt\n",
+ "import numpy as np\n",
+ "from sklearn.model_selection import train_test_split \n",
+ "from sklearn.datasets import load_breast_cancer\n",
+ "from sklearn.svm import SVC\n",
+ "cancer = load_breast_cancer()\n",
+ "\n",
+ "X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)\n",
+ "print(X_train.shape)\n",
+ "print(X_test.shape)\n",
+ "\n",
+ "svm = SVC(C=100)\n",
+ "svm.fit(X_train, y_train)\n",
+ "print(\"Test set accuracy: {:.2f}\".format(svm.score(X_test,y_test)))\n",
+ "\n",
+ "from sklearn.preprocessing import MinMaxScaler, StandardScaler\n",
+ "scaler = MinMaxScaler()\n",
+ "scaler.fit(X_train)\n",
+ "X_train_scaled = scaler.transform(X_train)\n",
+ "X_test_scaled = scaler.transform(X_test)\n",
+ "\n",
+ "print(\"Feature min values before scaling:\\n {}\".format(X_train.min(axis=0)))\n",
+ "print(\"Feature max values before scaling:\\n {}\".format(X_train.max(axis=0)))\n",
+ "\n",
+ "print(\"Feature min values before scaling:\\n {}\".format(X_train_scaled.min(axis=0)))\n",
+ "print(\"Feature max values before scaling:\\n {}\".format(X_train_scaled.max(axis=0)))\n",
+ "\n",
+ "\n",
+ "svm.fit(X_train_scaled, y_train)\n",
+ "print(\"Test set accuracy scaled data with Min-Max scaling: {:.2f}\".format(svm.score(X_test_scaled,y_test)))\n",
+ "\n",
+ "scaler = StandardScaler()\n",
+ "scaler.fit(X_train)\n",
+ "X_train_scaled = scaler.transform(X_train)\n",
+ "X_test_scaled = scaler.transform(X_test)\n",
+ "\n",
+ "svm.fit(X_train_scaled, y_train)\n",
+ "print(\"Test set accuracy scaled data with Standar Scaler: {:.2f}\".format(svm.score(X_test_scaled,y_test)))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## More on Cancer Data, now with Logistic Regression"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Test set accuracy: 0.95\n",
+ "Test set accuracy scaled data: 0.96\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/Users/hjensen/opt/anaconda3/lib/python3.8/site-packages/sklearn/linear_model/_logistic.py:762: ConvergenceWarning: lbfgs failed to converge (status=1):\n",
+ "STOP: TOTAL NO. of ITERATIONS REACHED LIMIT.\n",
+ "\n",
+ "Increase the number of iterations (max_iter) or scale the data as shown in:\n",
+ " https://scikit-learn.org/stable/modules/preprocessing.html\n",
+ "Please also refer to the documentation for alternative solver options:\n",
+ " https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression\n",
+ " n_iter_i = _check_optimize_result(\n"
+ ]
+ }
+ ],
+ "source": [
+ "import matplotlib.pyplot as plt\n",
+ "import numpy as np\n",
+ "from sklearn.model_selection import train_test_split \n",
+ "from sklearn.datasets import load_breast_cancer\n",
+ "from sklearn.linear_model import LogisticRegression\n",
+ "cancer = load_breast_cancer()\n",
+ "\n",
+ "# Set up training data\n",
+ "X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)\n",
+ "logreg = LogisticRegression()\n",
+ "logreg.fit(X_train, y_train)\n",
+ "print(\"Test set accuracy: {:.2f}\".format(logreg.score(X_test,y_test)))\n",
+ "\n",
+ "# Scale data\n",
+ "from sklearn.preprocessing import StandardScaler\n",
+ "scaler = StandardScaler()\n",
+ "scaler.fit(X_train)\n",
+ "X_train_scaled = scaler.transform(X_train)\n",
+ "X_test_scaled = scaler.transform(X_test)\n",
+ "logreg.fit(X_train_scaled, y_train)\n",
+ "print(\"Test set accuracy scaled data: {:.2f}\".format(logreg.score(X_test_scaled,y_test)))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Why should we think of reducing the dimensionality\n",
+ "\n",
+ "In addition to the plot of the features, we study now also the covariance (and the correlation matrix).\n",
+ "We use also **Pandas** to compute the correlation matrix."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAscAAAWYCAYAAABaiWuCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nOzdeZwcVbn/8c+XJCQhCWsAgRAGUEBZblgCAaMGRJRdrygiyKYBFzSiQRYVEeW6oXDdfyLKJpsgiCiXgGwKYUkgQCBBtoGEJQmBQAIECDy/P+oMVIbume6Z7unqnu/79arX1HrqOdU9p58+fapbEYGZmZmZmcEK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nxrXl62lm1rwqTY5flLRNx4KkbYGXu9jfzMzMzKzpVDqs4qvAnyU9mZbXAfavT0hm1kinXfOfmpZ39Ic26XYfSRx00EGce252C8OyZctYZ5112GGHHbjyyivLHnfDDTdw6qmncuWVV3LFFVdw//33c9xxx9Us9q7MmDGDJ598kj322KNPzmdmZn2jouQ4Iu6QtBmwKdl3G8+OiNfqGplVzmPcrMkNGzaMmTNn8vLLLzN06FCuueYa1ltvvarK2Geffdhnn33qFOHbzZgxg2nTpjk5tsq4nTZrGpUOqwAYC2wFbA0cIOng+oRkZv3R7rvvzt///ncALrjgAg444IA3t91+++3stNNObL311uy000488MADbzv+rLPO4qijjgLg4YcfZty4cYwdO5YTTzyR4cOHA1lP84QJE9hvv/3YbLPNOPDAA+n4rveTTz6ZsWPHssUWW3DEEUe8uX7ChAkce+yxbL/99myyySb861//4tVXX+XEE0/koosuYsyYMVx00UV1vTZmZtZ3KkqOJZ0LnAqMJ0uSxwLb1TEuM+tnPvWpT3HhhReydOlS7rnnHnbYYYc3t2222WbcdNNN3HXXXZx88smccMIJXZY1adIkJk2axB133MG666673La77rqL008/nfvvv59HHnmEm2++GYCjjjqKO+64480e7PxwjmXLlnH77bdz+umn893vfpcVV1yRk08+mf33358ZM2aw//4eZdZQ1/+g9GRm1gOVjjneDnhPVPNb09Z4/hjPmshWW21Fe3s7F1xwwduGKjz//PMccsghPPjgg0jitde6HtU1depULr/8cgA+/elPM3ny5De3bb/99owaNQqAMWPG0N7ezvjx47n++uv58Y9/zEsvvcSzzz7L5ptvzt577w3Af//3fwOw7bbb0t7eXqsqm5lZAVU6rGIm8I56BmJmts8++zB58uTlhlQAfPvb32bnnXdm5syZ/O1vf+vVr/kNHjz4zfkBAwawbNkyli5dyhe/+EUuueQS7r33XiZOnLjcOTqO6djfzMxaV6U9xyOB+yXdDrzSsTIi+u7uF6sd9yhbQR1++OGsssoqbLnlltxwww1vrn/++effvEHvrLPO6raccePGcemll7L//vtz4YUXdrt/RyI8cuRIlixZ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Users/hjensen/Teaching/FYS-STK4150/doc/src/LectureNotes/_build/jupyter_execute/chapter8_7_0.png"
+ },
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbcAAAFOCAYAAAAFClM6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nOydd3hURffHP7MlCUlI7wnSCUiv0gkd6ShKERUFCwqCCKiIooI0FcHeFQXFrggiIIoU6b33lt4LSXazZX5/3N3N3uxuCOV95eWX7/Pkgbt79pwzM2d37sz9njlCSkklKlGJSlSiEjcTNP+2A5WoRCUqUYlKXG9UTm6VqEQlKlGJmw6Vk1slKlGJSlTipkPl5FaJSlSiEpW46VA5uVWiEpWoRCVuOlRObpWoRCUqUYmbDpWTWyUqUYlKVOI/BiHEp0KIdCHEIQ/vCyHEm0KIU0KIA0KIFtfDbuXkVolKVKISlfhP4nOgTznv3w7Utf09DLx3PYxWTm6VqEQlKlGJ/xiklBuB7HJEBgFfSAXbgCAhRPS12q2c3P7HEB8f/2l8fHx6fHy88xK/D3AcOAU84+Zjg4ADwD5gF9DRg57rYWs+YACMwHmgaZn3E4BCJ5m1bnRMXbNmzelu3boZEhISjB988IEVCCnjW+CUKVO2JSYmGpKSkox//vnnd2701Ae2AmYg09YH7rY8+gC5Nn9SgO8Bf2d/UPouwyYjbe1wpycNKLHJhJVtF3Daqe0u7bpCW/k2W6nAp4De6f17gDM2W8XAIjc6KiIDIIDlNl/O474PAcajxIW97W/art32u5v4uuI4dqcnPj6+T3x8/PH4+PhT8fHxLnri4+ODp06duiUxMdGQkpJiOHXq1BtubNUHjqKMUaYHf+w+n7e1eamb9xOoQLxz+bi4x9b2A8A/lH6vLtdn/wuIBS46XSfaXrsmiM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LRS4vNRtsqsplbO0NYD+oHVBRMJA0zsy0L11yUgPC4qRRegurNVGaArQlJqk/bEySdhs+QKlH0bpVN02mkN9s7splb+0Nait6p0Hil2M+W1gywNeE5SccAj1KcloxqBVhcYSkoegdUSuGVGtKYjWZwZDO3DInQmhhBgj+pzABbE0Kgbggzs9hWgAxNoLU1TacxG83gyIJbhgwZ2jWypunFE5nkTYZEkLS5pP9IelPS6PzW0n4tTpB0gKQlw+9nh/PdIj1liytC0/RewEdm9nAW2BYfZDO3DImwOHJCtjbkC3QCI8jFeOvFmRZJ6puhaWRN04svsuCWIRFaEyPI4orWxgiyuCJrml48kQW3DInQmhhBFle0NkaQxRFZ0/Tii6wVIENSHIkzgnSggBGEgibfDBXjQLx143IzmxIKH05rYZ8WN2RN04spsplbhkRIi8YrQ4bWgKxpevFDNnPLkBRp0XhlyNBiyJqmF19kM7cMiZAWjVeGDC2JrGl68UUW3DIkwuLICJIhQ4bFB1lwy5AhQ4YMix0yhpIMGTJkyLDYIQtuGTJkyJBhsUMW3DJkyJAhw2KHLLhlyJAhQ4bFDllwy5AhQ4YMix3+H/4IVTYvZ6hOAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "filenames": {
+ "image/png": "/Users/hjensen/Teaching/FYS-STK4150/doc/src/LectureNotes/_build/jupyter_execute/chapter8_7_1.png"
+ },
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "[ 1.33026664e+01 5.69238112e+00 2.83259341e+00 1.99126621e+00\n",
+ " 1.69095941e+00 1.19614372e+00 7.13037918e-01 5.77804918e-01\n",
+ " 5.14549644e-01 4.30579019e-01 3.58977964e-01 -1.91269450e-01\n",
+ " 2.86195387e-01 -1.59310961e-01 -1.38483045e-01 2.44786221e-01\n",
+ " -8.79318674e-02 1.91811329e-01 1.70896266e-01 -7.17683028e-02\n",
+ " 1.39860289e-01 1.18721828e-01 -4.83194721e-02 8.92983892e-02\n",
+ " 6.81402316e-02 6.01968016e-02 3.31819744e-02 1.56432255e-02\n",
+ " -1.61028757e-02 -6.50565973e-03]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import matplotlib.pyplot as plt\n",
+ "import numpy as np\n",
+ "from sklearn.model_selection import train_test_split \n",
+ "from sklearn.datasets import load_breast_cancer\n",
+ "from sklearn.linear_model import LogisticRegression\n",
+ "cancer = load_breast_cancer()\n",
+ "import pandas as pd\n",
+ "# Making a data frame\n",
+ "cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names)\n",
+ "\n",
+ "fig, axes = plt.subplots(15,2,figsize=(10,20))\n",
+ "malignant = cancer.data[cancer.target == 0]\n",
+ "benign = cancer.data[cancer.target == 1]\n",
+ "ax = axes.ravel()\n",
+ "\n",
+ "for i in range(30):\n",
+ " _, bins = np.histogram(cancer.data[:,i], bins =50)\n",
+ " ax[i].hist(malignant[:,i], bins = bins, alpha = 0.5)\n",
+ " ax[i].hist(benign[:,i], bins = bins, alpha = 0.5)\n",
+ " ax[i].set_title(cancer.feature_names[i])\n",
+ " ax[i].set_yticks(())\n",
+ "ax[0].set_xlabel(\"Feature magnitude\")\n",
+ "ax[0].set_ylabel(\"Frequency\")\n",
+ "ax[0].legend([\"Malignant\", \"Benign\"], loc =\"best\")\n",
+ "fig.tight_layout()\n",
+ "plt.show()\n",
+ "\n",
+ "import seaborn as sns\n",
+ "correlation_matrix = cancerpd.corr().round(1)\n",
+ "# use the heatmap function from seaborn to plot the correlation matrix\n",
+ "# annot = True to print the values inside the square\n",
+ "sns.heatmap(data=correlation_matrix, annot=True)\n",
+ "plt.show()\n",
+ "\n",
+ "#print eigvalues of correlation matrix\n",
+ "EigValues, EigVectors = np.linalg.eig(correlation_matrix)\n",
+ "print(EigValues)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "In the above example we note two things. In the first plot we display\n",
+ "the overlap of benign and malignant tumors as functions of the various\n",
+ "features in the Wisconsing breast cancer data set. We see that for\n",
+ "some of the features we can distinguish clearly the benign and\n",
+ "malignant cases while for other features we cannot. This can point to\n",
+ "us which features may be of greater interest when we wish to classify\n",
+ "a benign or not benign tumour.\n",
+ "\n",
+ "In the second figure we have computed the so-called correlation\n",
+ "matrix, which in our case with thirty features becomes a $30\\times 30$\n",
+ "matrix.\n",
+ "\n",
+ "We constructed this matrix using **pandas** via the statements"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and then"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "correlation_matrix = cancerpd.corr().round(1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Diagonalizing this matrix we can in turn say something about which\n",
+ "features are of relevance and which are not. But before we proceed we\n",
+ "need to define covariance and correlation matrices. This leads us to\n",
+ "the classical Principal Component Analysis (PCA) theorem with\n",
+ "applications.\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Basic ideas of the Principal Component Analysis (PCA)\n",
+ "\n",
+ "The principal component analysis deals with the problem of fitting a\n",
+ "low-dimensional affine subspace $S$ of dimension $d$ much smaller than\n",
+ "the totaldimension $D$ of the problem at hand (our data\n",
+ "set). Mathematically it can be formulated as a statistical problem or\n",
+ "a geometric problem. In our discussion of the theorem for the\n",
+ "classical PCA, we will stay with a statistical approach. This is also\n",
+ "what set the scene historically which for the PCA.\n",
+ "\n",
+ "We have a data set defined by a design/feature matrix $\\boldsymbol{X}$ (see below for its definition) \n",
+ "* Each data point is determined by $p$ extrinsic (measurement) variables\n",
+ "\n",
+ "* We may want to ask the following question: Are there fewer intrinsic variables (say $d << p$) that still approximately describe the data?\n",
+ "\n",
+ "* If so, these intrinsic variables may tell us something important and finding these intrinsic variables is what dimension reduction methods do. \n",
+ "\n",
+ "## Introducing the Covariance and Correlation functions\n",
+ "\n",
+ "Before we discuss the PCA theorem, we need to remind ourselves about\n",
+ "the definition of the covariance and the correlation function. These are quantities \n",
+ "\n",
+ "Suppose we have defined two vectors\n",
+ "$\\hat{x}$ and $\\hat{y}$ with $n$ elements each. The covariance matrix $\\boldsymbol{C}$ is defined as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x},\\boldsymbol{y}] = \\begin{bmatrix} \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{x}] & \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] \\\\\n",
+ " \\mathrm{cov}[\\boldsymbol{y},\\boldsymbol{x}] & \\mathrm{cov}[\\boldsymbol{y},\\boldsymbol{y}] \\\\\n",
+ " \\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where for example"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] =\\frac{1}{n} \\sum_{i=0}^{n-1}(x_i- \\overline{x})(y_i- \\overline{y}).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "With this definition and recalling that the variance is defined as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mathrm{var}[\\boldsymbol{x}]=\\frac{1}{n} \\sum_{i=0}^{n-1}(x_i- \\overline{x})^2,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "we can rewrite the covariance matrix as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x},\\boldsymbol{y}] = \\begin{bmatrix} \\mathrm{var}[\\boldsymbol{x}] & \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] \\\\\n",
+ " \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] & \\mathrm{var}[\\boldsymbol{y}] \\\\\n",
+ " \\end{bmatrix}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "The covariance takes values between zero and infinity and may thus\n",
+ "lead to problems with loss of numerical precision for particularly\n",
+ "large values. It is common to scale the covariance matrix by\n",
+ "introducing instead the correlation matrix defined via the so-called\n",
+ "correlation function"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mathrm{corr}[\\boldsymbol{x},\\boldsymbol{y}]=\\frac{\\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}]}{\\sqrt{\\mathrm{var}[\\boldsymbol{x}] \\mathrm{var}[\\boldsymbol{y}]}}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "The correlation function is then given by values $\\mathrm{corr}[\\boldsymbol{x},\\boldsymbol{y}]\n",
+ "\\in [-1,1]$. This avoids eventual problems with too large values. We\n",
+ "can then define the correlation matrix for the two vectors $\\boldsymbol{x}$\n",
+ "and $\\boldsymbol{y}$ as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{K}[\\boldsymbol{x},\\boldsymbol{y}] = \\begin{bmatrix} 1 & \\mathrm{corr}[\\boldsymbol{x},\\boldsymbol{y}] \\\\\n",
+ " \\mathrm{corr}[\\boldsymbol{y},\\boldsymbol{x}] & 1 \\\\\n",
+ " \\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "In the above example this is the function we constructed using **pandas**.\n",
+ "\n",
+ "\n",
+ "## Correlation Function and Design/Feature Matrix\n",
+ "\n",
+ "In our derivation of the various regression algorithms like **Ordinary Least Squares** or **Ridge regression**\n",
+ "we defined the design/feature matrix $\\boldsymbol{X}$ as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{X}=\\begin{bmatrix}\n",
+ "x_{0,0} & x_{0,1} & x_{0,2}& \\dots & \\dots x_{0,p-1}\\\\\n",
+ "x_{1,0} & x_{1,1} & x_{1,2}& \\dots & \\dots x_{1,p-1}\\\\\n",
+ "x_{2,0} & x_{2,1} & x_{2,2}& \\dots & \\dots x_{2,p-1}\\\\\n",
+ "\\dots & \\dots & \\dots & \\dots \\dots & \\dots \\\\\n",
+ "x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \\dots & \\dots x_{n-2,p-1}\\\\\n",
+ "x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \\dots & \\dots x_{n-1,p-1}\\\\\n",
+ "\\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "with $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$, with the predictors/features $p$ refering to the column numbers and the\n",
+ "entries $n$ being the row elements.\n",
+ "We can rewrite the design/feature matrix in terms of its column vectors as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{X}=\\begin{bmatrix} \\boldsymbol{x}_0 & \\boldsymbol{x}_1 & \\boldsymbol{x}_2 & \\dots & \\dots & \\boldsymbol{x}_{p-1}\\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "with a given vector"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{x}_i^T = \\begin{bmatrix}x_{0,i} & x_{1,i} & x_{2,i}& \\dots & \\dots x_{n-1,i}\\end{bmatrix}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "With these definitions, we can now rewrite our $2\\times 2$\n",
+ "correaltion/covariance matrix in terms of a moe general design/feature\n",
+ "matrix $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$. This leads to a $p\\times p$\n",
+ "covariance matrix for the vectors $\\boldsymbol{x}_i$ with $i=0,1,\\dots,p-1$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x}] = \\begin{bmatrix}\n",
+ "\\mathrm{var}[\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_{p-1}]\\\\\n",
+ "\\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_0] & \\mathrm{var}[\\boldsymbol{x}_1] & \\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_{p-1}]\\\\\n",
+ "\\mathrm{cov}[\\boldsymbol{x}_2,\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_2,\\boldsymbol{x}_1] & \\mathrm{var}[\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{cov}[\\boldsymbol{x}_2,\\boldsymbol{x}_{p-1}]\\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "\\mathrm{cov}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_1] & \\mathrm{cov}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_{2}] & \\dots & \\dots & \\mathrm{var}[\\boldsymbol{x}_{p-1}]\\\\\n",
+ "\\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and the correlation matrix"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{K}[\\boldsymbol{x}] = \\begin{bmatrix}\n",
+ "1 & \\mathrm{corr}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] & \\mathrm{corr}[\\boldsymbol{x}_0,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{corr}[\\boldsymbol{x}_0,\\boldsymbol{x}_{p-1}]\\\\\n",
+ "\\mathrm{corr}[\\boldsymbol{x}_1,\\boldsymbol{x}_0] & 1 & \\mathrm{corr}[\\boldsymbol{x}_1,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{corr}[\\boldsymbol{x}_1,\\boldsymbol{x}_{p-1}]\\\\\n",
+ "\\mathrm{corr}[\\boldsymbol{x}_2,\\boldsymbol{x}_0] & \\mathrm{corr}[\\boldsymbol{x}_2,\\boldsymbol{x}_1] & 1 & \\dots & \\dots & \\mathrm{corr}[\\boldsymbol{x}_2,\\boldsymbol{x}_{p-1}]\\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "\\mathrm{corr}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_0] & \\mathrm{corr}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_1] & \\mathrm{corr}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_{2}] & \\dots & \\dots & 1\\\\\n",
+ "\\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Covariance Matrix Examples\n",
+ "\n",
+ "\n",
+ "The Numpy function **np.cov** calculates the covariance elements using\n",
+ "the factor $1/(n-1)$ instead of $1/n$ since it assumes we do not have\n",
+ "the exact mean values. The following simple function uses the\n",
+ "**np.vstack** function which takes each vector of dimension $1\\times n$\n",
+ "and produces a $2\\times n$ matrix $\\boldsymbol{W}$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{W} = \\begin{bmatrix} x_0 & y_0 \\\\\n",
+ " x_1 & y_1 \\\\\n",
+ " x_2 & y_2\\\\\n",
+ " \\dots & \\dots \\\\\n",
+ " x_{n-2} & y_{n-2}\\\\\n",
+ " x_{n-1} & y_{n-1} & \n",
+ " \\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "which in turn is converted into into the $2\\times 2$ covariance matrix\n",
+ "$\\boldsymbol{C}$ via the Numpy function **np.cov()**. We note that we can also calculate\n",
+ "the mean value of each set of samples $\\boldsymbol{x}$ etc using the Numpy\n",
+ "function **np.mean(x)**. We can also extract the eigenvalues of the\n",
+ "covariance matrix through the **np.linalg.eig()** function."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.039184456674535545\n",
+ "4.128680426693387\n",
+ "[[ 1.12297057 3.2186233 ]\n",
+ " [ 3.2186233 10.11517976]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Importing various packages\n",
+ "import numpy as np\n",
+ "n = 100\n",
+ "x = np.random.normal(size=n)\n",
+ "print(np.mean(x))\n",
+ "y = 4+3*x+np.random.normal(size=n)\n",
+ "print(np.mean(y))\n",
+ "W = np.vstack((x, y))\n",
+ "C = np.cov(W)\n",
+ "print(C)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Correlation Matrix\n",
+ "\n",
+ "The previous example can be converted into the correlation matrix by\n",
+ "simply scaling the matrix elements with the variances. We should also\n",
+ "subtract the mean values for each column. This leads to the following\n",
+ "code which sets up the correlations matrix for the previous example in\n",
+ "a more brute force way. Here we scale the mean values for each column of the design matrix, calculate the relevant mean values and variances and then finally set up the $2\\times 2$ correlation matrix (since we have only two vectors)."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0.08474873038505544\n",
+ "1.7239002399681738\n",
+ "[[1. 0.62968416]\n",
+ " [0.62968416 1. ]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "n = 100\n",
+ "# define two vectors \n",
+ "x = np.random.random(size=n)\n",
+ "y = 4+3*x+np.random.normal(size=n)\n",
+ "#scaling the x and y vectors \n",
+ "x = x - np.mean(x)\n",
+ "y = y - np.mean(y)\n",
+ "variance_x = np.sum(x@x)/n\n",
+ "variance_y = np.sum(y@y)/n\n",
+ "print(variance_x)\n",
+ "print(variance_y)\n",
+ "cov_xy = np.sum(x@y)/n\n",
+ "cov_xx = np.sum(x@x)/n\n",
+ "cov_yy = np.sum(y@y)/n\n",
+ "C = np.zeros((2,2))\n",
+ "C[0,0]= cov_xx/variance_x\n",
+ "C[1,1]= cov_yy/variance_y\n",
+ "C[0,1]= cov_xy/np.sqrt(variance_y*variance_x)\n",
+ "C[1,0]= C[0,1]\n",
+ "print(C)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We see that the matrix elements along the diagonal are one as they\n",
+ "should be and that the matrix is symmetric. Furthermore, diagonalizing\n",
+ "this matrix we easily see that it is a positive definite matrix.\n",
+ "\n",
+ "The above procedure with **numpy** can be made more compact if we use **pandas**.\n",
+ "\n",
+ "\n",
+ "## Correlation Matrix with Pandas\n",
+ "\n",
+ "We whow here how we can set up the correlation matrix using **pandas**, as done in this simple code"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "[[ 0.29439863 1.90169666]\n",
+ " [ 1.67736015 3.10465335]\n",
+ " [-0.55604865 -0.71001501]\n",
+ " [-0.86385893 -3.79843757]\n",
+ " [-0.32231733 0.0602184 ]\n",
+ " [-1.30134141 -3.01442901]\n",
+ " [-0.46095356 0.49571687]\n",
+ " [ 0.83524925 1.94721304]\n",
+ " [-0.41069583 -1.37424606]\n",
+ " [ 1.10820768 1.38762934]]\n",
+ " 0 1\n",
+ "0 0.294399 1.901697\n",
+ "1 1.677360 3.104653\n",
+ "2 -0.556049 -0.710015\n",
+ "3 -0.863859 -3.798438\n",
+ "4 -0.322317 0.060218\n",
+ "5 -1.301341 -3.014429\n",
+ "6 -0.460954 0.495717\n",
+ "7 0.835249 1.947213\n",
+ "8 -0.410696 -1.374246\n",
+ "9 1.108208 1.387629\n",
+ " 0 1\n",
+ "0 1.000000 0.883341\n",
+ "1 0.883341 1.000000\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "n = 10\n",
+ "x = np.random.normal(size=n)\n",
+ "x = x - np.mean(x)\n",
+ "y = 4+3*x+np.random.normal(size=n)\n",
+ "y = y - np.mean(y)\n",
+ "X = (np.vstack((x, y))).T\n",
+ "print(X)\n",
+ "Xpd = pd.DataFrame(X)\n",
+ "print(Xpd)\n",
+ "correlation_matrix = Xpd.corr()\n",
+ "print(correlation_matrix)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We expand this model to the Franke function discussed above.\n",
+ "\n",
+ "\n",
+ "## Correlation Matrix with Pandas and the Franke function"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " 0 1 2 3 4 5 6 7 \\\n",
+ "0 0.0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 \n",
+ "1 0.0 0.088096 0.086427 0.083845 0.082640 0.081425 0.073689 0.072606 \n",
+ "2 0.0 0.086427 0.085149 0.082400 0.081356 0.080291 0.072444 0.071452 \n",
+ "3 0.0 0.083845 0.082400 0.085937 0.084688 0.083422 0.079032 0.077855 \n",
+ "4 0.0 0.082640 0.081356 0.084688 0.083531 0.082352 0.077865 0.076753 \n",
+ "5 0.0 0.081425 0.080291 0.083422 0.082352 0.081256 0.076682 0.075632 \n",
+ "6 0.0 0.073689 0.072444 0.079032 0.077865 0.076682 0.074903 0.073780 \n",
+ "7 0.0 0.072606 0.071452 0.077855 0.076753 0.075632 0.073780 0.072708 \n",
+ "8 0.0 0.071547 0.070480 0.076701 0.075660 0.074600 0.072677 0.071655 \n",
+ "9 0.0 0.070513 0.069529 0.075570 0.074589 0.073587 0.071595 0.070622 \n",
+ "10 0.0 0.064543 0.063450 0.071358 0.070294 0.069218 0.069100 0.068064 \n",
+ "11 0.0 0.063581 0.062551 0.070288 0.069275 0.068248 0.068065 0.067072 \n",
+ "12 0.0 0.062646 0.061677 0.069247 0.068283 0.067304 0.067057 0.066105 \n",
+ "13 0.0 0.061738 0.060828 0.068235 0.067318 0.066385 0.066075 0.065164 \n",
+ "14 0.0 0.060857 0.060003 0.067250 0.066378 0.065490 0.065119 0.064247 \n",
+ "\n",
+ " 8 9 10 11 12 13 14 \n",
+ "0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 \n",
+ "1 0.071547 0.070513 0.064543 0.063581 0.062646 0.061738 0.060857 \n",
+ "2 0.070480 0.069529 0.063450 0.062551 0.061677 0.060828 0.060003 \n",
+ "3 0.076701 0.075570 0.071358 0.070288 0.069247 0.068235 0.067250 \n",
+ "4 0.075660 0.074589 0.070294 0.069275 0.068283 0.067318 0.066378 \n",
+ "5 0.074600 0.073587 0.069218 0.068248 0.067304 0.066385 0.065490 \n",
+ "6 0.072677 0.071595 0.069100 0.068065 0.067057 0.066075 0.065119 \n",
+ "7 0.071655 0.070622 0.068064 0.067072 0.066105 0.065164 0.064247 \n",
+ "8 0.070650 0.069664 0.067046 0.066096 0.065170 0.064268 0.063389 \n",
+ "9 0.069664 0.068722 0.066047 0.065138 0.064251 0.063387 0.062545 \n",
+ "10 0.067046 0.066047 0.064786 0.063821 0.062880 0.061964 0.061071 \n",
+ "11 0.066096 0.065138 0.063821 0.062893 0.061989 0.061108 0.060249 \n",
+ "12 0.065170 0.064251 0.062880 0.061989 0.061120 0.060273 0.059447 \n",
+ "13 0.064268 0.063387 0.061964 0.061108 0.060273 0.059458 0.058665 \n",
+ "14 0.063389 0.062545 0.061071 0.060249 0.059447 0.058665 0.057901 \n"
+ ]
+ }
+ ],
+ "source": [
+ "# Common imports\n",
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "\n",
+ "\n",
+ "def FrankeFunction(x,y):\n",
+ "\tterm1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))\n",
+ "\tterm2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))\n",
+ "\tterm3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))\n",
+ "\tterm4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)\n",
+ "\treturn term1 + term2 + term3 + term4\n",
+ "\n",
+ "\n",
+ "def create_X(x, y, n ):\n",
+ "\tif len(x.shape) > 1:\n",
+ "\t\tx = np.ravel(x)\n",
+ "\t\ty = np.ravel(y)\n",
+ "\n",
+ "\tN = len(x)\n",
+ "\tl = int((n+1)*(n+2)/2)\t\t# Number of elements in beta\n",
+ "\tX = np.ones((N,l))\n",
+ "\n",
+ "\tfor i in range(1,n+1):\n",
+ "\t\tq = int((i)*(i+1)/2)\n",
+ "\t\tfor k in range(i+1):\n",
+ "\t\t\tX[:,q+k] = (x**(i-k))*(y**k)\n",
+ "\n",
+ "\treturn X\n",
+ "\n",
+ "\n",
+ "# Making meshgrid of datapoints and compute Franke's function\n",
+ "n = 4\n",
+ "N = 100\n",
+ "x = np.sort(np.random.uniform(0, 1, N))\n",
+ "y = np.sort(np.random.uniform(0, 1, N))\n",
+ "z = FrankeFunction(x, y)\n",
+ "X = create_X(x, y, n=n) \n",
+ "\n",
+ "Xpd = pd.DataFrame(X)\n",
+ "# subtract the mean values and set up the covariance matrix\n",
+ "Xpd = Xpd - Xpd.mean()\n",
+ "covariance_matrix = Xpd.cov()\n",
+ "print(covariance_matrix)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We note here that the covariance is zero for the first rows and\n",
+ "columns since all matrix elements in the design matrix were set to one\n",
+ "(we are fitting the function in terms of a polynomial of degree $n$).\n",
+ "\n",
+ "This means that the variance for these elements will be zero and will\n",
+ "cause problems when we set up the correlation matrix. We can simply\n",
+ "drop these elements and construct a correlation\n",
+ "matrix without these elements. \n",
+ "\n",
+ "\n",
+ "\n",
+ "## Rewriting the Covariance and/or Correlation Matrix\n",
+ "\n",
+ "We can rewrite the covariance matrix in a more compact form in terms of the design/feature matrix $\\boldsymbol{X}$ as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x}] = \\frac{1}{n}\\boldsymbol{X}\\boldsymbol{X}^T= \\mathbb{E}[\\boldsymbol{X}\\boldsymbol{X}^T].\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "To see this let us simply look at a design matrix $\\boldsymbol{X}\\in {\\mathbb{R}}^{2\\times 2}$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{X}=\\begin{bmatrix}\n",
+ "x_{00} & x_{01}\\\\\n",
+ "x_{10} & x_{11}\\\\\n",
+ "\\end{bmatrix}=\\begin{bmatrix}\n",
+ "\\boldsymbol{x}_{0} & \\boldsymbol{x}_{1}\\\\\n",
+ "\\end{bmatrix}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "If we then compute the expectation value"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mathbb{E}[\\boldsymbol{X}\\boldsymbol{X}^T] = \\frac{1}{n}\\boldsymbol{X}\\boldsymbol{X}^T=\\begin{bmatrix}\n",
+ "x_{00}^2+x_{01}^2 & x_{00}x_{10}+x_{01}x_{11}\\\\\n",
+ "x_{10}x_{00}+x_{11}x_{01} & x_{10}^2+x_{11}^2\\\\\n",
+ "\\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "which is just"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] = \\boldsymbol{C}[\\boldsymbol{x}]=\\begin{bmatrix} \\mathrm{var}[\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] \\\\\n",
+ " \\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_0] & \\mathrm{var}[\\boldsymbol{x}_1] \\\\\n",
+ " \\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where we wrote $$\\boldsymbol{C}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] = \\boldsymbol{C}[\\boldsymbol{x}]$$ to indicate that this the covariance of the vectors $\\boldsymbol{x}$ of the design/feature matrix $\\boldsymbol{X}$.\n",
+ "\n",
+ "It is easy to generalize this to a matrix $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$.\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Towards the PCA theorem\n",
+ "\n",
+ "We have that the covariance matrix (the correlation matrix involves a simple rescaling) is given as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x}] = \\frac{1}{n}\\boldsymbol{X}\\boldsymbol{X}^T= \\mathbb{E}[\\boldsymbol{X}\\boldsymbol{X}^T].\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Let us now assume that we can perform a series of orthogonal transformations where we employ some orthogonal matrices $\\boldsymbol{S}$.\n",
+ "These matrices are defined as $\\boldsymbol{S}\\in {\\mathbb{R}}^{p\\times p}$ and obey the orthogonality requirements $\\boldsymbol{S}\\boldsymbol{S}^T=\\boldsymbol{S}^T\\boldsymbol{S}=\\boldsymbol{I}$. The matrix can be written out in terms of the column vectors $\\boldsymbol{s}_i$ as $\\boldsymbol{S}=[\\boldsymbol{s}_0,\\boldsymbol{s}_1,\\dots,\\boldsymbol{s}_{p-1}]$ and $\\boldsymbol{s}_i \\in {\\mathbb{R}}^{p}$.\n",
+ "\n",
+ "Assume also that there is a transformation $\\boldsymbol{S}\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{S}^T=\\boldsymbol{C}[\\boldsymbol{y}]$ such that the new matrix $\\boldsymbol{C}[\\boldsymbol{y}]$ is diagonal with elements $[\\lambda_0,\\lambda_1,\\lambda_2,\\dots,\\lambda_{p-1}]$. \n",
+ "\n",
+ "That is we have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{y}] = \\mathbb{E}[\\boldsymbol{S}\\boldsymbol{X}\\boldsymbol{X}^T\\boldsymbol{S}^T]=\\boldsymbol{S}\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{S}^T,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "since the matrix $\\boldsymbol{S}$ is not a data dependent matrix. Multiplying with $\\boldsymbol{S}^T$ from the left we have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{S}^T\\boldsymbol{C}[\\boldsymbol{y}] = \\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{S}^T,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and since $\\boldsymbol{C}[\\boldsymbol{y}]$ is diagonal we have for a given eigenvalue $i$ of the covariance matrix that"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{S}^T_i\\lambda_i = \\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{S}^T_i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "In the derivation of the PCA theorem we will assume that the eigenvalues are ordered in descending order, that is\n",
+ "$\\lambda_0 > \\lambda_1 > \\dots > \\lambda_{p-1}$. \n",
+ "\n",
+ "\n",
+ "The eigenvalues tell us then how much we need to stretch the\n",
+ "corresponding eigenvectors. Dimensions with large eigenvalues have\n",
+ "thus large variations (large variance) and define therefore useful\n",
+ "dimensions. The data points are more spread out in the direction of\n",
+ "these eigenvectors. Smaller eigenvalues mean on the other hand that\n",
+ "the corresponding eigenvectors are shrunk accordingly and the data\n",
+ "points are tightly bunched together and there is not much variation in\n",
+ "these specific directions. Hopefully then we could leave it out\n",
+ "dimensions where the eigenvalues are very small. If $p$ is very large,\n",
+ "we could then aim at reducing $p$ to $l << p$ and handle only $l$\n",
+ "features/predictors.\n",
+ "\n",
+ "\n",
+ "## The Algorithm before theorem\n",
+ "\n",
+ "Here's how we would proceed in setting up the algorithm for the PCA, see also discussion below here. \n",
+ "* Set up the datapoints for the design/feature matrix $\\boldsymbol{X}$ with $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$, with the predictors/features $p$ referring to the column numbers and the entries $n$ being the row elements."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{X}=\\begin{bmatrix}\n",
+ "x_{0,0} & x_{0,1} & x_{0,2}& \\dots & \\dots x_{0,p-1}\\\\\n",
+ "x_{1,0} & x_{1,1} & x_{1,2}& \\dots & \\dots x_{1,p-1}\\\\\n",
+ "x_{2,0} & x_{2,1} & x_{2,2}& \\dots & \\dots x_{2,p-1}\\\\\n",
+ "\\dots & \\dots & \\dots & \\dots \\dots & \\dots \\\\\n",
+ "x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \\dots & \\dots x_{n-2,p-1}\\\\\n",
+ "x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \\dots & \\dots x_{n-1,p-1}\\\\\n",
+ "\\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "* Center the data by subtracting the mean value for each column. This leads to a new matrix $\\boldsymbol{X}\\rightarrow \\overline{\\boldsymbol{X}}$.\n",
+ "\n",
+ "* Compute then the covariance/correlation matrix $\\mathbb{E}[\\overline{\\boldsymbol{X}}\\overline{\\boldsymbol{X}}^T]$.\n",
+ "\n",
+ "* Find the eigenpairs of $\\boldsymbol{C}$ with eigenvalues $[\\lambda_0,\\lambda_1,\\dots,\\lambda_{p-1}]$ and eigenvectors $[\\boldsymbol{s}_0,\\boldsymbol{s}_1,\\dots,\\boldsymbol{s}_{p-1}]$.\n",
+ "\n",
+ "* Order the eigenvalue (and the eigenvectors accordingly) in order of decreasing eigenvalues.\n",
+ "\n",
+ "* Keep only those $l$ eigenvalues larger than a selected threshold value, discarding thus $p-l$ features since we expect small variations in the data here.\n",
+ "\n",
+ "## Writing our own PCA code\n",
+ "\n",
+ "We will use a simple example first with two-dimensional data\n",
+ "drawn from a multivariate normal distribution with the following mean and covariance matrix:"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mu = (-1,2) \\qquad \\Sigma = \\begin{bmatrix} 4 & 2 \\\\\n",
+ "2 & 2\n",
+ "\\end{bmatrix}\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Note that the mean refers to each column of data. \n",
+ "We will generate $n = 1000$ points $X = \\{ x_1, \\ldots, x_N \\}$ from\n",
+ "this distribution, and store them in the $1000 \\times 2$ matrix $\\boldsymbol{X}$.\n",
+ "\n",
+ "The following Python code aids in setting up the data and writing out the design matrix.\n",
+ "Note that the function **multivariate** returns also the covariance discussed above and that it is defined by dividing by $n-1$ instead of $n$."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "import matplotlib.pyplot as plt\n",
+ "from IPython.display import display\n",
+ "n = 10000\n",
+ "mean = (-1, 2)\n",
+ "cov = [[4, 2], [2, 2]]\n",
+ "X = np.random.multivariate_normal(mean, cov, n)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Now we are going to implement the PCA algorithm. We will break it down into various substeps.\n",
+ "\n",
+ "### Compute the sample mean and center the data\n",
+ "\n",
+ "The first step of PCA is to compute the sample mean of the data and use it to center the data. Recall that the sample mean is"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mu_n = \\frac{1}{n} \\sum_{i=1}^n x_i\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and the mean-centered data $\\bar{X} = \\{ \\bar{x}_1, \\ldots, \\bar{x}_n \\}$ takes the form"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\bar{x}_i = x_i - \\mu_n.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "When you are done with these steps, print out $\\mu_n$ to verify it is\n",
+ "close to $\\mu$ and plot your mean centered data to verify it is\n",
+ "centered at the origin! Compare your code with the functionality from **Scikit-Learn** discussed above.\n",
+ "The following code elements perform these operations using **pandas** or using our own functionality for doing so. The latter, using **numpy** is rather simple through the **mean()** function."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "df = pd.DataFrame(X)\n",
+ "# Pandas does the centering for us\n",
+ "df = df -df.mean()\n",
+ "# we center it ourselves\n",
+ "X_centered = X - X.mean(axis=0)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Alternatively, we could use the functions we discussed\n",
+ "earlier for scaling the data set. That is, we could have used the\n",
+ "**StandardScaler** function in **Scikit-Learn**, a function which ensures\n",
+ "that for each feature/predictor we study the mean value is zero and\n",
+ "the variance is one (every column in the design/feature matrix). You\n",
+ "would then not get the same results, since we divide by the\n",
+ "variance. The diagonal covariance matrix elements will then be one,\n",
+ "while the non-diagonal ones need to be divided by $2\\sqrt{2}$ for our\n",
+ "specific case.\n",
+ "\n",
+ "### Compute the sample covariance\n",
+ "\n",
+ "Now we are going to use the mean centered data to compute the sample covariance of the data by using the following equation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\Sigma_n = \\frac{1}{n-1} \\sum_{i=1}^n \\bar{x}_i^T \\bar{x}_i = \\frac{1}{n-1} \\sum_{i=1}^n (x_i - \\mu_n)^T (x_i - \\mu_n)\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where the data points $x_i \\in \\mathbb{R}^p$ (here in this example $p = 2$) are column vectors and $x^T$ is the transpose of $x$.\n",
+ "We can write our own code or simply use either the functionaly of **numpy** or that of **pandas**, as follows"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " 0 1\n",
+ "0 4.050693 2.010827\n",
+ "1 2.010827 1.974163\n",
+ "[[4.050693 2.01082738]\n",
+ " [2.01082738 1.97416255]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "print(df.cov())\n",
+ "print(np.cov(X_centered.T))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Note that the way we define the covariance matrix here has a factor $n-1$ instead of $n$. This is included in the **cov()** function by **numpy** and **pandas**. \n",
+ "Our own code here is not very elegant and asks for obvious improvements. It is tailored to this specific $2\\times 2$ covariance matrix."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Centered covariance using own code\n",
+ "[[4.050693 2.01082738]\n",
+ " [2.01082738 1.97416255]]\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAD4CAYAAADxeG0DAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nOy9f3RUZZrv+3n3rqr8KEgIlTKkQjSmIkRJByM/O0JDYx/Qg/SI006fwWYGVFq518s5zUxPH/Xeu9Zdd6lnpucy97A8B5FG6FE5093TxHORV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v4zxj4XrwPGIqo7jNHhncBPol5zA380HheiR36PATXoroOxkPN54BOg2jgxudGyGs+/h57Z4BlDWevQ/XQfGz+/GW/rGmudgJ+Yfwvot6j/19j+CTB/jNZyKfqtcXXYen4vStaNxhoeQw8uLxkjWWOe0/G4roYsKeiKOTPstXGxrugXl1NAAN3KfgBwAu8Anxu/pxj7DosOkCX6EolEMsGZ6K4ViUQimfRIRS6RSCQTHKnIJRKJZIIjFblEIpFMcKQil0gkkgmOVOQSiUQywZGKXCKRSCY4/x8HNfMKnxMgEgAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "filenames": {
+ "image/png": "/Users/hjensen/Teaching/FYS-STK4150/doc/src/LectureNotes/_build/jupyter_execute/chapter8_77_1.png"
+ },
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "# extract the relevant columns from the centered design matrix of dim n x 2\n",
+ "x = X_centered[:,0]\n",
+ "y = X_centered[:,1]\n",
+ "Cov = np.zeros((2,2))\n",
+ "Cov[0,1] = np.sum(x.T@y)/(n-1.0)\n",
+ "Cov[0,0] = np.sum(x.T@x)/(n-1.0)\n",
+ "Cov[1,1] = np.sum(y.T@y)/(n-1.0)\n",
+ "Cov[1,0]= Cov[0,1]\n",
+ "print(\"Centered covariance using own code\")\n",
+ "print(Cov)\n",
+ "plt.plot(x, y, 'x')\n",
+ "plt.axis('equal')\n",
+ "plt.show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Depending on the number of points $n$, we will get results that are close to the covariance values defined above.\n",
+ "The plot shows how the data are clustered around a line with slope close to one. Is this expected?\n",
+ "\n",
+ "### Diagonalize the sample covariance matrix to obtain the principal components\n",
+ "\n",
+ "Now we are ready to solve for the principal components! To do so we\n",
+ "diagonalize the sample covariance matrix $\\Sigma$. We can use the\n",
+ "function **np.linalg.eig** to do so. It will return the eigenvalues and\n",
+ "eigenvectors of $\\Sigma$. Once we have these we can perform the \n",
+ "following tasks:\n",
+ "\n",
+ "* We compute the percentage of the total variance captured by the first principal component\n",
+ "\n",
+ "* We plot the mean centered data and lines along the first and second principal components\n",
+ "\n",
+ "* Then we project the mean centered data onto the first and second principal components, and plot the projected data. \n",
+ "\n",
+ "* Finally, we approximate the data as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "x_i \\approx \\tilde{x}_i = \\mu_n + \\langle x_i, v_0 \\rangle v_0\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where $v_0$ is the first principal component. \n",
+ "\n",
+ "Collecting all these steps we can write our own PCA function and\n",
+ "compare this with the functionality included in **Scikit-Learn**. \n",
+ "\n",
+ "The code here outlines some of the elements we could include in the\n",
+ "analysis. Feel free to extend upon this in order to address the above\n",
+ "questions."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Eigenvalues of Covariance matrix\n",
+ "5.275483542917728\n",
+ "0.7493720026008108\n",
+ "First eigenvector\n",
+ "[0.85404598 0.52019753]\n",
+ "Second eigenvector\n",
+ "[-0.52019753 0.85404598]\n",
+ "Eigenvector of largest eigenvalue\n",
+ "[0.85404598 0.52019753]\n"
+ ]
+ }
+ ],
+ "source": [
+ "# diagonalize and obtain eigenvalues, not necessarily sorted\n",
+ "EigValues, EigVectors = np.linalg.eig(Cov)\n",
+ "# sort eigenvectors and eigenvalues\n",
+ "#permute = EigValues.argsort()\n",
+ "#EigValues = EigValues[permute]\n",
+ "#EigVectors = EigVectors[:,permute]\n",
+ "print(\"Eigenvalues of Covariance matrix\")\n",
+ "for i in range(2):\n",
+ " print(EigValues[i])\n",
+ "FirstEigvector = EigVectors[:,0]\n",
+ "SecondEigvector = EigVectors[:,1]\n",
+ "print(\"First eigenvector\")\n",
+ "print(FirstEigvector)\n",
+ "print(\"Second eigenvector\")\n",
+ "print(SecondEigvector)\n",
+ "#thereafter we do a PCA with Scikit-learn\n",
+ "from sklearn.decomposition import PCA\n",
+ "pca = PCA(n_components = 2)\n",
+ "X2Dsl = pca.fit_transform(X)\n",
+ "print(\"Eigenvector of largest eigenvalue\")\n",
+ "print(pca.components_.T[:, 0])"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "This code does not contain all the above elements, but it shows how we can use **Scikit-Learn** to extract the eigenvector which corresponds to the largest eigenvalue. Try to address the questions we pose before the above code. Try also to change the values of the covariance matrix by making one of the diagonal elements much larger than the other. What do you observe then? \n",
+ "\n",
+ "\n",
+ "## Classical PCA Theorem\n",
+ "\n",
+ "We assume now that we have a design matrix $\\boldsymbol{X}$ which has been\n",
+ "centered as discussed above. For the sake of simplicity we skip the\n",
+ "overline symbol. The matrix is defined in terms of the various column\n",
+ "vectors $[\\boldsymbol{x}_0,\\boldsymbol{x}_1,\\dots, \\boldsymbol{x}_{p-1}]$ each with dimension\n",
+ "$\\boldsymbol{x}\\in {\\mathbb{R}}^{n}$.\n",
+ "\n",
+ "We assume also that we have an orthogonal transformation $\\boldsymbol{W}\\in {\\mathbb{R}}^{p\\times p}$. We define the reconstruction error (which is similar to the mean squared error we have seen before) as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "J(\\boldsymbol{W},\\boldsymbol{Z}) = \\frac{1}{n}\\sum_i (\\boldsymbol{x}_i - \\overline{\\boldsymbol{x}}_i)^2,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "with $\\overline{\\boldsymbol{x}}_i = \\boldsymbol{W}\\boldsymbol{z}_i$, where $\\boldsymbol{z}_i$ is a row vector with dimension ${\\mathbb{R}}^{n}$ of the matrix\n",
+ "$\\boldsymbol{Z}\\in{\\mathbb{R}}^{p\\times n}$. When doing PCA we want to reduce this dimensionality. \n",
+ "\n",
+ "The PCA theorem states that minimizing the above reconstruction error\n",
+ "corresponds to setting $\\boldsymbol{W}=\\boldsymbol{S}$, the orthogonal matrix which\n",
+ "diagonalizes the empirical covariance(correlation) matrix. The optimal\n",
+ "low-dimensional encoding of the data is then given by a set of vectors\n",
+ "$\\boldsymbol{z}_i$ with at most $l$ vectors, with $l << p$, defined by the\n",
+ "orthogonal projection of the data onto the columns spanned by the\n",
+ "eigenvectors of the covariance(correlations matrix).\n",
+ "\n",
+ "The proof which follows will be updated by mid January 2020.\n",
+ "\n",
+ "\n",
+ "## Proof of the PCA Theorem\n",
+ "\n",
+ "To show the PCA theorem let us start with the assumption that there is one vector $\\boldsymbol{w}_0$ which corresponds to a solution which minimized the reconstruction error $J$. This is an orthogonal vector. It means that we now approximate the reconstruction error in terms of $\\boldsymbol{w}_0$ and $\\boldsymbol{z}_0$ as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "J(\\boldsymbol{w}_0,\\boldsymbol{z}_0)= \\frac{1}{n}\\sum_i (\\boldsymbol{x}_i - z_{i0}\\boldsymbol{w}_0)^2=\\frac{1}{n}\\sum_i (\\boldsymbol{x}_i^T\\boldsymbol{x}_i - 2z_{i0}\\boldsymbol{w}_0^T\\boldsymbol{x}_i+z_{i0}^2\\boldsymbol{w}_0^T\\boldsymbol{w}_0),\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "which we can rewrite due to the orthogonality of $\\boldsymbol{w}_i$ as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "J(\\boldsymbol{w}_0,\\boldsymbol{z}_0)=\\frac{1}{n}\\sum_i (\\boldsymbol{x}_i^T\\boldsymbol{x}_i - 2z_{i0}\\boldsymbol{w}_0^T\\boldsymbol{x}_i+z_{i0}^2).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Minimizing $J$ with respect to the unknown parameters $z_{0i}$ we obtain that"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "z_{i0}=\\boldsymbol{w}_0^T\\boldsymbol{x}_i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where the vectors on the rhs are known. \n",
+ "\n",
+ "\n",
+ "\n",
+ "## PCA Proof continued\n",
+ "\n",
+ "We have now found the unknown parameters $z_{i0}$. These correspond to the projected coordinates and we can write"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "J(\\boldsymbol{w}_0)= \\frac{1}{p}\\sum_i (\\boldsymbol{x}_i^T\\boldsymbol{x}_i - z_{i0}^2)=\\mathrm{const}-\\frac{1}{n}\\sum_i z_{i0}^2.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We can show that the variance of the projected coordinates defined by $\\boldsymbol{w}_0^T\\boldsymbol{x}_i$ are given by"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mathrm{var}[\\boldsymbol{w}_0^T\\boldsymbol{x}_i] = \\frac{1}{n}\\sum_i z_{i0}^2,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "since the expectation value of"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mathbb{E}[\\boldsymbol{w}_0^T\\boldsymbol{x}_i] = \\mathbb{E}[z_{i0}]= \\boldsymbol{w}_0^T\\mathbb{E}[\\boldsymbol{x}_i]=0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where we have used the fact that our data are centered.\n",
+ "\n",
+ "Recalling our definition of the covariance as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x}] = \\frac{1}{n}\\boldsymbol{X}\\boldsymbol{X}^T=\\mathbb{E}[\\boldsymbol{X}\\boldsymbol{X}^T],\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "we have thus that"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mathrm{var}[\\boldsymbol{w}_0^T\\boldsymbol{x}_i] = \\frac{1}{n}\\sum_i z_{i0}^2=\\boldsymbol{w}_0^T\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{w}_0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We are almost there, we have obtained a relation between minimizing\n",
+ "the reconstruction error and the variance and the covariance\n",
+ "matrix. Minimizing the error is equivalent to maximizing the variance\n",
+ "of the projected data.\n",
+ "\n",
+ "\n",
+ "## The final step\n",
+ "\n",
+ "We could trivially maximize the variance of the projection (and\n",
+ "thereby minimize the error in the reconstruction function) by letting\n",
+ "the norm-2 of $\\boldsymbol{w}_0$ go to infinity. However, this norm since we\n",
+ "want the matrix $\\boldsymbol{W}$ to be an orthogonal matrix, is constrained by\n",
+ "$\\vert\\vert \\boldsymbol{w}_0 \\vert\\vert_2^2=1$. Imposing this condition via a\n",
+ "Lagrange multiplier we can then in turn maximize"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "J(\\boldsymbol{w}_0)= \\boldsymbol{w}_0^T\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{w}_0+\\lambda_0(1-\\boldsymbol{w}_0^T\\boldsymbol{w}_0).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Taking the derivative with respect to $\\boldsymbol{w}_0$ we obtain"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial J(\\boldsymbol{w}_0)}{\\partial \\boldsymbol{w}_0}= 2\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{w}_0-2\\lambda_0\\boldsymbol{w}_0=0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "meaning that"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{w}_0=\\lambda_0\\boldsymbol{w}_0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "**The direction that maximizes the variance (or minimizes the construction error) is an eigenvector of the covariance matrix**! If we left multiply with $\\boldsymbol{w}_0^T$ we have the variance of the projected data is"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{w}_0^T\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{w}_0=\\lambda_0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "If we want to maximize the variance (minimize the construction error)\n",
+ "we simply pick the eigenvector of the covariance matrix with the\n",
+ "largest eigenvalue. This establishes the link between the minimization\n",
+ "of the reconstruction function $J$ in terms of an orthogonal matrix\n",
+ "and the maximization of the variance and thereby the covariance of our\n",
+ "observations encoded in the design/feature matrix $\\boldsymbol{X}$.\n",
+ "\n",
+ "The proof\n",
+ "for the other eigenvectors $\\boldsymbol{w}_1,\\boldsymbol{w}_2,\\dots$ can be\n",
+ "established by applying the above arguments and using the fact that\n",
+ "our basis of eigenvectors is orthogonal, see [Murphy chapter\n",
+ "12.2](https://mitpress.mit.edu/books/machine-learning-1). The\n",
+ "discussion in chapter 12.2 of Murphy's text has also a nice link with\n",
+ "the Singular Value Decomposition theorem. For categorical data, see\n",
+ "chapter 12.4 and discussion therein.\n",
+ "\n",
+ "Additional part of the proof for the other eigenvectors will be added by mid January 2020.\n",
+ "\n",
+ "\n",
+ "## Geometric Interpretation and link with Singular Value Decomposition\n",
+ "\n",
+ "This material will be added by mid January 2020.\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Principal Component Analysis\n",
+ "\n",
+ "Principal Component Analysis (PCA) is by far the most popular dimensionality reduction algorithm.\n",
+ "First it identifies the hyperplane that lies closest to the data, and then it projects the data onto it.\n",
+ "\n",
+ "The following Python code uses NumPy’s **svd()** function to obtain all the principal components of the\n",
+ "training set, then extracts the first two principal components. First we center the data using either **pandas** or our own code"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 \n",
+ " 1 \n",
+ " 2 \n",
+ " 3 \n",
+ " 4 \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 \n",
+ " -1.574465 \n",
+ " 0.259153 \n",
+ " 1.197370 \n",
+ " 0.147400 \n",
+ " 0.649382 \n",
+ " \n",
+ " \n",
+ " 1 \n",
+ " 0.689519 \n",
+ " 0.137652 \n",
+ " -1.025709 \n",
+ " 0.210340 \n",
+ " -0.076938 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " -0.282727 \n",
+ " 0.351636 \n",
+ " -0.539261 \n",
+ " 1.216683 \n",
+ " 0.340782 \n",
+ " \n",
+ " \n",
+ " 3 \n",
+ " 0.070889 \n",
+ " -0.614808 \n",
+ " 1.074067 \n",
+ " -0.038300 \n",
+ " -1.450257 \n",
+ " \n",
+ " \n",
+ " 4 \n",
+ " 1.794282 \n",
+ " 1.458078 \n",
+ " -0.207545 \n",
+ " -0.442600 \n",
+ " -0.147420 \n",
+ " \n",
+ " \n",
+ " 5 \n",
+ " 1.112383 \n",
+ " 0.647473 \n",
+ " 1.405890 \n",
+ " 0.073598 \n",
+ " -0.276263 \n",
+ " \n",
+ " \n",
+ " 6 \n",
+ " 0.397700 \n",
+ " -1.526744 \n",
+ " -0.712018 \n",
+ " 1.216290 \n",
+ " 0.418506 \n",
+ " \n",
+ " \n",
+ " 7 \n",
+ " -0.280647 \n",
+ " 1.106095 \n",
+ " -1.646283 \n",
+ " -0.956563 \n",
+ " -1.564374 \n",
+ " \n",
+ " \n",
+ " 8 \n",
+ " -0.369139 \n",
+ " -0.751699 \n",
+ " 0.051649 \n",
+ " -0.213103 \n",
+ " 0.967809 \n",
+ " \n",
+ " \n",
+ " 9 \n",
+ " -1.557795 \n",
+ " -1.066837 \n",
+ " 0.401842 \n",
+ " -1.213743 \n",
+ " 1.138775 \n",
+ " \n",
+ " \n",
+ "
\n",
+ ""
+ ],
+ "text/plain": [
+ " 0 1 2 3 4\n",
+ "0 -1.574465 0.259153 1.197370 0.147400 0.649382\n",
+ "1 0.689519 0.137652 -1.025709 0.210340 -0.076938\n",
+ "2 -0.282727 0.351636 -0.539261 1.216683 0.340782\n",
+ "3 0.070889 -0.614808 1.074067 -0.038300 -1.450257\n",
+ "4 1.794282 1.458078 -0.207545 -0.442600 -0.147420\n",
+ "5 1.112383 0.647473 1.405890 0.073598 -0.276263\n",
+ "6 0.397700 -1.526744 -0.712018 1.216290 0.418506\n",
+ "7 -0.280647 1.106095 -1.646283 -0.956563 -1.564374\n",
+ "8 -0.369139 -0.751699 0.051649 -0.213103 0.967809\n",
+ "9 -1.557795 -1.066837 0.401842 -1.213743 1.138775"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " 0 1 2 3 4\n",
+ "0 0.0 0.0 0.0 0.0 0.0\n",
+ "1 0.0 0.0 0.0 0.0 0.0\n",
+ "2 0.0 0.0 0.0 0.0 0.0\n",
+ "3 0.0 0.0 0.0 0.0 0.0\n",
+ "4 0.0 0.0 0.0 0.0 0.0\n",
+ "5 0.0 0.0 0.0 0.0 0.0\n",
+ "6 0.0 0.0 0.0 0.0 0.0\n",
+ "7 0.0 0.0 0.0 0.0 0.0\n",
+ "8 0.0 0.0 0.0 0.0 0.0\n",
+ "9 0.0 0.0 0.0 0.0 0.0\n",
+ "[[-1.5378811 -0.94639099]\n",
+ " [ 0.86145244 0.89288636]\n",
+ " [-0.00445655 0.81633628]\n",
+ " [ 0.07145103 -1.00433417]\n",
+ " [ 2.03707133 -0.48476997]\n",
+ " [ 0.72174172 -1.4557763 ]\n",
+ " [-0.55854694 1.60673226]\n",
+ " [ 1.6999536 0.43766686]\n",
+ " [-1.10405456 0.31718909]\n",
+ " [-2.18673098 -0.17953942]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "from IPython.display import display\n",
+ "np.random.seed(100)\n",
+ "# setting up a 10 x 5 vanilla matrix \n",
+ "rows = 10\n",
+ "cols = 5\n",
+ "X = np.random.randn(rows,cols)\n",
+ "df = pd.DataFrame(X)\n",
+ "# Pandas does the centering for us\n",
+ "df = df -df.mean()\n",
+ "display(df)\n",
+ "\n",
+ "# we center it ourselves\n",
+ "X_centered = X - X.mean(axis=0)\n",
+ "# Then check the difference between pandas and our own set up\n",
+ "print(X_centered-df)\n",
+ "#Now we do an SVD\n",
+ "U, s, V = np.linalg.svd(X_centered)\n",
+ "c1 = V.T[:, 0]\n",
+ "c2 = V.T[:, 1]\n",
+ "W2 = V.T[:, :2]\n",
+ "X2D = X_centered.dot(W2)\n",
+ "print(X2D)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "PCA assumes that the dataset is centered around the origin. Scikit-Learn’s PCA classes take care of centering\n",
+ "the data for you. However, if you implement PCA yourself (as in the preceding example), or if you use other libraries, don’t\n",
+ "forget to center the data first.\n",
+ "\n",
+ "Once you have identified all the principal components, you can reduce the dimensionality of the dataset\n",
+ "down to $d$ dimensions by projecting it onto the hyperplane defined by the first $d$ principal components.\n",
+ "Selecting this hyperplane ensures that the projection will preserve as much variance as possible."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "W2 = V.T[:, :2]\n",
+ "X2D = X_centered.dot(W2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## PCA and scikit-learn\n",
+ "\n",
+ "Scikit-Learn’s PCA class implements PCA using SVD decomposition just like we did before. The\n",
+ "following code applies PCA to reduce the dimensionality of the dataset down to two dimensions (note\n",
+ "that it automatically takes care of centering the data):"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "[[ 1.5378811 -0.94639099]\n",
+ " [-0.86145244 0.89288636]\n",
+ " [ 0.00445655 0.81633628]\n",
+ " [-0.07145103 -1.00433417]\n",
+ " [-2.03707133 -0.48476997]\n",
+ " [-0.72174172 -1.4557763 ]\n",
+ " [ 0.55854694 1.60673226]\n",
+ " [-1.6999536 0.43766686]\n",
+ " [ 1.10405456 0.31718909]\n",
+ " [ 2.18673098 -0.17953942]]\n"
+ ]
+ }
+ ],
+ "source": [
+ "#thereafter we do a PCA with Scikit-learn\n",
+ "from sklearn.decomposition import PCA\n",
+ "pca = PCA(n_components = 2)\n",
+ "X2D = pca.fit_transform(X)\n",
+ "print(X2D)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "After fitting the PCA transformer to the dataset, you can access the principal components using the\n",
+ "components variable (note that it contains the PCs as horizontal vectors, so, for example, the first\n",
+ "principal component is equal to"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "ename": "SyntaxError",
+ "evalue": "invalid syntax (, line 1)",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[0;36m File \u001b[0;32m\"\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m pca.components_.T[:, 0].\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
+ ]
+ }
+ ],
+ "source": [
+ "pca.components_.T[:, 0]."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Another very useful piece of information is the explained variance ratio of each principal component,\n",
+ "available via the $explained\\_variance\\_ratio$ variable. It indicates the proportion of the dataset’s\n",
+ "variance that lies along the axis of each principal component. \n",
+ "\n",
+ "\n",
+ "## Back to the Cancer Data\n",
+ "We can now repeat the above but applied to real data, in this case our breast cancer data.\n",
+ "Here we compute performance scores on the training data using logistic regression."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "import matplotlib.pyplot as plt\n",
+ "import numpy as np\n",
+ "from sklearn.model_selection import train_test_split \n",
+ "from sklearn.datasets import load_breast_cancer\n",
+ "from sklearn.linear_model import LogisticRegression\n",
+ "cancer = load_breast_cancer()\n",
+ "\n",
+ "X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)\n",
+ "\n",
+ "logreg = LogisticRegression()\n",
+ "logreg.fit(X_train, y_train)\n",
+ "print(\"Train set accuracy from Logistic Regression: {:.2f}\".format(logreg.score(X_train,y_train)))\n",
+ "# We scale the data\n",
+ "from sklearn.preprocessing import StandardScaler\n",
+ "scaler = StandardScaler()\n",
+ "scaler.fit(X_train)\n",
+ "X_train_scaled = scaler.transform(X_train)\n",
+ "X_test_scaled = scaler.transform(X_test)\n",
+ "# Then perform again a log reg fit\n",
+ "logreg.fit(X_train_scaled, y_train)\n",
+ "print(\"Train set accuracy scaled data: {:.2f}\".format(logreg.score(X_train_scaled,y_train)))\n",
+ "#thereafter we do a PCA with Scikit-learn\n",
+ "from sklearn.decomposition import PCA\n",
+ "pca = PCA(n_components = 2)\n",
+ "X2D_train = pca.fit_transform(X_train_scaled)\n",
+ "# and finally compute the log reg fit and the score on the training data\t\n",
+ "logreg.fit(X2D_train,y_train)\n",
+ "print(\"Train set accuracy scaled and PCA data: {:.2f}\".format(logreg.score(X2D_train,y_train)))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We see that our training data after the PCA decomposition has a performance similar to the non-scaled data. \n",
+ "\n",
+ "\n",
+ "## More on the PCA\n",
+ "\n",
+ "Instead of arbitrarily choosing the number of dimensions to reduce down to, it is generally preferable to\n",
+ "choose the number of dimensions that add up to a sufficiently large portion of the variance (e.g., 95%).\n",
+ "Unless, of course, you are reducing dimensionality for data visualization — in that case you will\n",
+ "generally want to reduce the dimensionality down to 2 or 3.\n",
+ "The following code computes PCA without reducing dimensionality, then computes the minimum number\n",
+ "of dimensions required to preserve 95% of the training set’s variance:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "pca = PCA()\n",
+ "pca.fit(X)\n",
+ "cumsum = np.cumsum(pca.explained_variance_ratio_)\n",
+ "d = np.argmax(cumsum >= 0.95) + 1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "You could then set $n\\_components=d$ and run PCA again. However, there is a much better option: instead\n",
+ "of specifying the number of principal components you want to preserve, you can set $n\\_components$ to be\n",
+ "a float between 0.0 and 1.0, indicating the ratio of variance you wish to preserve:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "pca = PCA(n_components=0.95)\n",
+ "X_reduced = pca.fit_transform(X)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Incremental PCA\n",
+ "\n",
+ "One problem with the preceding implementation of PCA is that it requires the whole training set to fit in\n",
+ "memory in order for the SVD algorithm to run. Fortunately, Incremental PCA (IPCA) algorithms have\n",
+ "been developed: you can split the training set into mini-batches and feed an IPCA algorithm one minibatch\n",
+ "at a time. This is useful for large training sets, and also to apply PCA online (i.e., on the fly, as new\n",
+ "instances arrive).\n",
+ "\n",
+ "\n",
+ "## Randomized PCA\n",
+ "\n",
+ "Scikit-Learn offers yet another option to perform PCA, called Randomized PCA. This is a stochastic\n",
+ "algorithm that quickly finds an approximation of the first d principal components. Its computational\n",
+ "complexity is $O(m \\times d^2)+O(d^3)$, instead of $O(m \\times n^2) + O(n^3)$, so it is dramatically faster than the\n",
+ "previous algorithms when $d$ is much smaller than $n$.\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Kernel PCA\n",
+ "\n",
+ "The kernel trick is a mathematical technique that implicitly maps instances into a\n",
+ "very high-dimensional space (called the feature space), enabling nonlinear classification and regression\n",
+ "with Support Vector Machines. Recall that a linear decision boundary in the high-dimensional feature\n",
+ "space corresponds to a complex nonlinear decision boundary in the original space.\n",
+ "It turns out that the same trick can be applied to PCA, making it possible to perform complex nonlinear\n",
+ "projections for dimensionality reduction. This is called Kernel PCA (kPCA). It is often good at\n",
+ "preserving clusters of instances after projection, or sometimes even unrolling datasets that lie close to a\n",
+ "twisted manifold.\n",
+ "For example, the following code uses Scikit-Learn’s KernelPCA class to perform kPCA with an"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "from sklearn.decomposition import KernelPCA\n",
+ "rbf_pca = KernelPCA(n_components = 2, kernel=\"rbf\", gamma=0.04)\n",
+ "X_reduced = rbf_pca.fit_transform(X)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## LLE\n",
+ "\n",
+ "Locally Linear Embedding (LLE) is another very powerful nonlinear dimensionality reduction\n",
+ "(NLDR) technique. It is a Manifold Learning technique that does not rely on projections like the previous\n",
+ "algorithms. In a nutshell, LLE works by first measuring how each training instance linearly relates to its\n",
+ "closest neighbors (c.n.), and then looking for a low-dimensional representation of the training set where\n",
+ "these local relationships are best preserved (more details shortly). \n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Other techniques\n",
+ "\n",
+ "\n",
+ "There are many other dimensionality reduction techniques, several of which are available in Scikit-Learn.\n",
+ "\n",
+ "Here are some of the most popular:\n",
+ "* **Multidimensional Scaling (MDS)** reduces dimensionality while trying to preserve the distances between the instances.\n",
+ "\n",
+ "* **Isomap** creates a graph by connecting each instance to its nearest neighbors, then reduces dimensionality while trying to preserve the geodesic distances between the instances.\n",
+ "\n",
+ "* **t-Distributed Stochastic Neighbor Embedding** (t-SNE) reduces dimensionality while trying to keep similar instances close and dissimilar instances apart. It is mostly used for visualization, in particular to visualize clusters of instances in high-dimensional space (e.g., to visualize the MNIST images in 2D).\n",
+ "\n",
+ "* Linear Discriminant Analysis (LDA) is actually a classification algorithm, but during training it learns the most discriminative axes between the classes, and these axes can then be used to define a hyperplane onto which to project the data. The benefit is that the projection will keep classes as far apart as possible, so LDA is a good technique to reduce dimensionality before running another classification algorithm such as a Support Vector Machine (SVM) classifier discussed in the SVM lectures."
+ ]
+ }
+ ],
+ "metadata": {
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.8.3"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
\ No newline at end of file
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter8.py b/doc/src/LectureNotes/_build/jupyter_execute/chapter8.py
new file mode 100644
index 000000000..3724ed61b
--- /dev/null
+++ b/doc/src/LectureNotes/_build/jupyter_execute/chapter8.py
@@ -0,0 +1,1198 @@
+# Dimensionality Reduction
+
+
+## Reducing the number of degrees of freedom, overarching view
+
+Many Machine Learning problems involve thousands or even millions of
+features for each training instance. Not only does this make training
+extremely slow, it can also make it much harder to find a good
+solution, as we will see. This problem is often referred to as the
+curse of dimensionality. Fortunately, in real-world problems, it is
+often possible to reduce the number of features considerably, turning
+an intractable problem into a tractable one.
+
+Here we will discuss some of the most popular dimensionality reduction
+techniques: the principal component analysis (PCA), Kernel PCA, and
+Locally Linear Embedding (LLE). Furthermore, we will start by looking
+at some simple preprocessing of the data which allow us to rescale the
+data.
+
+Principal component analysis and its various variants deal with the
+problem of fitting a low-dimensional [affine
+subspace](https://en.wikipedia.org/wiki/Affine_space) to a set of of
+data points in a high-dimensional space. With its family of methods it
+is one of the most used tools in data modeling, compression and
+visualization.
+
+
+
+
+
+## Preprocessing our data
+
+Before we proceed however, we will discuss how to preprocess our
+data. Till now and in connection with our previous examples we have
+not met so many cases where we are too sensitive to the scaling of our
+data. Normally the data may need a rescaling and/or may be sensitive
+to extreme values. Scaling the data renders our inputs much more
+suitable for the algorithms we want to employ.
+
+**Scikit-Learn** has several functions which allow us to rescale the
+data, normally resulting in much better results in terms of various
+accuracy scores. The **StandardScaler** function in **Scikit-Learn**
+ensures that for each feature/predictor we study the mean value is
+zero and the variance is one (every column in the design/feature
+matrix). This scaling has the drawback that it does not ensure that
+we have a particular maximum or minimum in our data set. Another
+function included in **Scikit-Learn** is the **MinMaxScaler** which
+ensures that all features are exactly between $0$ and $1$. The
+
+
+## More preprocessing
+
+
+The **Normalizer** scales each data
+point such that the feature vector has a euclidean length of one. In other words, it
+projects a data point on the circle (or sphere in the case of higher dimensions) with a
+radius of 1. This means every data point is scaled by a different number (by the
+inverse of it’s length).
+This normalization is often used when only the direction (or angle) of the data matters,
+not the length of the feature vector.
+
+The **RobustScaler** works similarly to the StandardScaler in that it
+ensures statistical properties for each feature that guarantee that
+they are on the same scale. However, the RobustScaler uses the median
+and quartiles, instead of mean and variance. This makes the
+RobustScaler ignore data points that are very different from the rest
+(like measurement errors). These odd data points are also called
+outliers, and might often lead to trouble for other scaling
+techniques.
+
+
+
+
+## Simple preprocessing examples, Franke function and regression
+
+%matplotlib inline
+
+# Common imports
+import os
+import numpy as np
+import pandas as pd
+import matplotlib.pyplot as plt
+import sklearn.linear_model as skl
+from sklearn.metrics import mean_squared_error
+from sklearn.model_selection import train_test_split
+from sklearn.preprocessing import MinMaxScaler, StandardScaler, Normalizer
+from sklearn.svm import SVR
+
+# Where to save the figures and data files
+PROJECT_ROOT_DIR = "Results"
+FIGURE_ID = "Results/FigureFiles"
+DATA_ID = "DataFiles/"
+
+if not os.path.exists(PROJECT_ROOT_DIR):
+ os.mkdir(PROJECT_ROOT_DIR)
+
+if not os.path.exists(FIGURE_ID):
+ os.makedirs(FIGURE_ID)
+
+if not os.path.exists(DATA_ID):
+ os.makedirs(DATA_ID)
+
+def image_path(fig_id):
+ return os.path.join(FIGURE_ID, fig_id)
+
+def data_path(dat_id):
+ return os.path.join(DATA_ID, dat_id)
+
+def save_fig(fig_id):
+ plt.savefig(image_path(fig_id) + ".png", format='png')
+
+
+def FrankeFunction(x,y):
+ term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))
+ term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))
+ term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))
+ term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)
+ return term1 + term2 + term3 + term4
+
+
+def create_X(x, y, n ):
+ if len(x.shape) > 1:
+ x = np.ravel(x)
+ y = np.ravel(y)
+
+ N = len(x)
+ l = int((n+1)*(n+2)/2) # Number of elements in beta
+ X = np.ones((N,l))
+
+ for i in range(1,n+1):
+ q = int((i)*(i+1)/2)
+ for k in range(i+1):
+ X[:,q+k] = (x**(i-k))*(y**k)
+
+ return X
+
+
+# Making meshgrid of datapoints and compute Franke's function
+n = 5
+N = 1000
+x = np.sort(np.random.uniform(0, 1, N))
+y = np.sort(np.random.uniform(0, 1, N))
+z = FrankeFunction(x, y)
+X = create_X(x, y, n=n)
+# split in training and test data
+X_train, X_test, y_train, y_test = train_test_split(X,z,test_size=0.2)
+
+
+svm = SVR(gamma='auto',C=10.0)
+svm.fit(X_train, y_train)
+
+# The mean squared error and R2 score
+print("MSE before scaling: {:.2f}".format(mean_squared_error(svm.predict(X_test), y_test)))
+print("R2 score before scaling {:.2f}".format(svm.score(X_test,y_test)))
+
+scaler = StandardScaler()
+scaler.fit(X_train)
+X_train_scaled = scaler.transform(X_train)
+X_test_scaled = scaler.transform(X_test)
+
+print("Feature min values before scaling:\n {}".format(X_train.min(axis=0)))
+print("Feature max values before scaling:\n {}".format(X_train.max(axis=0)))
+
+print("Feature min values after scaling:\n {}".format(X_train_scaled.min(axis=0)))
+print("Feature max values after scaling:\n {}".format(X_train_scaled.max(axis=0)))
+
+svm = SVR(gamma='auto',C=10.0)
+svm.fit(X_train_scaled, y_train)
+
+print("MSE after scaling: {:.2f}".format(mean_squared_error(svm.predict(X_test_scaled), y_test)))
+print("R2 score for scaled data: {:.2f}".format(svm.score(X_test_scaled,y_test)))
+
+## Simple preprocessing examples, breast cancer data and classification, Support Vector Machines
+
+We show here how we can use a simple regression case on the breast
+cancer data using support vector machines (SVM) as algorithm for
+classification.
+
+import matplotlib.pyplot as plt
+import numpy as np
+from sklearn.model_selection import train_test_split
+from sklearn.datasets import load_breast_cancer
+from sklearn.svm import SVC
+cancer = load_breast_cancer()
+
+X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)
+print(X_train.shape)
+print(X_test.shape)
+
+svm = SVC(C=100)
+svm.fit(X_train, y_train)
+print("Test set accuracy: {:.2f}".format(svm.score(X_test,y_test)))
+
+from sklearn.preprocessing import MinMaxScaler, StandardScaler
+scaler = MinMaxScaler()
+scaler.fit(X_train)
+X_train_scaled = scaler.transform(X_train)
+X_test_scaled = scaler.transform(X_test)
+
+print("Feature min values before scaling:\n {}".format(X_train.min(axis=0)))
+print("Feature max values before scaling:\n {}".format(X_train.max(axis=0)))
+
+print("Feature min values before scaling:\n {}".format(X_train_scaled.min(axis=0)))
+print("Feature max values before scaling:\n {}".format(X_train_scaled.max(axis=0)))
+
+
+svm.fit(X_train_scaled, y_train)
+print("Test set accuracy scaled data with Min-Max scaling: {:.2f}".format(svm.score(X_test_scaled,y_test)))
+
+scaler = StandardScaler()
+scaler.fit(X_train)
+X_train_scaled = scaler.transform(X_train)
+X_test_scaled = scaler.transform(X_test)
+
+svm.fit(X_train_scaled, y_train)
+print("Test set accuracy scaled data with Standar Scaler: {:.2f}".format(svm.score(X_test_scaled,y_test)))
+
+## More on Cancer Data, now with Logistic Regression
+
+import matplotlib.pyplot as plt
+import numpy as np
+from sklearn.model_selection import train_test_split
+from sklearn.datasets import load_breast_cancer
+from sklearn.linear_model import LogisticRegression
+cancer = load_breast_cancer()
+
+# Set up training data
+X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)
+logreg = LogisticRegression()
+logreg.fit(X_train, y_train)
+print("Test set accuracy: {:.2f}".format(logreg.score(X_test,y_test)))
+
+# Scale data
+from sklearn.preprocessing import StandardScaler
+scaler = StandardScaler()
+scaler.fit(X_train)
+X_train_scaled = scaler.transform(X_train)
+X_test_scaled = scaler.transform(X_test)
+logreg.fit(X_train_scaled, y_train)
+print("Test set accuracy scaled data: {:.2f}".format(logreg.score(X_test_scaled,y_test)))
+
+## Why should we think of reducing the dimensionality
+
+In addition to the plot of the features, we study now also the covariance (and the correlation matrix).
+We use also **Pandas** to compute the correlation matrix.
+
+import matplotlib.pyplot as plt
+import numpy as np
+from sklearn.model_selection import train_test_split
+from sklearn.datasets import load_breast_cancer
+from sklearn.linear_model import LogisticRegression
+cancer = load_breast_cancer()
+import pandas as pd
+# Making a data frame
+cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names)
+
+fig, axes = plt.subplots(15,2,figsize=(10,20))
+malignant = cancer.data[cancer.target == 0]
+benign = cancer.data[cancer.target == 1]
+ax = axes.ravel()
+
+for i in range(30):
+ _, bins = np.histogram(cancer.data[:,i], bins =50)
+ ax[i].hist(malignant[:,i], bins = bins, alpha = 0.5)
+ ax[i].hist(benign[:,i], bins = bins, alpha = 0.5)
+ ax[i].set_title(cancer.feature_names[i])
+ ax[i].set_yticks(())
+ax[0].set_xlabel("Feature magnitude")
+ax[0].set_ylabel("Frequency")
+ax[0].legend(["Malignant", "Benign"], loc ="best")
+fig.tight_layout()
+plt.show()
+
+import seaborn as sns
+correlation_matrix = cancerpd.corr().round(1)
+# use the heatmap function from seaborn to plot the correlation matrix
+# annot = True to print the values inside the square
+sns.heatmap(data=correlation_matrix, annot=True)
+plt.show()
+
+#print eigvalues of correlation matrix
+EigValues, EigVectors = np.linalg.eig(correlation_matrix)
+print(EigValues)
+
+In the above example we note two things. In the first plot we display
+the overlap of benign and malignant tumors as functions of the various
+features in the Wisconsing breast cancer data set. We see that for
+some of the features we can distinguish clearly the benign and
+malignant cases while for other features we cannot. This can point to
+us which features may be of greater interest when we wish to classify
+a benign or not benign tumour.
+
+In the second figure we have computed the so-called correlation
+matrix, which in our case with thirty features becomes a $30\times 30$
+matrix.
+
+We constructed this matrix using **pandas** via the statements
+
+cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names)
+
+and then
+
+correlation_matrix = cancerpd.corr().round(1)
+
+Diagonalizing this matrix we can in turn say something about which
+features are of relevance and which are not. But before we proceed we
+need to define covariance and correlation matrices. This leads us to
+the classical Principal Component Analysis (PCA) theorem with
+applications.
+
+
+
+
+## Basic ideas of the Principal Component Analysis (PCA)
+
+The principal component analysis deals with the problem of fitting a
+low-dimensional affine subspace $S$ of dimension $d$ much smaller than
+the totaldimension $D$ of the problem at hand (our data
+set). Mathematically it can be formulated as a statistical problem or
+a geometric problem. In our discussion of the theorem for the
+classical PCA, we will stay with a statistical approach. This is also
+what set the scene historically which for the PCA.
+
+We have a data set defined by a design/feature matrix $\boldsymbol{X}$ (see below for its definition)
+* Each data point is determined by $p$ extrinsic (measurement) variables
+
+* We may want to ask the following question: Are there fewer intrinsic variables (say $d << p$) that still approximately describe the data?
+
+* If so, these intrinsic variables may tell us something important and finding these intrinsic variables is what dimension reduction methods do.
+
+## Introducing the Covariance and Correlation functions
+
+Before we discuss the PCA theorem, we need to remind ourselves about
+the definition of the covariance and the correlation function. These are quantities
+
+Suppose we have defined two vectors
+$\hat{x}$ and $\hat{y}$ with $n$ elements each. The covariance matrix $\boldsymbol{C}$ is defined as
+
+$$
+\boldsymbol{C}[\boldsymbol{x},\boldsymbol{y}] = \begin{bmatrix} \mathrm{cov}[\boldsymbol{x},\boldsymbol{x}] & \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] \\
+ \mathrm{cov}[\boldsymbol{y},\boldsymbol{x}] & \mathrm{cov}[\boldsymbol{y},\boldsymbol{y}] \\
+ \end{bmatrix},
+$$
+
+where for example
+
+$$
+\mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] =\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})(y_i- \overline{y}).
+$$
+
+With this definition and recalling that the variance is defined as
+
+$$
+\mathrm{var}[\boldsymbol{x}]=\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})^2,
+$$
+
+we can rewrite the covariance matrix as
+
+$$
+\boldsymbol{C}[\boldsymbol{x},\boldsymbol{y}] = \begin{bmatrix} \mathrm{var}[\boldsymbol{x}] & \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] \\
+ \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] & \mathrm{var}[\boldsymbol{y}] \\
+ \end{bmatrix}.
+$$
+
+The covariance takes values between zero and infinity and may thus
+lead to problems with loss of numerical precision for particularly
+large values. It is common to scale the covariance matrix by
+introducing instead the correlation matrix defined via the so-called
+correlation function
+
+$$
+\mathrm{corr}[\boldsymbol{x},\boldsymbol{y}]=\frac{\mathrm{cov}[\boldsymbol{x},\boldsymbol{y}]}{\sqrt{\mathrm{var}[\boldsymbol{x}] \mathrm{var}[\boldsymbol{y}]}}.
+$$
+
+The correlation function is then given by values $\mathrm{corr}[\boldsymbol{x},\boldsymbol{y}]
+\in [-1,1]$. This avoids eventual problems with too large values. We
+can then define the correlation matrix for the two vectors $\boldsymbol{x}$
+and $\boldsymbol{y}$ as
+
+$$
+\boldsymbol{K}[\boldsymbol{x},\boldsymbol{y}] = \begin{bmatrix} 1 & \mathrm{corr}[\boldsymbol{x},\boldsymbol{y}] \\
+ \mathrm{corr}[\boldsymbol{y},\boldsymbol{x}] & 1 \\
+ \end{bmatrix},
+$$
+
+In the above example this is the function we constructed using **pandas**.
+
+
+## Correlation Function and Design/Feature Matrix
+
+In our derivation of the various regression algorithms like **Ordinary Least Squares** or **Ridge regression**
+we defined the design/feature matrix $\boldsymbol{X}$ as
+
+$$
+\boldsymbol{X}=\begin{bmatrix}
+x_{0,0} & x_{0,1} & x_{0,2}& \dots & \dots x_{0,p-1}\\
+x_{1,0} & x_{1,1} & x_{1,2}& \dots & \dots x_{1,p-1}\\
+x_{2,0} & x_{2,1} & x_{2,2}& \dots & \dots x_{2,p-1}\\
+\dots & \dots & \dots & \dots \dots & \dots \\
+x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \dots & \dots x_{n-2,p-1}\\
+x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \dots & \dots x_{n-1,p-1}\\
+\end{bmatrix},
+$$
+
+with $\boldsymbol{X}\in {\mathbb{R}}^{n\times p}$, with the predictors/features $p$ refering to the column numbers and the
+entries $n$ being the row elements.
+We can rewrite the design/feature matrix in terms of its column vectors as
+
+$$
+\boldsymbol{X}=\begin{bmatrix} \boldsymbol{x}_0 & \boldsymbol{x}_1 & \boldsymbol{x}_2 & \dots & \dots & \boldsymbol{x}_{p-1}\end{bmatrix},
+$$
+
+with a given vector
+
+$$
+\boldsymbol{x}_i^T = \begin{bmatrix}x_{0,i} & x_{1,i} & x_{2,i}& \dots & \dots x_{n-1,i}\end{bmatrix}.
+$$
+
+With these definitions, we can now rewrite our $2\times 2$
+correaltion/covariance matrix in terms of a moe general design/feature
+matrix $\boldsymbol{X}\in {\mathbb{R}}^{n\times p}$. This leads to a $p\times p$
+covariance matrix for the vectors $\boldsymbol{x}_i$ with $i=0,1,\dots,p-1$
+
+$$
+\boldsymbol{C}[\boldsymbol{x}] = \begin{bmatrix}
+\mathrm{var}[\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_1] & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_2] & \dots & \dots & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_{p-1}]\\
+\mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_0] & \mathrm{var}[\boldsymbol{x}_1] & \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_2] & \dots & \dots & \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_{p-1}]\\
+\mathrm{cov}[\boldsymbol{x}_2,\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_2,\boldsymbol{x}_1] & \mathrm{var}[\boldsymbol{x}_2] & \dots & \dots & \mathrm{cov}[\boldsymbol{x}_2,\boldsymbol{x}_{p-1}]\\
+\dots & \dots & \dots & \dots & \dots & \dots \\
+\dots & \dots & \dots & \dots & \dots & \dots \\
+\mathrm{cov}[\boldsymbol{x}_{p-1},\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_{p-1},\boldsymbol{x}_1] & \mathrm{cov}[\boldsymbol{x}_{p-1},\boldsymbol{x}_{2}] & \dots & \dots & \mathrm{var}[\boldsymbol{x}_{p-1}]\\
+\end{bmatrix},
+$$
+
+and the correlation matrix
+
+$$
+\boldsymbol{K}[\boldsymbol{x}] = \begin{bmatrix}
+1 & \mathrm{corr}[\boldsymbol{x}_0,\boldsymbol{x}_1] & \mathrm{corr}[\boldsymbol{x}_0,\boldsymbol{x}_2] & \dots & \dots & \mathrm{corr}[\boldsymbol{x}_0,\boldsymbol{x}_{p-1}]\\
+\mathrm{corr}[\boldsymbol{x}_1,\boldsymbol{x}_0] & 1 & \mathrm{corr}[\boldsymbol{x}_1,\boldsymbol{x}_2] & \dots & \dots & \mathrm{corr}[\boldsymbol{x}_1,\boldsymbol{x}_{p-1}]\\
+\mathrm{corr}[\boldsymbol{x}_2,\boldsymbol{x}_0] & \mathrm{corr}[\boldsymbol{x}_2,\boldsymbol{x}_1] & 1 & \dots & \dots & \mathrm{corr}[\boldsymbol{x}_2,\boldsymbol{x}_{p-1}]\\
+\dots & \dots & \dots & \dots & \dots & \dots \\
+\dots & \dots & \dots & \dots & \dots & \dots \\
+\mathrm{corr}[\boldsymbol{x}_{p-1},\boldsymbol{x}_0] & \mathrm{corr}[\boldsymbol{x}_{p-1},\boldsymbol{x}_1] & \mathrm{corr}[\boldsymbol{x}_{p-1},\boldsymbol{x}_{2}] & \dots & \dots & 1\\
+\end{bmatrix},
+$$
+
+## Covariance Matrix Examples
+
+
+The Numpy function **np.cov** calculates the covariance elements using
+the factor $1/(n-1)$ instead of $1/n$ since it assumes we do not have
+the exact mean values. The following simple function uses the
+**np.vstack** function which takes each vector of dimension $1\times n$
+and produces a $2\times n$ matrix $\boldsymbol{W}$
+
+$$
+\boldsymbol{W} = \begin{bmatrix} x_0 & y_0 \\
+ x_1 & y_1 \\
+ x_2 & y_2\\
+ \dots & \dots \\
+ x_{n-2} & y_{n-2}\\
+ x_{n-1} & y_{n-1} &
+ \end{bmatrix},
+$$
+
+which in turn is converted into into the $2\times 2$ covariance matrix
+$\boldsymbol{C}$ via the Numpy function **np.cov()**. We note that we can also calculate
+the mean value of each set of samples $\boldsymbol{x}$ etc using the Numpy
+function **np.mean(x)**. We can also extract the eigenvalues of the
+covariance matrix through the **np.linalg.eig()** function.
+
+# Importing various packages
+import numpy as np
+n = 100
+x = np.random.normal(size=n)
+print(np.mean(x))
+y = 4+3*x+np.random.normal(size=n)
+print(np.mean(y))
+W = np.vstack((x, y))
+C = np.cov(W)
+print(C)
+
+## Correlation Matrix
+
+The previous example can be converted into the correlation matrix by
+simply scaling the matrix elements with the variances. We should also
+subtract the mean values for each column. This leads to the following
+code which sets up the correlations matrix for the previous example in
+a more brute force way. Here we scale the mean values for each column of the design matrix, calculate the relevant mean values and variances and then finally set up the $2\times 2$ correlation matrix (since we have only two vectors).
+
+import numpy as np
+n = 100
+# define two vectors
+x = np.random.random(size=n)
+y = 4+3*x+np.random.normal(size=n)
+#scaling the x and y vectors
+x = x - np.mean(x)
+y = y - np.mean(y)
+variance_x = np.sum(x@x)/n
+variance_y = np.sum(y@y)/n
+print(variance_x)
+print(variance_y)
+cov_xy = np.sum(x@y)/n
+cov_xx = np.sum(x@x)/n
+cov_yy = np.sum(y@y)/n
+C = np.zeros((2,2))
+C[0,0]= cov_xx/variance_x
+C[1,1]= cov_yy/variance_y
+C[0,1]= cov_xy/np.sqrt(variance_y*variance_x)
+C[1,0]= C[0,1]
+print(C)
+
+We see that the matrix elements along the diagonal are one as they
+should be and that the matrix is symmetric. Furthermore, diagonalizing
+this matrix we easily see that it is a positive definite matrix.
+
+The above procedure with **numpy** can be made more compact if we use **pandas**.
+
+
+## Correlation Matrix with Pandas
+
+We whow here how we can set up the correlation matrix using **pandas**, as done in this simple code
+
+import numpy as np
+import pandas as pd
+n = 10
+x = np.random.normal(size=n)
+x = x - np.mean(x)
+y = 4+3*x+np.random.normal(size=n)
+y = y - np.mean(y)
+X = (np.vstack((x, y))).T
+print(X)
+Xpd = pd.DataFrame(X)
+print(Xpd)
+correlation_matrix = Xpd.corr()
+print(correlation_matrix)
+
+We expand this model to the Franke function discussed above.
+
+
+## Correlation Matrix with Pandas and the Franke function
+
+# Common imports
+import numpy as np
+import pandas as pd
+
+
+def FrankeFunction(x,y):
+ term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))
+ term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))
+ term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))
+ term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)
+ return term1 + term2 + term3 + term4
+
+
+def create_X(x, y, n ):
+ if len(x.shape) > 1:
+ x = np.ravel(x)
+ y = np.ravel(y)
+
+ N = len(x)
+ l = int((n+1)*(n+2)/2) # Number of elements in beta
+ X = np.ones((N,l))
+
+ for i in range(1,n+1):
+ q = int((i)*(i+1)/2)
+ for k in range(i+1):
+ X[:,q+k] = (x**(i-k))*(y**k)
+
+ return X
+
+
+# Making meshgrid of datapoints and compute Franke's function
+n = 4
+N = 100
+x = np.sort(np.random.uniform(0, 1, N))
+y = np.sort(np.random.uniform(0, 1, N))
+z = FrankeFunction(x, y)
+X = create_X(x, y, n=n)
+
+Xpd = pd.DataFrame(X)
+# subtract the mean values and set up the covariance matrix
+Xpd = Xpd - Xpd.mean()
+covariance_matrix = Xpd.cov()
+print(covariance_matrix)
+
+We note here that the covariance is zero for the first rows and
+columns since all matrix elements in the design matrix were set to one
+(we are fitting the function in terms of a polynomial of degree $n$).
+
+This means that the variance for these elements will be zero and will
+cause problems when we set up the correlation matrix. We can simply
+drop these elements and construct a correlation
+matrix without these elements.
+
+
+
+## Rewriting the Covariance and/or Correlation Matrix
+
+We can rewrite the covariance matrix in a more compact form in terms of the design/feature matrix $\boldsymbol{X}$ as
+
+$$
+\boldsymbol{C}[\boldsymbol{x}] = \frac{1}{n}\boldsymbol{X}\boldsymbol{X}^T= \mathbb{E}[\boldsymbol{X}\boldsymbol{X}^T].
+$$
+
+To see this let us simply look at a design matrix $\boldsymbol{X}\in {\mathbb{R}}^{2\times 2}$
+
+$$
+\boldsymbol{X}=\begin{bmatrix}
+x_{00} & x_{01}\\
+x_{10} & x_{11}\\
+\end{bmatrix}=\begin{bmatrix}
+\boldsymbol{x}_{0} & \boldsymbol{x}_{1}\\
+\end{bmatrix}.
+$$
+
+If we then compute the expectation value
+
+$$
+\mathbb{E}[\boldsymbol{X}\boldsymbol{X}^T] = \frac{1}{n}\boldsymbol{X}\boldsymbol{X}^T=\begin{bmatrix}
+x_{00}^2+x_{01}^2 & x_{00}x_{10}+x_{01}x_{11}\\
+x_{10}x_{00}+x_{11}x_{01} & x_{10}^2+x_{11}^2\\
+\end{bmatrix},
+$$
+
+which is just
+
+$$
+\boldsymbol{C}[\boldsymbol{x}_0,\boldsymbol{x}_1] = \boldsymbol{C}[\boldsymbol{x}]=\begin{bmatrix} \mathrm{var}[\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_1] \\
+ \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_0] & \mathrm{var}[\boldsymbol{x}_1] \\
+ \end{bmatrix},
+$$
+
+where we wrote $$\boldsymbol{C}[\boldsymbol{x}_0,\boldsymbol{x}_1] = \boldsymbol{C}[\boldsymbol{x}]$$ to indicate that this the covariance of the vectors $\boldsymbol{x}$ of the design/feature matrix $\boldsymbol{X}$.
+
+It is easy to generalize this to a matrix $\boldsymbol{X}\in {\mathbb{R}}^{n\times p}$.
+
+
+
+## Towards the PCA theorem
+
+We have that the covariance matrix (the correlation matrix involves a simple rescaling) is given as
+
+$$
+\boldsymbol{C}[\boldsymbol{x}] = \frac{1}{n}\boldsymbol{X}\boldsymbol{X}^T= \mathbb{E}[\boldsymbol{X}\boldsymbol{X}^T].
+$$
+
+Let us now assume that we can perform a series of orthogonal transformations where we employ some orthogonal matrices $\boldsymbol{S}$.
+These matrices are defined as $\boldsymbol{S}\in {\mathbb{R}}^{p\times p}$ and obey the orthogonality requirements $\boldsymbol{S}\boldsymbol{S}^T=\boldsymbol{S}^T\boldsymbol{S}=\boldsymbol{I}$. The matrix can be written out in terms of the column vectors $\boldsymbol{s}_i$ as $\boldsymbol{S}=[\boldsymbol{s}_0,\boldsymbol{s}_1,\dots,\boldsymbol{s}_{p-1}]$ and $\boldsymbol{s}_i \in {\mathbb{R}}^{p}$.
+
+Assume also that there is a transformation $\boldsymbol{S}\boldsymbol{C}[\boldsymbol{x}]\boldsymbol{S}^T=\boldsymbol{C}[\boldsymbol{y}]$ such that the new matrix $\boldsymbol{C}[\boldsymbol{y}]$ is diagonal with elements $[\lambda_0,\lambda_1,\lambda_2,\dots,\lambda_{p-1}]$.
+
+That is we have
+
+$$
+\boldsymbol{C}[\boldsymbol{y}] = \mathbb{E}[\boldsymbol{S}\boldsymbol{X}\boldsymbol{X}^T\boldsymbol{S}^T]=\boldsymbol{S}\boldsymbol{C}[\boldsymbol{x}]\boldsymbol{S}^T,
+$$
+
+since the matrix $\boldsymbol{S}$ is not a data dependent matrix. Multiplying with $\boldsymbol{S}^T$ from the left we have
+
+$$
+\boldsymbol{S}^T\boldsymbol{C}[\boldsymbol{y}] = \boldsymbol{C}[\boldsymbol{x}]\boldsymbol{S}^T,
+$$
+
+and since $\boldsymbol{C}[\boldsymbol{y}]$ is diagonal we have for a given eigenvalue $i$ of the covariance matrix that
+
+$$
+\boldsymbol{S}^T_i\lambda_i = \boldsymbol{C}[\boldsymbol{x}]\boldsymbol{S}^T_i.
+$$
+
+In the derivation of the PCA theorem we will assume that the eigenvalues are ordered in descending order, that is
+$\lambda_0 > \lambda_1 > \dots > \lambda_{p-1}$.
+
+
+The eigenvalues tell us then how much we need to stretch the
+corresponding eigenvectors. Dimensions with large eigenvalues have
+thus large variations (large variance) and define therefore useful
+dimensions. The data points are more spread out in the direction of
+these eigenvectors. Smaller eigenvalues mean on the other hand that
+the corresponding eigenvectors are shrunk accordingly and the data
+points are tightly bunched together and there is not much variation in
+these specific directions. Hopefully then we could leave it out
+dimensions where the eigenvalues are very small. If $p$ is very large,
+we could then aim at reducing $p$ to $l << p$ and handle only $l$
+features/predictors.
+
+
+## The Algorithm before theorem
+
+Here's how we would proceed in setting up the algorithm for the PCA, see also discussion below here.
+* Set up the datapoints for the design/feature matrix $\boldsymbol{X}$ with $\boldsymbol{X}\in {\mathbb{R}}^{n\times p}$, with the predictors/features $p$ referring to the column numbers and the entries $n$ being the row elements.
+
+$$
+\boldsymbol{X}=\begin{bmatrix}
+x_{0,0} & x_{0,1} & x_{0,2}& \dots & \dots x_{0,p-1}\\
+x_{1,0} & x_{1,1} & x_{1,2}& \dots & \dots x_{1,p-1}\\
+x_{2,0} & x_{2,1} & x_{2,2}& \dots & \dots x_{2,p-1}\\
+\dots & \dots & \dots & \dots \dots & \dots \\
+x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \dots & \dots x_{n-2,p-1}\\
+x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \dots & \dots x_{n-1,p-1}\\
+\end{bmatrix},
+$$
+
+* Center the data by subtracting the mean value for each column. This leads to a new matrix $\boldsymbol{X}\rightarrow \overline{\boldsymbol{X}}$.
+
+* Compute then the covariance/correlation matrix $\mathbb{E}[\overline{\boldsymbol{X}}\overline{\boldsymbol{X}}^T]$.
+
+* Find the eigenpairs of $\boldsymbol{C}$ with eigenvalues $[\lambda_0,\lambda_1,\dots,\lambda_{p-1}]$ and eigenvectors $[\boldsymbol{s}_0,\boldsymbol{s}_1,\dots,\boldsymbol{s}_{p-1}]$.
+
+* Order the eigenvalue (and the eigenvectors accordingly) in order of decreasing eigenvalues.
+
+* Keep only those $l$ eigenvalues larger than a selected threshold value, discarding thus $p-l$ features since we expect small variations in the data here.
+
+## Writing our own PCA code
+
+We will use a simple example first with two-dimensional data
+drawn from a multivariate normal distribution with the following mean and covariance matrix:
+
+$$
+\mu = (-1,2) \qquad \Sigma = \begin{bmatrix} 4 & 2 \\
+2 & 2
+\end{bmatrix}
+$$
+
+Note that the mean refers to each column of data.
+We will generate $n = 1000$ points $X = \{ x_1, \ldots, x_N \}$ from
+this distribution, and store them in the $1000 \times 2$ matrix $\boldsymbol{X}$.
+
+The following Python code aids in setting up the data and writing out the design matrix.
+Note that the function **multivariate** returns also the covariance discussed above and that it is defined by dividing by $n-1$ instead of $n$.
+
+import numpy as np
+import pandas as pd
+import matplotlib.pyplot as plt
+from IPython.display import display
+n = 10000
+mean = (-1, 2)
+cov = [[4, 2], [2, 2]]
+X = np.random.multivariate_normal(mean, cov, n)
+
+Now we are going to implement the PCA algorithm. We will break it down into various substeps.
+
+### Compute the sample mean and center the data
+
+The first step of PCA is to compute the sample mean of the data and use it to center the data. Recall that the sample mean is
+
+$$
+\mu_n = \frac{1}{n} \sum_{i=1}^n x_i
+$$
+
+and the mean-centered data $\bar{X} = \{ \bar{x}_1, \ldots, \bar{x}_n \}$ takes the form
+
+$$
+\bar{x}_i = x_i - \mu_n.
+$$
+
+When you are done with these steps, print out $\mu_n$ to verify it is
+close to $\mu$ and plot your mean centered data to verify it is
+centered at the origin! Compare your code with the functionality from **Scikit-Learn** discussed above.
+The following code elements perform these operations using **pandas** or using our own functionality for doing so. The latter, using **numpy** is rather simple through the **mean()** function.
+
+df = pd.DataFrame(X)
+# Pandas does the centering for us
+df = df -df.mean()
+# we center it ourselves
+X_centered = X - X.mean(axis=0)
+
+Alternatively, we could use the functions we discussed
+earlier for scaling the data set. That is, we could have used the
+**StandardScaler** function in **Scikit-Learn**, a function which ensures
+that for each feature/predictor we study the mean value is zero and
+the variance is one (every column in the design/feature matrix). You
+would then not get the same results, since we divide by the
+variance. The diagonal covariance matrix elements will then be one,
+while the non-diagonal ones need to be divided by $2\sqrt{2}$ for our
+specific case.
+
+### Compute the sample covariance
+
+Now we are going to use the mean centered data to compute the sample covariance of the data by using the following equation
+
+$$
+\Sigma_n = \frac{1}{n-1} \sum_{i=1}^n \bar{x}_i^T \bar{x}_i = \frac{1}{n-1} \sum_{i=1}^n (x_i - \mu_n)^T (x_i - \mu_n)
+$$
+
+where the data points $x_i \in \mathbb{R}^p$ (here in this example $p = 2$) are column vectors and $x^T$ is the transpose of $x$.
+We can write our own code or simply use either the functionaly of **numpy** or that of **pandas**, as follows
+
+print(df.cov())
+print(np.cov(X_centered.T))
+
+Note that the way we define the covariance matrix here has a factor $n-1$ instead of $n$. This is included in the **cov()** function by **numpy** and **pandas**.
+Our own code here is not very elegant and asks for obvious improvements. It is tailored to this specific $2\times 2$ covariance matrix.
+
+# extract the relevant columns from the centered design matrix of dim n x 2
+x = X_centered[:,0]
+y = X_centered[:,1]
+Cov = np.zeros((2,2))
+Cov[0,1] = np.sum(x.T@y)/(n-1.0)
+Cov[0,0] = np.sum(x.T@x)/(n-1.0)
+Cov[1,1] = np.sum(y.T@y)/(n-1.0)
+Cov[1,0]= Cov[0,1]
+print("Centered covariance using own code")
+print(Cov)
+plt.plot(x, y, 'x')
+plt.axis('equal')
+plt.show()
+
+Depending on the number of points $n$, we will get results that are close to the covariance values defined above.
+The plot shows how the data are clustered around a line with slope close to one. Is this expected?
+
+### Diagonalize the sample covariance matrix to obtain the principal components
+
+Now we are ready to solve for the principal components! To do so we
+diagonalize the sample covariance matrix $\Sigma$. We can use the
+function **np.linalg.eig** to do so. It will return the eigenvalues and
+eigenvectors of $\Sigma$. Once we have these we can perform the
+following tasks:
+
+* We compute the percentage of the total variance captured by the first principal component
+
+* We plot the mean centered data and lines along the first and second principal components
+
+* Then we project the mean centered data onto the first and second principal components, and plot the projected data.
+
+* Finally, we approximate the data as
+
+$$
+x_i \approx \tilde{x}_i = \mu_n + \langle x_i, v_0 \rangle v_0
+$$
+
+where $v_0$ is the first principal component.
+
+Collecting all these steps we can write our own PCA function and
+compare this with the functionality included in **Scikit-Learn**.
+
+The code here outlines some of the elements we could include in the
+analysis. Feel free to extend upon this in order to address the above
+questions.
+
+# diagonalize and obtain eigenvalues, not necessarily sorted
+EigValues, EigVectors = np.linalg.eig(Cov)
+# sort eigenvectors and eigenvalues
+#permute = EigValues.argsort()
+#EigValues = EigValues[permute]
+#EigVectors = EigVectors[:,permute]
+print("Eigenvalues of Covariance matrix")
+for i in range(2):
+ print(EigValues[i])
+FirstEigvector = EigVectors[:,0]
+SecondEigvector = EigVectors[:,1]
+print("First eigenvector")
+print(FirstEigvector)
+print("Second eigenvector")
+print(SecondEigvector)
+#thereafter we do a PCA with Scikit-learn
+from sklearn.decomposition import PCA
+pca = PCA(n_components = 2)
+X2Dsl = pca.fit_transform(X)
+print("Eigenvector of largest eigenvalue")
+print(pca.components_.T[:, 0])
+
+This code does not contain all the above elements, but it shows how we can use **Scikit-Learn** to extract the eigenvector which corresponds to the largest eigenvalue. Try to address the questions we pose before the above code. Try also to change the values of the covariance matrix by making one of the diagonal elements much larger than the other. What do you observe then?
+
+
+## Classical PCA Theorem
+
+We assume now that we have a design matrix $\boldsymbol{X}$ which has been
+centered as discussed above. For the sake of simplicity we skip the
+overline symbol. The matrix is defined in terms of the various column
+vectors $[\boldsymbol{x}_0,\boldsymbol{x}_1,\dots, \boldsymbol{x}_{p-1}]$ each with dimension
+$\boldsymbol{x}\in {\mathbb{R}}^{n}$.
+
+We assume also that we have an orthogonal transformation $\boldsymbol{W}\in {\mathbb{R}}^{p\times p}$. We define the reconstruction error (which is similar to the mean squared error we have seen before) as
+
+$$
+J(\boldsymbol{W},\boldsymbol{Z}) = \frac{1}{n}\sum_i (\boldsymbol{x}_i - \overline{\boldsymbol{x}}_i)^2,
+$$
+
+with $\overline{\boldsymbol{x}}_i = \boldsymbol{W}\boldsymbol{z}_i$, where $\boldsymbol{z}_i$ is a row vector with dimension ${\mathbb{R}}^{n}$ of the matrix
+$\boldsymbol{Z}\in{\mathbb{R}}^{p\times n}$. When doing PCA we want to reduce this dimensionality.
+
+The PCA theorem states that minimizing the above reconstruction error
+corresponds to setting $\boldsymbol{W}=\boldsymbol{S}$, the orthogonal matrix which
+diagonalizes the empirical covariance(correlation) matrix. The optimal
+low-dimensional encoding of the data is then given by a set of vectors
+$\boldsymbol{z}_i$ with at most $l$ vectors, with $l << p$, defined by the
+orthogonal projection of the data onto the columns spanned by the
+eigenvectors of the covariance(correlations matrix).
+
+The proof which follows will be updated by mid January 2020.
+
+
+## Proof of the PCA Theorem
+
+To show the PCA theorem let us start with the assumption that there is one vector $\boldsymbol{w}_0$ which corresponds to a solution which minimized the reconstruction error $J$. This is an orthogonal vector. It means that we now approximate the reconstruction error in terms of $\boldsymbol{w}_0$ and $\boldsymbol{z}_0$ as
+
+$$
+J(\boldsymbol{w}_0,\boldsymbol{z}_0)= \frac{1}{n}\sum_i (\boldsymbol{x}_i - z_{i0}\boldsymbol{w}_0)^2=\frac{1}{n}\sum_i (\boldsymbol{x}_i^T\boldsymbol{x}_i - 2z_{i0}\boldsymbol{w}_0^T\boldsymbol{x}_i+z_{i0}^2\boldsymbol{w}_0^T\boldsymbol{w}_0),
+$$
+
+which we can rewrite due to the orthogonality of $\boldsymbol{w}_i$ as
+
+$$
+J(\boldsymbol{w}_0,\boldsymbol{z}_0)=\frac{1}{n}\sum_i (\boldsymbol{x}_i^T\boldsymbol{x}_i - 2z_{i0}\boldsymbol{w}_0^T\boldsymbol{x}_i+z_{i0}^2).
+$$
+
+Minimizing $J$ with respect to the unknown parameters $z_{0i}$ we obtain that
+
+$$
+z_{i0}=\boldsymbol{w}_0^T\boldsymbol{x}_i,
+$$
+
+where the vectors on the rhs are known.
+
+
+
+## PCA Proof continued
+
+We have now found the unknown parameters $z_{i0}$. These correspond to the projected coordinates and we can write
+
+$$
+J(\boldsymbol{w}_0)= \frac{1}{p}\sum_i (\boldsymbol{x}_i^T\boldsymbol{x}_i - z_{i0}^2)=\mathrm{const}-\frac{1}{n}\sum_i z_{i0}^2.
+$$
+
+We can show that the variance of the projected coordinates defined by $\boldsymbol{w}_0^T\boldsymbol{x}_i$ are given by
+
+$$
+\mathrm{var}[\boldsymbol{w}_0^T\boldsymbol{x}_i] = \frac{1}{n}\sum_i z_{i0}^2,
+$$
+
+since the expectation value of
+
+$$
+\mathbb{E}[\boldsymbol{w}_0^T\boldsymbol{x}_i] = \mathbb{E}[z_{i0}]= \boldsymbol{w}_0^T\mathbb{E}[\boldsymbol{x}_i]=0,
+$$
+
+where we have used the fact that our data are centered.
+
+Recalling our definition of the covariance as
+
+$$
+\boldsymbol{C}[\boldsymbol{x}] = \frac{1}{n}\boldsymbol{X}\boldsymbol{X}^T=\mathbb{E}[\boldsymbol{X}\boldsymbol{X}^T],
+$$
+
+we have thus that
+
+$$
+\mathrm{var}[\boldsymbol{w}_0^T\boldsymbol{x}_i] = \frac{1}{n}\sum_i z_{i0}^2=\boldsymbol{w}_0^T\boldsymbol{C}[\boldsymbol{x}]\boldsymbol{w}_0.
+$$
+
+We are almost there, we have obtained a relation between minimizing
+the reconstruction error and the variance and the covariance
+matrix. Minimizing the error is equivalent to maximizing the variance
+of the projected data.
+
+
+## The final step
+
+We could trivially maximize the variance of the projection (and
+thereby minimize the error in the reconstruction function) by letting
+the norm-2 of $\boldsymbol{w}_0$ go to infinity. However, this norm since we
+want the matrix $\boldsymbol{W}$ to be an orthogonal matrix, is constrained by
+$\vert\vert \boldsymbol{w}_0 \vert\vert_2^2=1$. Imposing this condition via a
+Lagrange multiplier we can then in turn maximize
+
+$$
+J(\boldsymbol{w}_0)= \boldsymbol{w}_0^T\boldsymbol{C}[\boldsymbol{x}]\boldsymbol{w}_0+\lambda_0(1-\boldsymbol{w}_0^T\boldsymbol{w}_0).
+$$
+
+Taking the derivative with respect to $\boldsymbol{w}_0$ we obtain
+
+$$
+\frac{\partial J(\boldsymbol{w}_0)}{\partial \boldsymbol{w}_0}= 2\boldsymbol{C}[\boldsymbol{x}]\boldsymbol{w}_0-2\lambda_0\boldsymbol{w}_0=0,
+$$
+
+meaning that
+
+$$
+\boldsymbol{C}[\boldsymbol{x}]\boldsymbol{w}_0=\lambda_0\boldsymbol{w}_0.
+$$
+
+**The direction that maximizes the variance (or minimizes the construction error) is an eigenvector of the covariance matrix**! If we left multiply with $\boldsymbol{w}_0^T$ we have the variance of the projected data is
+
+$$
+\boldsymbol{w}_0^T\boldsymbol{C}[\boldsymbol{x}]\boldsymbol{w}_0=\lambda_0.
+$$
+
+If we want to maximize the variance (minimize the construction error)
+we simply pick the eigenvector of the covariance matrix with the
+largest eigenvalue. This establishes the link between the minimization
+of the reconstruction function $J$ in terms of an orthogonal matrix
+and the maximization of the variance and thereby the covariance of our
+observations encoded in the design/feature matrix $\boldsymbol{X}$.
+
+The proof
+for the other eigenvectors $\boldsymbol{w}_1,\boldsymbol{w}_2,\dots$ can be
+established by applying the above arguments and using the fact that
+our basis of eigenvectors is orthogonal, see [Murphy chapter
+12.2](https://mitpress.mit.edu/books/machine-learning-1). The
+discussion in chapter 12.2 of Murphy's text has also a nice link with
+the Singular Value Decomposition theorem. For categorical data, see
+chapter 12.4 and discussion therein.
+
+Additional part of the proof for the other eigenvectors will be added by mid January 2020.
+
+
+## Geometric Interpretation and link with Singular Value Decomposition
+
+This material will be added by mid January 2020.
+
+
+
+## Principal Component Analysis
+
+Principal Component Analysis (PCA) is by far the most popular dimensionality reduction algorithm.
+First it identifies the hyperplane that lies closest to the data, and then it projects the data onto it.
+
+The following Python code uses NumPy’s **svd()** function to obtain all the principal components of the
+training set, then extracts the first two principal components. First we center the data using either **pandas** or our own code
+
+import numpy as np
+import pandas as pd
+from IPython.display import display
+np.random.seed(100)
+# setting up a 10 x 5 vanilla matrix
+rows = 10
+cols = 5
+X = np.random.randn(rows,cols)
+df = pd.DataFrame(X)
+# Pandas does the centering for us
+df = df -df.mean()
+display(df)
+
+# we center it ourselves
+X_centered = X - X.mean(axis=0)
+# Then check the difference between pandas and our own set up
+print(X_centered-df)
+#Now we do an SVD
+U, s, V = np.linalg.svd(X_centered)
+c1 = V.T[:, 0]
+c2 = V.T[:, 1]
+W2 = V.T[:, :2]
+X2D = X_centered.dot(W2)
+print(X2D)
+
+PCA assumes that the dataset is centered around the origin. Scikit-Learn’s PCA classes take care of centering
+the data for you. However, if you implement PCA yourself (as in the preceding example), or if you use other libraries, don’t
+forget to center the data first.
+
+Once you have identified all the principal components, you can reduce the dimensionality of the dataset
+down to $d$ dimensions by projecting it onto the hyperplane defined by the first $d$ principal components.
+Selecting this hyperplane ensures that the projection will preserve as much variance as possible.
+
+W2 = V.T[:, :2]
+X2D = X_centered.dot(W2)
+
+## PCA and scikit-learn
+
+Scikit-Learn’s PCA class implements PCA using SVD decomposition just like we did before. The
+following code applies PCA to reduce the dimensionality of the dataset down to two dimensions (note
+that it automatically takes care of centering the data):
+
+#thereafter we do a PCA with Scikit-learn
+from sklearn.decomposition import PCA
+pca = PCA(n_components = 2)
+X2D = pca.fit_transform(X)
+print(X2D)
+
+After fitting the PCA transformer to the dataset, you can access the principal components using the
+components variable (note that it contains the PCs as horizontal vectors, so, for example, the first
+principal component is equal to
+
+pca.components_.T[:, 0].
+
+Another very useful piece of information is the explained variance ratio of each principal component,
+available via the $explained\_variance\_ratio$ variable. It indicates the proportion of the dataset’s
+variance that lies along the axis of each principal component.
+
+
+## Back to the Cancer Data
+We can now repeat the above but applied to real data, in this case our breast cancer data.
+Here we compute performance scores on the training data using logistic regression.
+
+import matplotlib.pyplot as plt
+import numpy as np
+from sklearn.model_selection import train_test_split
+from sklearn.datasets import load_breast_cancer
+from sklearn.linear_model import LogisticRegression
+cancer = load_breast_cancer()
+
+X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)
+
+logreg = LogisticRegression()
+logreg.fit(X_train, y_train)
+print("Train set accuracy from Logistic Regression: {:.2f}".format(logreg.score(X_train,y_train)))
+# We scale the data
+from sklearn.preprocessing import StandardScaler
+scaler = StandardScaler()
+scaler.fit(X_train)
+X_train_scaled = scaler.transform(X_train)
+X_test_scaled = scaler.transform(X_test)
+# Then perform again a log reg fit
+logreg.fit(X_train_scaled, y_train)
+print("Train set accuracy scaled data: {:.2f}".format(logreg.score(X_train_scaled,y_train)))
+#thereafter we do a PCA with Scikit-learn
+from sklearn.decomposition import PCA
+pca = PCA(n_components = 2)
+X2D_train = pca.fit_transform(X_train_scaled)
+# and finally compute the log reg fit and the score on the training data
+logreg.fit(X2D_train,y_train)
+print("Train set accuracy scaled and PCA data: {:.2f}".format(logreg.score(X2D_train,y_train)))
+
+We see that our training data after the PCA decomposition has a performance similar to the non-scaled data.
+
+
+## More on the PCA
+
+Instead of arbitrarily choosing the number of dimensions to reduce down to, it is generally preferable to
+choose the number of dimensions that add up to a sufficiently large portion of the variance (e.g., 95%).
+Unless, of course, you are reducing dimensionality for data visualization — in that case you will
+generally want to reduce the dimensionality down to 2 or 3.
+The following code computes PCA without reducing dimensionality, then computes the minimum number
+of dimensions required to preserve 95% of the training set’s variance:
+
+pca = PCA()
+pca.fit(X)
+cumsum = np.cumsum(pca.explained_variance_ratio_)
+d = np.argmax(cumsum >= 0.95) + 1
+
+You could then set $n\_components=d$ and run PCA again. However, there is a much better option: instead
+of specifying the number of principal components you want to preserve, you can set $n\_components$ to be
+a float between 0.0 and 1.0, indicating the ratio of variance you wish to preserve:
+
+pca = PCA(n_components=0.95)
+X_reduced = pca.fit_transform(X)
+
+## Incremental PCA
+
+One problem with the preceding implementation of PCA is that it requires the whole training set to fit in
+memory in order for the SVD algorithm to run. Fortunately, Incremental PCA (IPCA) algorithms have
+been developed: you can split the training set into mini-batches and feed an IPCA algorithm one minibatch
+at a time. This is useful for large training sets, and also to apply PCA online (i.e., on the fly, as new
+instances arrive).
+
+
+## Randomized PCA
+
+Scikit-Learn offers yet another option to perform PCA, called Randomized PCA. This is a stochastic
+algorithm that quickly finds an approximation of the first d principal components. Its computational
+complexity is $O(m \times d^2)+O(d^3)$, instead of $O(m \times n^2) + O(n^3)$, so it is dramatically faster than the
+previous algorithms when $d$ is much smaller than $n$.
+
+
+
+
+
+## Kernel PCA
+
+The kernel trick is a mathematical technique that implicitly maps instances into a
+very high-dimensional space (called the feature space), enabling nonlinear classification and regression
+with Support Vector Machines. Recall that a linear decision boundary in the high-dimensional feature
+space corresponds to a complex nonlinear decision boundary in the original space.
+It turns out that the same trick can be applied to PCA, making it possible to perform complex nonlinear
+projections for dimensionality reduction. This is called Kernel PCA (kPCA). It is often good at
+preserving clusters of instances after projection, or sometimes even unrolling datasets that lie close to a
+twisted manifold.
+For example, the following code uses Scikit-Learn’s KernelPCA class to perform kPCA with an
+
+from sklearn.decomposition import KernelPCA
+rbf_pca = KernelPCA(n_components = 2, kernel="rbf", gamma=0.04)
+X_reduced = rbf_pca.fit_transform(X)
+
+## LLE
+
+Locally Linear Embedding (LLE) is another very powerful nonlinear dimensionality reduction
+(NLDR) technique. It is a Manifold Learning technique that does not rely on projections like the previous
+algorithms. In a nutshell, LLE works by first measuring how each training instance linearly relates to its
+closest neighbors (c.n.), and then looking for a low-dimensional representation of the training set where
+these local relationships are best preserved (more details shortly).
+
+
+
+
+## Other techniques
+
+
+There are many other dimensionality reduction techniques, several of which are available in Scikit-Learn.
+
+Here are some of the most popular:
+* **Multidimensional Scaling (MDS)** reduces dimensionality while trying to preserve the distances between the instances.
+
+* **Isomap** creates a graph by connecting each instance to its nearest neighbors, then reduces dimensionality while trying to preserve the geodesic distances between the instances.
+
+* **t-Distributed Stochastic Neighbor Embedding** (t-SNE) reduces dimensionality while trying to keep similar instances close and dissimilar instances apart. It is mostly used for visualization, in particular to visualize clusters of instances in high-dimensional space (e.g., to visualize the MNIST images in 2D).
+
+* Linear Discriminant Analysis (LDA) is actually a classification algorithm, but during training it learns the most discriminative axes between the classes, and these axes can then be used to define a hyperplane onto which to project the data. The benefit is that the projection will keep classes as far apart as possible, so LDA is a good technique to reduce dimensionality before running another classification algorithm such as a Support Vector Machine (SVM) classifier discussed in the SVM lectures.
\ No newline at end of file
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter8_77_1.png b/doc/src/LectureNotes/_build/jupyter_execute/chapter8_77_1.png
new file mode 100644
index 000000000..6509bb8be
Binary files /dev/null and b/doc/src/LectureNotes/_build/jupyter_execute/chapter8_77_1.png differ
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter8_7_0.png b/doc/src/LectureNotes/_build/jupyter_execute/chapter8_7_0.png
new file mode 100644
index 000000000..71f3c58f8
Binary files /dev/null and b/doc/src/LectureNotes/_build/jupyter_execute/chapter8_7_0.png differ
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/chapter8_7_1.png b/doc/src/LectureNotes/_build/jupyter_execute/chapter8_7_1.png
new file mode 100644
index 000000000..7c2b26820
Binary files /dev/null and b/doc/src/LectureNotes/_build/jupyter_execute/chapter8_7_1.png differ
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/testbook/_build/jupyter_execute/chapter2.ipynb b/doc/src/LectureNotes/_build/jupyter_execute/testbook/_build/jupyter_execute/chapter2.ipynb
index e2988a9f6..9d9b8ee7a 100644
--- a/doc/src/LectureNotes/_build/jupyter_execute/testbook/_build/jupyter_execute/chapter2.ipynb
+++ b/doc/src/LectureNotes/_build/jupyter_execute/testbook/_build/jupyter_execute/chapter2.ipynb
@@ -2152,8 +2152,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "[ 0.90559229 -2.01023012 -0.44771747 1.75725059 -1.23503845 0.00290572\n",
- " -1.00282695 1.34507057 1.8031745 -0.99146414]\n"
+ "[ 1.54613374 -0.53808134 -0.25599148 -2.19980623 -1.26614367 2.09110254\n",
+ " 0.54374681 0.6362131 1.04152939 -1.69246995]\n"
]
}
],
diff --git a/doc/src/LectureNotes/_build/jupyter_execute/testbook/chapter2.ipynb b/doc/src/LectureNotes/_build/jupyter_execute/testbook/chapter2.ipynb
index cf29a51d5..b2cb01c18 100644
--- a/doc/src/LectureNotes/_build/jupyter_execute/testbook/chapter2.ipynb
+++ b/doc/src/LectureNotes/_build/jupyter_execute/testbook/chapter2.ipynb
@@ -2152,8 +2152,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "[-1.36647401 0.48392582 1.3866607 -1.32437748 -1.27886869 -0.45735097\n",
- " 2.09942022 0.4864173 -0.46526198 1.4136186 ]\n"
+ "[ 0.37402521 -0.6723554 0.34705159 -0.23106244 0.37640289 1.26261376\n",
+ " -1.28899002 0.59279401 -1.28878405 -0.82161508]\n"
]
}
],
diff --git a/doc/src/LectureNotes/_toc.yml b/doc/src/LectureNotes/_toc.yml
index 55db2691a..c47810ab0 100644
--- a/doc/src/LectureNotes/_toc.yml
+++ b/doc/src/LectureNotes/_toc.yml
@@ -7,4 +7,6 @@
- file: chapter4.ipynb
- file: chapter5.ipynb
- file: chapter6.ipynb
+ - file: chapter7.ipynb
+ - file: chapter8.ipynb
diff --git a/doc/src/LectureNotes/chapter7.ipynb b/doc/src/LectureNotes/chapter7.ipynb
new file mode 100644
index 000000000..47eab3c92
--- /dev/null
+++ b/doc/src/LectureNotes/chapter7.ipynb
@@ -0,0 +1,1897 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Support Vector Machines, overarching aims\n",
+ "\n",
+ "A Support Vector Machine (SVM) is a very powerful and versatile\n",
+ "Machine Learning method, capable of performing linear or nonlinear\n",
+ "classification, regression, and even outlier detection. It is one of\n",
+ "the most popular models in Machine Learning, and anyone interested in\n",
+ "Machine Learning should have it in their toolbox. SVMs are\n",
+ "particularly well suited for classification of complex but small-sized or\n",
+ "medium-sized datasets. \n",
+ "\n",
+ "The case with two well-separated classes only can be understood in an\n",
+ "intuitive way in terms of lines in a two-dimensional space separating\n",
+ "the two classes (see figure below).\n",
+ "\n",
+ "The basic mathematics behind the SVM is however less familiar to most of us. \n",
+ "It relies on the definition of hyperplanes and the\n",
+ "definition of a **margin** which separates classes (in case of\n",
+ "classification problems) of variables. It is also used for regression\n",
+ "problems.\n",
+ "\n",
+ "With SVMs we distinguish between hard margin and soft margins. The\n",
+ "latter introduces a so-called softening parameter to be discussed\n",
+ "below. We distinguish also between linear and non-linear\n",
+ "approaches. The latter are the most frequent ones since it is rather\n",
+ "unlikely that we can separate classes easily by say straight lines.\n",
+ "\n",
+ "\n",
+ "## Hyperplanes and all that\n",
+ "\n",
+ "The theory behind support vector machines (SVM hereafter) is based on\n",
+ "the mathematical description of so-called hyperplanes. Let us start\n",
+ "with a two-dimensional case. This will also allow us to introduce our\n",
+ "first SVM examples. These will be tailored to the case of two specific\n",
+ "classes, as displayed in the figure here based on the usage of the petal data.\n",
+ "\n",
+ "We assume here that our data set can be well separated into two\n",
+ "domains, where a straight line does the job in the separating the two\n",
+ "classes. Here the two classes are represented by either squares or\n",
+ "circles."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "%matplotlib inline\n",
+ "\n",
+ "from sklearn import datasets\n",
+ "from sklearn.svm import SVC, LinearSVC\n",
+ "from sklearn.linear_model import SGDClassifier\n",
+ "from sklearn.preprocessing import StandardScaler\n",
+ "import matplotlib\n",
+ "import matplotlib.pyplot as plt\n",
+ "plt.rcParams['axes.labelsize'] = 14\n",
+ "plt.rcParams['xtick.labelsize'] = 12\n",
+ "plt.rcParams['ytick.labelsize'] = 12\n",
+ "\n",
+ "\n",
+ "iris = datasets.load_iris()\n",
+ "X = iris[\"data\"][:, (2, 3)] # petal length, petal width\n",
+ "y = iris[\"target\"]\n",
+ "\n",
+ "setosa_or_versicolor = (y == 0) | (y == 1)\n",
+ "X = X[setosa_or_versicolor]\n",
+ "y = y[setosa_or_versicolor]\n",
+ "\n",
+ "\n",
+ "\n",
+ "C = 5\n",
+ "alpha = 1 / (C * len(X))\n",
+ "\n",
+ "lin_clf = LinearSVC(loss=\"hinge\", C=C, random_state=42)\n",
+ "svm_clf = SVC(kernel=\"linear\", C=C)\n",
+ "sgd_clf = SGDClassifier(loss=\"hinge\", learning_rate=\"constant\", eta0=0.001, alpha=alpha,\n",
+ " max_iter=100000, random_state=42)\n",
+ "\n",
+ "scaler = StandardScaler()\n",
+ "X_scaled = scaler.fit_transform(X)\n",
+ "\n",
+ "lin_clf.fit(X_scaled, y)\n",
+ "svm_clf.fit(X_scaled, y)\n",
+ "sgd_clf.fit(X_scaled, y)\n",
+ "\n",
+ "print(\"LinearSVC: \", lin_clf.intercept_, lin_clf.coef_)\n",
+ "print(\"SVC: \", svm_clf.intercept_, svm_clf.coef_)\n",
+ "print(\"SGDClassifier(alpha={:.5f}):\".format(sgd_clf.alpha), sgd_clf.intercept_, sgd_clf.coef_)\n",
+ "\n",
+ "# Compute the slope and bias of each decision boundary\n",
+ "w1 = -lin_clf.coef_[0, 0]/lin_clf.coef_[0, 1]\n",
+ "b1 = -lin_clf.intercept_[0]/lin_clf.coef_[0, 1]\n",
+ "w2 = -svm_clf.coef_[0, 0]/svm_clf.coef_[0, 1]\n",
+ "b2 = -svm_clf.intercept_[0]/svm_clf.coef_[0, 1]\n",
+ "w3 = -sgd_clf.coef_[0, 0]/sgd_clf.coef_[0, 1]\n",
+ "b3 = -sgd_clf.intercept_[0]/sgd_clf.coef_[0, 1]\n",
+ "\n",
+ "# Transform the decision boundary lines back to the original scale\n",
+ "line1 = scaler.inverse_transform([[-10, -10 * w1 + b1], [10, 10 * w1 + b1]])\n",
+ "line2 = scaler.inverse_transform([[-10, -10 * w2 + b2], [10, 10 * w2 + b2]])\n",
+ "line3 = scaler.inverse_transform([[-10, -10 * w3 + b3], [10, 10 * w3 + b3]])\n",
+ "\n",
+ "# Plot all three decision boundaries\n",
+ "plt.figure(figsize=(11, 4))\n",
+ "plt.plot(line1[:, 0], line1[:, 1], \"k:\", label=\"LinearSVC\")\n",
+ "plt.plot(line2[:, 0], line2[:, 1], \"b--\", linewidth=2, label=\"SVC\")\n",
+ "plt.plot(line3[:, 0], line3[:, 1], \"r-\", label=\"SGDClassifier\")\n",
+ "plt.plot(X[:, 0][y==1], X[:, 1][y==1], \"bs\") # label=\"Iris-Versicolor\"\n",
+ "plt.plot(X[:, 0][y==0], X[:, 1][y==0], \"yo\") # label=\"Iris-Setosa\"\n",
+ "plt.xlabel(\"Petal length\", fontsize=14)\n",
+ "plt.ylabel(\"Petal width\", fontsize=14)\n",
+ "plt.legend(loc=\"upper center\", fontsize=14)\n",
+ "plt.axis([0, 5.5, 0, 2])\n",
+ "\n",
+ "plt.show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## What is a hyperplane?\n",
+ "\n",
+ "The aim of the SVM algorithm is to find a hyperplane in a\n",
+ "$p$-dimensional space, where $p$ is the number of features that\n",
+ "distinctly classifies the data points.\n",
+ "\n",
+ "In a $p$-dimensional space, a hyperplane is what we call an affine subspace of dimension of $p-1$.\n",
+ "As an example, in two dimension, a hyperplane is simply as straight line while in three dimensions it is \n",
+ "a two-dimensional subspace, or stated simply, a plane. \n",
+ "\n",
+ "In two dimensions, with the variables $x_1$ and $x_2$, the hyperplane is defined as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "b+w_1x_1+w_2x_2=0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where $b$ is the intercept and $w_1$ and $w_2$ define the elements of a vector orthogonal to the line \n",
+ "$b+w_1x_1+w_2x_2=0$. \n",
+ "In two dimensions we define the vectors $\\boldsymbol{x} =[x1,x2]$ and $\\boldsymbol{w}=[w1,w2]$. \n",
+ "We can then rewrite the above equation as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{x}^T\\boldsymbol{w}+b=0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## A $p$-dimensional space of features\n",
+ "\n",
+ "We limit ourselves to two classes of outputs $y_i$ and assign these classes the values $y_i = \\pm 1$. \n",
+ "In a $p$-dimensional space of say $p$ features we have a hyperplane defines as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "b+wx_1+w_2x_2+\\dots +w_px_p=0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "If we define a \n",
+ "matrix $\\boldsymbol{X}=\\left[\\boldsymbol{x}_1,\\boldsymbol{x}_2,\\dots, \\boldsymbol{x}_p\\right]$\n",
+ "of dimension $n\\times p$, where $n$ represents the observations for each feature and each vector $x_i$ is a column vector of the matrix $\\boldsymbol{X}$,"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{x}_i = \\begin{bmatrix} x_{i1} \\\\ x_{i2} \\\\ \\dots \\\\ \\dots \\\\ x_{ip} \\end{bmatrix}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "If the above condition is not met for a given vector $\\boldsymbol{x}_i$ we have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "b+w_1x_{i1}+w_2x_{i2}+\\dots +w_px_{ip} >0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "if our output $y_i=1$.\n",
+ "In this case we say that $\\boldsymbol{x}_i$ lies on one of the sides of the hyperplane and if"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "b+w_1x_{i1}+w_2x_{i2}+\\dots +w_px_{ip} < 0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "for the class of observations $y_i=-1$, \n",
+ "then $\\boldsymbol{x}_i$ lies on the other side. \n",
+ "\n",
+ "Equivalently, for the two classes of observations we have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i\\left(b+w_1x_{i1}+w_2x_{i2}+\\dots +w_px_{ip}\\right) > 0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "When we try to separate hyperplanes, if it exists, we can use it to construct a natural classifier: a test observation is assigned a given class depending on which side of the hyperplane it is located.\n",
+ "\n",
+ "\n",
+ "## The two-dimensional case\n",
+ "\n",
+ "Let us try to develop our intuition about SVMs by limiting ourselves to a two-dimensional\n",
+ "plane. To separate the two classes of data points, there are many\n",
+ "possible lines (hyperplanes if you prefer a more strict naming) \n",
+ "that could be chosen. Our objective is to find a\n",
+ "plane that has the maximum margin, i.e the maximum distance between\n",
+ "data points of both classes. Maximizing the margin distance provides\n",
+ "some reinforcement so that future data points can be classified with\n",
+ "more confidence.\n",
+ "\n",
+ "What a linear classifier attempts to accomplish is to split the\n",
+ "feature space into two half spaces by placing a hyperplane between the\n",
+ "data points. This hyperplane will be our decision boundary. All\n",
+ "points on one side of the plane will belong to class one and all points\n",
+ "on the other side of the plane will belong to the second class two.\n",
+ "\n",
+ "Unfortunately there are many ways in which we can place a hyperplane\n",
+ "to divide the data. Below is an example of two candidate hyperplanes\n",
+ "for our data sample.\n",
+ "\n",
+ "\n",
+ "## Getting into the details\n",
+ "\n",
+ "Let us define the function"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "f(x) = \\boldsymbol{w}^T\\boldsymbol{x}+b = 0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "as the function that determines the line $L$ that separates two classes (our two features), see the figure here. \n",
+ "\n",
+ "\n",
+ "Any point defined by $\\boldsymbol{x}_i$ and $\\boldsymbol{x}_2$ on the line $L$ will satisfy $\\boldsymbol{w}^T(\\boldsymbol{x}_1-\\boldsymbol{x}_2)=0$. \n",
+ "\n",
+ "The signed distance $\\delta$ from any point defined by a vector $\\boldsymbol{x}$ and a point $\\boldsymbol{x}_0$ on the line $L$ is then"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\delta = \\frac{1}{\\vert\\vert \\boldsymbol{w}\\vert\\vert}(\\boldsymbol{w}^T\\boldsymbol{x}+b).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## First attempt at a minimization approach\n",
+ "\n",
+ "How do we find the parameter $b$ and the vector $\\boldsymbol{w}$? What we could\n",
+ "do is to define a cost function which now contains the set of all\n",
+ "misclassified points $M$ and attempt to minimize this function"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "C(\\boldsymbol{w},b) = -\\sum_{i\\in M} y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We could now for example define all values $y_i =1$ as misclassified in case we have $\\boldsymbol{w}^T\\boldsymbol{x}_i+b < 0$ and the opposite if we have $y_i=-1$. Taking the derivatives gives us"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial C}{\\partial b} = -\\sum_{i\\in M} y_i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial C}{\\partial \\boldsymbol{w}} = -\\sum_{i\\in M} y_ix_i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Solving the equations\n",
+ "\n",
+ "We can now use the Newton-Raphson method or different variants of the gradient descent family (from plain gradient descent to various stochastic gradient descent approaches) to solve the equations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "b \\leftarrow b +\\eta \\frac{\\partial C}{\\partial b},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{w} \\leftarrow \\boldsymbol{w} +\\eta \\frac{\\partial C}{\\partial \\boldsymbol{w}},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where $\\eta$ is our by now well-known learning rate. \n",
+ "\n",
+ "\n",
+ "\n",
+ "## Code Example\n",
+ "\n",
+ "The equations we discussed above can be coded rather easily (the\n",
+ "framework is similar to what we developed for logistic\n",
+ "regression). We are going to set up a simple case with two classes only and we want to find a line which separates them the best possible way."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Problems with the Simpler Approach\n",
+ "\n",
+ "\n",
+ "There are however problems with this approach, although it looks\n",
+ "pretty straightforward to implement. When running the above code, we see that we can easily end up with many diffeent lines which separate the two classes.\n",
+ "\n",
+ "\n",
+ "For small\n",
+ "gaps between the entries, we may also end up needing many iterations\n",
+ "before the solutions converge and if the data cannot be separated\n",
+ "properly into two distinct classes, we may not experience a converge\n",
+ "at all.\n",
+ "\n",
+ "\n",
+ "## A better approach\n",
+ "\n",
+ "A better approach is rather to try to define a large margin between\n",
+ "the two classes (if they are well separated from the beginning).\n",
+ "\n",
+ "Thus, we wish to find a margin $M$ with $\\boldsymbol{w}$ normalized to\n",
+ "$\\vert\\vert \\boldsymbol{w}\\vert\\vert =1$ subject to the condition"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) \\geq M \\hspace{0.1cm}\\forall i=1,2,\\dots, p.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "All points are thus at a signed distance from the decision boundary defined by the line $L$. The parameters $b$ and $w_1$ and $w_2$ define this line. \n",
+ "\n",
+ "We seek thus the largest value $M$ defined by"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{1}{\\vert \\vert \\boldsymbol{w}\\vert\\vert}y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) \\geq M \\hspace{0.1cm}\\forall i=1,2,\\dots, n,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "or just"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) \\geq M\\vert \\vert \\boldsymbol{w}\\vert\\vert \\hspace{0.1cm}\\forall i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "If we scale the equation so that $\\vert \\vert \\boldsymbol{w}\\vert\\vert = 1/M$, we have to find the minimum of \n",
+ "$\\boldsymbol{w}^T\\boldsymbol{w}=\\vert \\vert \\boldsymbol{w}\\vert\\vert$ (the norm) subject to the condition"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) \\geq 1 \\hspace{0.1cm}\\forall i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We have thus defined our margin as the invers of the norm of\n",
+ "$\\boldsymbol{w}$. We want to minimize the norm in order to have a as large as\n",
+ "possible margin $M$. Before we proceed, we need to remind ourselves\n",
+ "about Lagrangian multipliers.\n",
+ "\n",
+ "\n",
+ "## A quick Reminder on Lagrangian Multipliers\n",
+ "\n",
+ "Consider a function of three independent variables $f(x,y,z)$ . For the function $f$ to be an\n",
+ "extreme we have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "df=0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "A necessary and sufficient condition is"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial f}{\\partial x} =\\frac{\\partial f}{\\partial y}=\\frac{\\partial f}{\\partial z}=0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "due to"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "df = \\frac{\\partial f}{\\partial x}dx+\\frac{\\partial f}{\\partial y}dy+\\frac{\\partial f}{\\partial z}dz.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "In many problems the variables $x,y,z$ are often subject to constraints (such as those above for the margin)\n",
+ "so that they are no longer all independent. It is possible at least in principle to use each \n",
+ "constraint to eliminate one variable\n",
+ "and to proceed with a new and smaller set of independent varables.\n",
+ "\n",
+ "The use of so-called Lagrangian multipliers is an alternative technique when the elimination\n",
+ "of variables is incovenient or undesirable. Assume that we have an equation of constraint on \n",
+ "the variables $x,y,z$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\phi(x,y,z) = 0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "resulting in"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "d\\phi = \\frac{\\partial \\phi}{\\partial x}dx+\\frac{\\partial \\phi}{\\partial y}dy+\\frac{\\partial \\phi}{\\partial z}dz =0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Now we cannot set anymore"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial f}{\\partial x} =\\frac{\\partial f}{\\partial y}=\\frac{\\partial f}{\\partial z}=0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "if $df=0$ is wanted\n",
+ "because there are now only two independent variables! Assume $x$ and $y$ are the independent \n",
+ "variables.\n",
+ "Then $dz$ is no longer arbitrary.\n",
+ "\n",
+ "\n",
+ "## Adding the Multiplier\n",
+ "\n",
+ "However, we can add to"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "df = \\frac{\\partial f}{\\partial x}dx+\\frac{\\partial f}{\\partial y}dy+\\frac{\\partial f}{\\partial z}dz,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "a multiplum of $d\\phi$, viz. $\\lambda d\\phi$, resulting in"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "df+\\lambda d\\phi = (\\frac{\\partial f}{\\partial z}+\\lambda\n",
+ "\\frac{\\partial \\phi}{\\partial x})dx+(\\frac{\\partial f}{\\partial y}+\\lambda\\frac{\\partial \\phi}{\\partial y})dy+\n",
+ "(\\frac{\\partial f}{\\partial z}+\\lambda\\frac{\\partial \\phi}{\\partial z})dz =0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Our multiplier is chosen so that"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial f}{\\partial z}+\\lambda\\frac{\\partial \\phi}{\\partial z} =0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We need to remember that we took $dx$ and $dy$ to be arbitrary and thus we must have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial f}{\\partial x}+\\lambda\\frac{\\partial \\phi}{\\partial x} =0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial f}{\\partial y}+\\lambda\\frac{\\partial \\phi}{\\partial y} =0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "When all these equations are satisfied, $df=0$. We have four unknowns, $x,y,z$ and\n",
+ "$\\lambda$. Actually we want only $x,y,z$, $\\lambda$ needs not to be determined, \n",
+ "it is therefore often called\n",
+ "Lagrange's undetermined multiplier.\n",
+ "If we have a set of constraints $\\phi_k$ we have the equations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial f}{\\partial x_i}+\\sum_k\\lambda_k\\frac{\\partial \\phi_k}{\\partial x_i} =0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Setting up the Problem\n",
+ "In order to solve the above problem, we define the following Lagrangian function to be minimized"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "{\\cal L}(\\lambda,b,\\boldsymbol{w})=\\frac{1}{2}\\boldsymbol{w}^T\\boldsymbol{w}-\\sum_{i=1}^n\\lambda_i\\left[y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)-1\\right],\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where $\\lambda_i$ is a so-called Lagrange multiplier subject to the condition $\\lambda_i \\geq 0$.\n",
+ "\n",
+ "Taking the derivatives with respect to $b$ and $\\boldsymbol{w}$ we obtain"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial {\\cal L}}{\\partial b} = -\\sum_{i} \\lambda_iy_i=0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial {\\cal L}}{\\partial \\boldsymbol{w}} = 0 = \\boldsymbol{w}-\\sum_{i} \\lambda_iy_i\\boldsymbol{x}_i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Inserting these constraints into the equation for ${\\cal L}$ we obtain"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{x}_i^T\\boldsymbol{x}_j,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to the constraints $\\lambda_i\\geq 0$ and $\\sum_i\\lambda_iy_i=0$. \n",
+ "We must in addition satisfy the [Karush-Kuhn-Tucker](https://en.wikipedia.org/wiki/Karush%E2%80%93Kuhn%E2%80%93Tucker_conditions) (KKT) condition"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\lambda_i\\left[y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) -1\\right] \\hspace{0.1cm}\\forall i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "1. If $\\lambda_i > 0$, then $y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1$ and we say that $x_i$ is on the boundary.\n",
+ "\n",
+ "2. If $y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)> 1$, we say $x_i$ is not on the boundary and we set $\\lambda_i=0$. \n",
+ "\n",
+ "When $\\lambda_i > 0$, the vectors $\\boldsymbol{x}_i$ are called support vectors. They are the vectors closest to the line (or hyperplane) and define the margin $M$. \n",
+ "\n",
+ "\n",
+ "## The problem to solve\n",
+ "\n",
+ "We can rewrite"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{x}_i^T\\boldsymbol{x}_j,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and its constraints in terms of a matrix-vector problem where we minimize w.r.t. $\\lambda$ the following problem"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{1}{2} \\boldsymbol{\\lambda}^T\\begin{bmatrix} y_1y_1\\boldsymbol{x}_1^T\\boldsymbol{x}_1 & y_1y_2\\boldsymbol{x}_1^T\\boldsymbol{x}_2 & \\dots & \\dots & y_1y_n\\boldsymbol{x}_1^T\\boldsymbol{x}_n \\\\\n",
+ "y_2y_1\\boldsymbol{x}_2^T\\boldsymbol{x}_1 & y_2y_2\\boldsymbol{x}_2^T\\boldsymbol{x}_2 & \\dots & \\dots & y_1y_n\\boldsymbol{x}_2^T\\boldsymbol{x}_n \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "y_ny_1\\boldsymbol{x}_n^T\\boldsymbol{x}_1 & y_ny_2\\boldsymbol{x}_n^T\\boldsymbol{x}_2 & \\dots & \\dots & y_ny_n\\boldsymbol{x}_n^T\\boldsymbol{x}_n \\\\\n",
+ "\\end{bmatrix}\\boldsymbol{\\lambda}-\\mathbb{1}\\boldsymbol{\\lambda},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to $\\boldsymbol{y}^T\\boldsymbol{\\lambda}=0$. Here we defined the vectors $\\boldsymbol{\\lambda} =[\\lambda_1,\\lambda_2,\\dots,\\lambda_n]$ and \n",
+ "$\\boldsymbol{y}=[y_1,y_2,\\dots,y_n]$. \n",
+ "\n",
+ "\n",
+ "\n",
+ "## The last steps\n",
+ "\n",
+ "Solving the above problem, yields the values of $\\lambda_i$.\n",
+ "To find the coefficients of your hyperplane we need simply to compute"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{w}=\\sum_{i} \\lambda_iy_i\\boldsymbol{x}_i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "With our vector $\\boldsymbol{w}$ we can in turn find the value of the intercept $b$ (here in two dimensions) via"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "resulting in"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "b = \\frac{1}{y_i}-\\boldsymbol{w}^T\\boldsymbol{x}_i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "or if we write it out in terms of the support vectors only, with $N_s$ being their number, we have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "b = \\frac{1}{N_s}\\sum_{j\\in N_s}\\left(y_j-\\sum_{i=1}^n\\lambda_iy_i\\boldsymbol{x}_i^T\\boldsymbol{x}_j\\right).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "With our hyperplane coefficients we can use our classifier to assign any observation by simply using"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i = \\mathrm{sign}(\\boldsymbol{w}^T\\boldsymbol{x}_i+b).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Below we discuss how to find the optimal values of $\\lambda_i$. Before we proceed however, we discuss now the so-called soft classifier. \n",
+ "\n",
+ "\n",
+ "## A soft classifier\n",
+ "\n",
+ "Till now, the margin is strictly defined by the support vectors. This defines what is called a hard classifier, that is the margins are well defined.\n",
+ "\n",
+ "Suppose now that classes overlap in feature space, as shown in the\n",
+ "figure here. One way to deal with this problem before we define the\n",
+ "so-called **kernel approach**, is to allow a kind of slack in the sense\n",
+ "that we allow some points to be on the wrong side of the margin.\n",
+ "\n",
+ "We introduce thus the so-called **slack** variables $\\boldsymbol{\\xi} =[\\xi_1,x_2,\\dots,x_n]$ and \n",
+ "modify our previous equation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "to"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1-\\xi_i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "with the requirement $\\xi_i\\geq 0$. The total violation is now $\\sum_i\\xi$. \n",
+ "The value $\\xi_i$ in the constraint the last constraint corresponds to the amount by which the prediction\n",
+ "$y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1$ is on the wrong side of its margin. Hence by bounding the sum $\\sum_i \\xi_i$,\n",
+ "we bound the total amount by which predictions fall on the wrong side of their margins.\n",
+ "\n",
+ "Misclassifications occur when $\\xi_i > 1$. Thus bounding the total sum by some value $C$ bounds in turn the total number of\n",
+ "misclassifications.\n",
+ "\n",
+ "\n",
+ "## Soft optmization problem\n",
+ "\n",
+ "\n",
+ "This has in turn the consequences that we change our optmization problem to finding the minimum of"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "{\\cal L}=\\frac{1}{2}\\boldsymbol{w}^T\\boldsymbol{w}-\\sum_{i=1}^n\\lambda_i\\left[y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)-(1-\\xi_)\\right]+C\\sum_{i=1}^n\\xi_i-\\sum_{i=1}^n\\gamma_i\\xi_i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1-\\xi_i \\hspace{0.1cm}\\forall i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "with the requirement $\\xi_i\\geq 0$.\n",
+ "\n",
+ "Taking the derivatives with respect to $b$ and $\\boldsymbol{w}$ we obtain"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial {\\cal L}}{\\partial b} = -\\sum_{i} \\lambda_iy_i=0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial {\\cal L}}{\\partial \\boldsymbol{w}} = 0 = \\boldsymbol{w}-\\sum_{i} \\lambda_iy_i\\boldsymbol{x}_i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\lambda_i = C-\\gamma_i \\hspace{0.1cm}\\forall i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Inserting these constraints into the equation for ${\\cal L}$ we obtain the same equation as before"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{x}_i^T\\boldsymbol{x}_j,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "but now subject to the constraints $\\lambda_i\\geq 0$, $\\sum_i\\lambda_iy_i=0$ and $0\\leq\\lambda_i \\leq C$. \n",
+ "We must in addition satisfy the Karush-Kuhn-Tucker condition which now reads"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "5\n",
+ "0\n",
+ " \n",
+ "<\n",
+ "<\n",
+ "<\n",
+ "!\n",
+ "!\n",
+ "M\n",
+ "A\n",
+ "T\n",
+ "H\n",
+ "_\n",
+ "B\n",
+ "L\n",
+ "O\n",
+ "C\n",
+ "K"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\gamma_i\\xi_i = 0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) -(1-\\xi_) \\geq 0 \\hspace{0.1cm}\\forall i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Kernels and non-linearity\n",
+ "\n",
+ "The cases we have studied till now, were all characterized by two classes\n",
+ "with a close to linear separability. The classifiers we have described\n",
+ "so far find linear boundaries in our input feature space. It is\n",
+ "possible to make our procedure more flexible by exploring the feature\n",
+ "space using other basis expansions such as higher-order polynomials,\n",
+ "wavelets, splines etc.\n",
+ "\n",
+ "If our feature space is not easy to separate, as shown in the figure\n",
+ "here, we can achieve a better separation by introducing more complex\n",
+ "basis functions. The ideal would be, as shown in the next figure, to, via a specific transformation to \n",
+ "obtain a separation between the classes which is almost linear. \n",
+ "\n",
+ "The change of basis, from $x\\rightarrow z=\\phi(x)$ leads to the same type of equations to be solved, except that\n",
+ "we need to introduce for example a polynomial transformation to a two-dimensional training set."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "import numpy as np\n",
+ "import os\n",
+ "\n",
+ "np.random.seed(42)\n",
+ "\n",
+ "# To plot pretty figures\n",
+ "import matplotlib\n",
+ "import matplotlib.pyplot as plt\n",
+ "plt.rcParams['axes.labelsize'] = 14\n",
+ "plt.rcParams['xtick.labelsize'] = 12\n",
+ "plt.rcParams['ytick.labelsize'] = 12\n",
+ "\n",
+ "\n",
+ "from sklearn.svm import SVC\n",
+ "from sklearn import datasets\n",
+ "\n",
+ "\n",
+ "\n",
+ "X1D = np.linspace(-4, 4, 9).reshape(-1, 1)\n",
+ "X2D = np.c_[X1D, X1D**2]\n",
+ "y = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])\n",
+ "\n",
+ "plt.figure(figsize=(11, 4))\n",
+ "\n",
+ "plt.subplot(121)\n",
+ "plt.grid(True, which='both')\n",
+ "plt.axhline(y=0, color='k')\n",
+ "plt.plot(X1D[:, 0][y==0], np.zeros(4), \"bs\")\n",
+ "plt.plot(X1D[:, 0][y==1], np.zeros(5), \"g^\")\n",
+ "plt.gca().get_yaxis().set_ticks([])\n",
+ "plt.xlabel(r\"$x_1$\", fontsize=20)\n",
+ "plt.axis([-4.5, 4.5, -0.2, 0.2])\n",
+ "\n",
+ "plt.subplot(122)\n",
+ "plt.grid(True, which='both')\n",
+ "plt.axhline(y=0, color='k')\n",
+ "plt.axvline(x=0, color='k')\n",
+ "plt.plot(X2D[:, 0][y==0], X2D[:, 1][y==0], \"bs\")\n",
+ "plt.plot(X2D[:, 0][y==1], X2D[:, 1][y==1], \"g^\")\n",
+ "plt.xlabel(r\"$x_1$\", fontsize=20)\n",
+ "plt.ylabel(r\"$x_2$\", fontsize=20, rotation=0)\n",
+ "plt.gca().get_yaxis().set_ticks([0, 4, 8, 12, 16])\n",
+ "plt.plot([-4.5, 4.5], [6.5, 6.5], \"r--\", linewidth=3)\n",
+ "plt.axis([-4.5, 4.5, -1, 17])\n",
+ "plt.subplots_adjust(right=1)\n",
+ "plt.show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## The equations\n",
+ "\n",
+ "Suppose we define a polynomial transformation of degree two only (we continue to live in a plane with $x_i$ and $y_i$ as variables)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "z = \\phi(x_i) =\\left(x_i^2, y_i^2, \\sqrt{2}x_iy_i\\right).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "With our new basis, the equations we solved earlier are basically the same, that is we have now (without the slack option for simplicity)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{z}_i^T\\boldsymbol{z}_j,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to the constraints $\\lambda_i\\geq 0$, $\\sum_i\\lambda_iy_i=0$, and for the support vectors"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "y_i(\\boldsymbol{w}^T\\boldsymbol{z}_i+b)= 1 \\hspace{0.1cm}\\forall i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "from which we also find $b$.\n",
+ "To compute $\\boldsymbol{z}_i^T\\boldsymbol{z}_j$ we define the kernel $K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)$ as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)=\\boldsymbol{z}_i^T\\boldsymbol{z}_j= \\phi(\\boldsymbol{x}_i)^T\\phi(\\boldsymbol{x}_j).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "For the above example, the kernel reads"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)=[x_i^2, y_i^2, \\sqrt{2}x_iy_i]^T\\begin{bmatrix} x_j^2 \\\\ y_j^2 \\\\ \\sqrt{2}x_jy_j \\end{bmatrix}=x_i^2x_j^2+2x_ix_jy_iy_j+y_i^2y_j^2.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We note that this is nothing but the dot product of the two original\n",
+ "vectors $(\\boldsymbol{x}_i^T\\boldsymbol{x}_j)^2$. Instead of thus computing the\n",
+ "product in the Lagrangian of $\\boldsymbol{z}_i^T\\boldsymbol{z}_j$ we simply compute\n",
+ "the dot product $(\\boldsymbol{x}_i^T\\boldsymbol{x}_j)^2$.\n",
+ "\n",
+ "\n",
+ "This leads to the so-called\n",
+ "kernel trick and the result leads to the same as if we went through\n",
+ "the trouble of performing the transformation\n",
+ "$\\phi(\\boldsymbol{x}_i)^T\\phi(\\boldsymbol{x}_j)$ during the SVM calculations.\n",
+ "\n",
+ "\n",
+ "\n",
+ "## The problem to solve\n",
+ "Using our definition of the kernel We can rewrite again the Lagrangian"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{x}_i^T\\boldsymbol{z}_j,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to the constraints $\\lambda_i\\geq 0$, $\\sum_i\\lambda_iy_i=0$ in terms of a convex optimization problem"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{1}{2} \\boldsymbol{\\lambda}^T\\begin{bmatrix} y_1y_1K(\\boldsymbol{x}_1,\\boldsymbol{x}_1) & y_1y_2K(\\boldsymbol{x}_1,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_1,\\boldsymbol{x}_n) \\\\\n",
+ "y_2y_1K(\\boldsymbol{x}_2,\\boldsymbol{x}_1) & y_2y_2(\\boldsymbol{x}_2,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_2,\\boldsymbol{x}_n) \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "y_ny_1K(\\boldsymbol{x}_n,\\boldsymbol{x}_1) & y_ny_2K(\\boldsymbol{x}_n\\boldsymbol{x}_2) & \\dots & \\dots & y_ny_nK(\\boldsymbol{x}_n,\\boldsymbol{x}_n) \\\\\n",
+ "\\end{bmatrix}\\boldsymbol{\\lambda}-\\mathbb{1}\\boldsymbol{\\lambda},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to $\\boldsymbol{y}^T\\boldsymbol{\\lambda}=0$. Here we defined the vectors $\\boldsymbol{\\lambda} =[\\lambda_1,\\lambda_2,\\dots,\\lambda_n]$ and \n",
+ "$\\boldsymbol{y}=[y_1,y_2,\\dots,y_n]$. \n",
+ "If we add the slack constants this leads to the additional constraint $0\\leq \\lambda_i \\leq C$.\n",
+ "\n",
+ "We can rewrite this (see the solutions below) in terms of a convex optimization problem of the type"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\begin{align*}\n",
+ " &\\mathrm{min}_{\\lambda}\\hspace{0.2cm} \\frac{1}{2}\\boldsymbol{\\lambda}^T\\boldsymbol{P}\\boldsymbol{\\lambda}+\\boldsymbol{q}^T\\boldsymbol{\\lambda},\\\\ \\nonumber\n",
+ " &\\mathrm{subject\\hspace{0.1cm}to} \\hspace{0.2cm} \\boldsymbol{G}\\boldsymbol{\\lambda} \\preceq \\boldsymbol{h} \\hspace{0.2cm} \\wedge \\boldsymbol{A}\\boldsymbol{\\lambda}=f.\n",
+ "\\end{align*}\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Below we discuss how to solve these equations. Here we note that the matrix $\\boldsymbol{P}$ has matrix elements $p_{ij}=y_iy_jK(\\boldsymbol{x}_i,\\boldsymbol{x}_j)$.\n",
+ "Given a kernel $K$ and the targets $y_i$ this matrix is easy to set up. The constraint $\\boldsymbol{y}^T\\boldsymbol{\\lambda}=0$ leads to $f=0$ and $\\boldsymbol{A}=\\boldsymbol{y}$. How to set up the matrix $\\boldsymbol{G}$ is discussed later. Here note that the inequalities $0\\leq \\lambda_i \\leq C$ can be split up into\n",
+ "$0\\leq \\lambda_i$ and $\\lambda_i \\leq C$. These two inequalities define then the matrix $\\boldsymbol{G}$ and the vector $\\boldsymbol{h}$.\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Different kernels and Mercer's theorem\n",
+ "\n",
+ "There are several popular kernels being used. These are\n",
+ "1. Linear: $K(\\boldsymbol{x},\\boldsymbol{y})=\\boldsymbol{x}^T\\boldsymbol{y}$,\n",
+ "\n",
+ "2. Polynomial: $K(\\boldsymbol{x},\\boldsymbol{y})=(\\boldsymbol{x}^T\\boldsymbol{y}+\\gamma)^d$,\n",
+ "\n",
+ "3. Gaussian Radial Basis Function: $K(\\boldsymbol{x},\\boldsymbol{y})=\\exp{\\left(-\\gamma\\vert\\vert\\boldsymbol{x}-\\boldsymbol{y}\\vert\\vert^2\\right)}$,\n",
+ "\n",
+ "4. Tanh: $K(\\boldsymbol{x},\\boldsymbol{y})=\\tanh{(\\boldsymbol{x}^T\\boldsymbol{y}+\\gamma)}$,\n",
+ "\n",
+ "and many other ones.\n",
+ "\n",
+ "An important theorem for us is [Mercer's\n",
+ "theorem](https://en.wikipedia.org/wiki/Mercer%27s_theorem). The\n",
+ "theorem states that if a kernel function $K$ is symmetric, continuous\n",
+ "and leads to a positive semi-definite matrix $\\boldsymbol{P}$ then there\n",
+ "exists a function $\\phi$ that maps $\\boldsymbol{x}_i$ and $\\boldsymbol{x}_j$ into\n",
+ "another space (possibly with much higher dimensions) such that"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)=\\phi(\\boldsymbol{x}_i)^T\\phi(\\boldsymbol{x}_j).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "So you can use $K$ as a kernel since you know $\\phi$ exists, even if\n",
+ "you don’t know what $\\phi$ is. \n",
+ "\n",
+ "Note that some frequently used kernels (such as the Sigmoid kernel)\n",
+ "don’t respect all of Mercer’s conditions, yet they generally work well\n",
+ "in practice.\n",
+ "\n",
+ "\n",
+ "\n",
+ "## The moons example"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "from __future__ import division, print_function, unicode_literals\n",
+ "\n",
+ "import numpy as np\n",
+ "np.random.seed(42)\n",
+ "\n",
+ "import matplotlib\n",
+ "import matplotlib.pyplot as plt\n",
+ "plt.rcParams['axes.labelsize'] = 14\n",
+ "plt.rcParams['xtick.labelsize'] = 12\n",
+ "plt.rcParams['ytick.labelsize'] = 12\n",
+ "\n",
+ "\n",
+ "from sklearn.svm import SVC\n",
+ "from sklearn import datasets\n",
+ "\n",
+ "\n",
+ "\n",
+ "from sklearn.pipeline import Pipeline\n",
+ "from sklearn.preprocessing import StandardScaler\n",
+ "from sklearn.svm import LinearSVC\n",
+ "\n",
+ "\n",
+ "from sklearn.datasets import make_moons\n",
+ "X, y = make_moons(n_samples=100, noise=0.15, random_state=42)\n",
+ "\n",
+ "def plot_dataset(X, y, axes):\n",
+ " plt.plot(X[:, 0][y==0], X[:, 1][y==0], \"bs\")\n",
+ " plt.plot(X[:, 0][y==1], X[:, 1][y==1], \"g^\")\n",
+ " plt.axis(axes)\n",
+ " plt.grid(True, which='both')\n",
+ " plt.xlabel(r\"$x_1$\", fontsize=20)\n",
+ " plt.ylabel(r\"$x_2$\", fontsize=20, rotation=0)\n",
+ "\n",
+ "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n",
+ "plt.show()\n",
+ "\n",
+ "from sklearn.datasets import make_moons\n",
+ "from sklearn.pipeline import Pipeline\n",
+ "from sklearn.preprocessing import PolynomialFeatures\n",
+ "\n",
+ "polynomial_svm_clf = Pipeline([\n",
+ " (\"poly_features\", PolynomialFeatures(degree=3)),\n",
+ " (\"scaler\", StandardScaler()),\n",
+ " (\"svm_clf\", LinearSVC(C=10, loss=\"hinge\", random_state=42))\n",
+ " ])\n",
+ "\n",
+ "polynomial_svm_clf.fit(X, y)\n",
+ "\n",
+ "def plot_predictions(clf, axes):\n",
+ " x0s = np.linspace(axes[0], axes[1], 100)\n",
+ " x1s = np.linspace(axes[2], axes[3], 100)\n",
+ " x0, x1 = np.meshgrid(x0s, x1s)\n",
+ " X = np.c_[x0.ravel(), x1.ravel()]\n",
+ " y_pred = clf.predict(X).reshape(x0.shape)\n",
+ " y_decision = clf.decision_function(X).reshape(x0.shape)\n",
+ " plt.contourf(x0, x1, y_pred, cmap=plt.cm.brg, alpha=0.2)\n",
+ " plt.contourf(x0, x1, y_decision, cmap=plt.cm.brg, alpha=0.1)\n",
+ "\n",
+ "plot_predictions(polynomial_svm_clf, [-1.5, 2.5, -1, 1.5])\n",
+ "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n",
+ "\n",
+ "plt.show()\n",
+ "\n",
+ "\n",
+ "from sklearn.svm import SVC\n",
+ "\n",
+ "poly_kernel_svm_clf = Pipeline([\n",
+ " (\"scaler\", StandardScaler()),\n",
+ " (\"svm_clf\", SVC(kernel=\"poly\", degree=3, coef0=1, C=5))\n",
+ " ])\n",
+ "poly_kernel_svm_clf.fit(X, y)\n",
+ "\n",
+ "poly100_kernel_svm_clf = Pipeline([\n",
+ " (\"scaler\", StandardScaler()),\n",
+ " (\"svm_clf\", SVC(kernel=\"poly\", degree=10, coef0=100, C=5))\n",
+ " ])\n",
+ "poly100_kernel_svm_clf.fit(X, y)\n",
+ "\n",
+ "plt.figure(figsize=(11, 4))\n",
+ "\n",
+ "plt.subplot(121)\n",
+ "plot_predictions(poly_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])\n",
+ "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n",
+ "plt.title(r\"$d=3, r=1, C=5$\", fontsize=18)\n",
+ "\n",
+ "plt.subplot(122)\n",
+ "plot_predictions(poly100_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])\n",
+ "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n",
+ "plt.title(r\"$d=10, r=100, C=5$\", fontsize=18)\n",
+ "\n",
+ "plt.show()\n",
+ "\n",
+ "def gaussian_rbf(x, landmark, gamma):\n",
+ " return np.exp(-gamma * np.linalg.norm(x - landmark, axis=1)**2)\n",
+ "\n",
+ "gamma = 0.3\n",
+ "\n",
+ "x1s = np.linspace(-4.5, 4.5, 200).reshape(-1, 1)\n",
+ "x2s = gaussian_rbf(x1s, -2, gamma)\n",
+ "x3s = gaussian_rbf(x1s, 1, gamma)\n",
+ "\n",
+ "XK = np.c_[gaussian_rbf(X1D, -2, gamma), gaussian_rbf(X1D, 1, gamma)]\n",
+ "yk = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])\n",
+ "\n",
+ "plt.figure(figsize=(11, 4))\n",
+ "\n",
+ "plt.subplot(121)\n",
+ "plt.grid(True, which='both')\n",
+ "plt.axhline(y=0, color='k')\n",
+ "plt.scatter(x=[-2, 1], y=[0, 0], s=150, alpha=0.5, c=\"red\")\n",
+ "plt.plot(X1D[:, 0][yk==0], np.zeros(4), \"bs\")\n",
+ "plt.plot(X1D[:, 0][yk==1], np.zeros(5), \"g^\")\n",
+ "plt.plot(x1s, x2s, \"g--\")\n",
+ "plt.plot(x1s, x3s, \"b:\")\n",
+ "plt.gca().get_yaxis().set_ticks([0, 0.25, 0.5, 0.75, 1])\n",
+ "plt.xlabel(r\"$x_1$\", fontsize=20)\n",
+ "plt.ylabel(r\"Similarity\", fontsize=14)\n",
+ "plt.annotate(r'$\\mathbf{x}$',\n",
+ " xy=(X1D[3, 0], 0),\n",
+ " xytext=(-0.5, 0.20),\n",
+ " ha=\"center\",\n",
+ " arrowprops=dict(facecolor='black', shrink=0.1),\n",
+ " fontsize=18,\n",
+ " )\n",
+ "plt.text(-2, 0.9, \"$x_2$\", ha=\"center\", fontsize=20)\n",
+ "plt.text(1, 0.9, \"$x_3$\", ha=\"center\", fontsize=20)\n",
+ "plt.axis([-4.5, 4.5, -0.1, 1.1])\n",
+ "\n",
+ "plt.subplot(122)\n",
+ "plt.grid(True, which='both')\n",
+ "plt.axhline(y=0, color='k')\n",
+ "plt.axvline(x=0, color='k')\n",
+ "plt.plot(XK[:, 0][yk==0], XK[:, 1][yk==0], \"bs\")\n",
+ "plt.plot(XK[:, 0][yk==1], XK[:, 1][yk==1], \"g^\")\n",
+ "plt.xlabel(r\"$x_2$\", fontsize=20)\n",
+ "plt.ylabel(r\"$x_3$ \", fontsize=20, rotation=0)\n",
+ "plt.annotate(r'$\\phi\\left(\\mathbf{x}\\right)$',\n",
+ " xy=(XK[3, 0], XK[3, 1]),\n",
+ " xytext=(0.65, 0.50),\n",
+ " ha=\"center\",\n",
+ " arrowprops=dict(facecolor='black', shrink=0.1),\n",
+ " fontsize=18,\n",
+ " )\n",
+ "plt.plot([-0.1, 1.1], [0.57, -0.1], \"r--\", linewidth=3)\n",
+ "plt.axis([-0.1, 1.1, -0.1, 1.1])\n",
+ " \n",
+ "plt.subplots_adjust(right=1)\n",
+ "\n",
+ "plt.show()\n",
+ "\n",
+ "\n",
+ "x1_example = X1D[3, 0]\n",
+ "for landmark in (-2, 1):\n",
+ " k = gaussian_rbf(np.array([[x1_example]]), np.array([[landmark]]), gamma)\n",
+ " print(\"Phi({}, {}) = {}\".format(x1_example, landmark, k))\n",
+ "\n",
+ "rbf_kernel_svm_clf = Pipeline([\n",
+ " (\"scaler\", StandardScaler()),\n",
+ " (\"svm_clf\", SVC(kernel=\"rbf\", gamma=5, C=0.001))\n",
+ " ])\n",
+ "rbf_kernel_svm_clf.fit(X, y)\n",
+ "\n",
+ "\n",
+ "from sklearn.svm import SVC\n",
+ "\n",
+ "gamma1, gamma2 = 0.1, 5\n",
+ "C1, C2 = 0.001, 1000\n",
+ "hyperparams = (gamma1, C1), (gamma1, C2), (gamma2, C1), (gamma2, C2)\n",
+ "\n",
+ "svm_clfs = []\n",
+ "for gamma, C in hyperparams:\n",
+ " rbf_kernel_svm_clf = Pipeline([\n",
+ " (\"scaler\", StandardScaler()),\n",
+ " (\"svm_clf\", SVC(kernel=\"rbf\", gamma=gamma, C=C))\n",
+ " ])\n",
+ " rbf_kernel_svm_clf.fit(X, y)\n",
+ " svm_clfs.append(rbf_kernel_svm_clf)\n",
+ "\n",
+ "plt.figure(figsize=(11, 7))\n",
+ "\n",
+ "for i, svm_clf in enumerate(svm_clfs):\n",
+ " plt.subplot(221 + i)\n",
+ " plot_predictions(svm_clf, [-1.5, 2.5, -1, 1.5])\n",
+ " plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n",
+ " gamma, C = hyperparams[i]\n",
+ " plt.title(r\"$\\gamma = {}, C = {}$\".format(gamma, C), fontsize=16)\n",
+ "\n",
+ "plt.show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Mathematical optimization of convex functions\n",
+ "\n",
+ "A mathematical (quadratic) optimization problem, or just optimization problem, has the form"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\begin{align*}\n",
+ " &\\mathrm{min}_{\\lambda}\\hspace{0.2cm} \\frac{1}{2}\\boldsymbol{\\lambda}^T\\boldsymbol{P}\\boldsymbol{\\lambda}+\\boldsymbol{q}^T\\boldsymbol{\\lambda},\\\\ \\nonumber\n",
+ " &\\mathrm{subject\\hspace{0.1cm}to} \\hspace{0.2cm} \\boldsymbol{G}\\boldsymbol{\\lambda} \\preceq \\boldsymbol{h} \\wedge \\boldsymbol{A}\\boldsymbol{\\lambda}=f.\n",
+ "\\end{align*}\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to some constraints for say a selected set $i=1,2,\\dots, n$.\n",
+ "In our case we are optimizing with respect to the Lagrangian multipliers $\\lambda_i$, and the\n",
+ "vector $\\boldsymbol{\\lambda}=[\\lambda_1, \\lambda_2,\\dots, \\lambda_n]$ is the optimization variable we are dealing with.\n",
+ "\n",
+ "In our case we are particularly interested in a class of optimization problems called convex optmization problems. \n",
+ "In our discussion on gradient descent methods we discussed at length the definition of a convex function. \n",
+ "\n",
+ "Convex optimization problems play a central role in applied mathematics and we recommend strongly [Boyd and Vandenberghe's text on the topics](http://web.stanford.edu/~boyd/cvxbook/).\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "## How do we solve these problems?\n",
+ "\n",
+ "If we use Python as programming language and wish to venture beyond\n",
+ "**scikit-learn**, **tensorflow** and similar software which makes our\n",
+ "lives so much easier, we need to dive into the wonderful world of\n",
+ "quadratic programming. We can, if we wish, solve the minimization\n",
+ "problem using say standard gradient methods or conjugate gradient\n",
+ "methods. However, these methods tend to exhibit a rather slow\n",
+ "converge. So, welcome to the promised land of quadratic programming.\n",
+ "\n",
+ "The functions we need are contained in the quadratic programming package **CVXOPT** and we need to import it together with **numpy** as"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "import numpy\n",
+ "import cvxopt"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "This will make our life much easier. You don't need t write your own optimizer.\n",
+ "\n",
+ "\n",
+ "\n",
+ "## A simple example\n",
+ "\n",
+ "We remind ourselves about the general problem we want to solve"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\begin{align*}\n",
+ " &\\mathrm{min}_{x}\\hspace{0.2cm} \\frac{1}{2}\\boldsymbol{x}^T\\boldsymbol{P}\\boldsymbol{x}+\\boldsymbol{q}^T\\boldsymbol{x},\\\\ \\nonumber\n",
+ " &\\mathrm{subject\\hspace{0.1cm} to} \\hspace{0.2cm} \\boldsymbol{G}\\boldsymbol{x} \\preceq \\boldsymbol{h} \\wedge \\boldsymbol{A}\\boldsymbol{x}=f.\n",
+ "\\end{align*}\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Let us show how to perform the optmization using a simple case. Assume we want to optimize the following problem"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\begin{align*}\n",
+ " &\\mathrm{min}_{x}\\hspace{0.2cm} \\frac{1}{2}x^2+5x+3y \\\\ \\nonumber\n",
+ " &\\mathrm{subject to} \\\\ \\nonumber\n",
+ " &x, y \\geq 0 \\\\ \\nonumber\n",
+ " &x+3y \\geq 15 \\\\ \\nonumber\n",
+ " &2x+5y \\leq 100 \\\\ \\nonumber\n",
+ " &3x+4y \\leq 80. \\\\ \\nonumber\n",
+ "\\end{align*}\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "The minimization problem can be rewritten in terms of vectors and matrices as (with $x$ and $y$ being the unknowns)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{1}{2}\\begin{bmatrix} x\\\\ y \\end{bmatrix}^T \\begin{bmatrix} 1 & 0\\\\ 0 & 0 \\end{bmatrix} \\begin{bmatrix} x \\\\ y \\end{bmatrix} + \\begin{bmatrix}3\\\\ 4 \\end{bmatrix}^T \\begin{bmatrix}x \\\\ y \\end{bmatrix}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Similarly, we can now set up the inequalities (we need to change $\\geq$ to $\\leq$ by multiplying with $-1$ on bot sides) as the following matrix-vector equation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\begin{bmatrix} -1 & 0 \\\\ 0 & -1 \\\\ -1 & -3 \\\\ 2 & 5 \\\\ 3 & 4\\end{bmatrix}\\begin{bmatrix} x \\\\ y\\end{bmatrix} \\preceq \\begin{bmatrix}0 \\\\ 0\\\\ -15 \\\\ 100 \\\\ 80\\end{bmatrix}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We have collapsed all the inequalities into a single matrix $\\boldsymbol{G}$. We see also that our matrix"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{P} =\\begin{bmatrix} 1 & 0\\\\ 0 & 0 \\end{bmatrix}\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "is clearly positive semi-definite (all eigenvalues larger or equal zero). \n",
+ "Finally, the vector $\\boldsymbol{h}$ is defined as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{h} = \\begin{bmatrix}0 \\\\ 0\\\\ -15 \\\\ 100 \\\\ 80\\end{bmatrix}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Since we don't have any equalities the matrix $\\boldsymbol{A}$ is set to zero\n",
+ "The following code solves the equations for us"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "# Import the necessary packages\n",
+ "import numpy\n",
+ "from cvxopt import matrix\n",
+ "from cvxopt import solvers\n",
+ "P = matrix(numpy.diag([1,0]), tc=’d’)\n",
+ "q = matrix(numpy.array([3,4]), tc=’d’)\n",
+ "G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc=’d’)\n",
+ "h = matrix(numpy.array([0,0,-15,100,80]), tc=’d’)\n",
+ "# Construct the QP, invoke solver\n",
+ "sol = solvers.qp(P,q,G,h)\n",
+ "# Extract optimal value and solution\n",
+ "sol[’x’] \n",
+ "sol[’primal objective’]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Back to the more realistic cases\n",
+ "\n",
+ "We are now ready to return to our setup of the optmization problem for a more realistic case. Introducing the **slack** parameter $C$ we have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{1}{2} \\boldsymbol{\\lambda}^T\\begin{bmatrix} y_1y_1K(\\boldsymbol{x}_1,\\boldsymbol{x}_1) & y_1y_2K(\\boldsymbol{x}_1,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_1,\\boldsymbol{x}_n) \\\\\n",
+ "y_2y_1K(\\boldsymbol{x}_2,\\boldsymbol{x}_1) & y_2y_2K(\\boldsymbol{x}_2,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_2,\\boldsymbol{x}_n) \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "y_ny_1K(\\boldsymbol{x}_n,\\boldsymbol{x}_1) & y_ny_2K(\\boldsymbol{x}_n\\boldsymbol{x}_2) & \\dots & \\dots & y_ny_nK(\\boldsymbol{x}_n,\\boldsymbol{x}_n) \\\\\n",
+ "\\end{bmatrix}\\boldsymbol{\\lambda}-\\mathbb{I}\\boldsymbol{\\lambda},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "subject to $\\boldsymbol{y}^T\\boldsymbol{\\lambda}=0$. Here we defined the vectors $\\boldsymbol{\\lambda} =[\\lambda_1,\\lambda_2,\\dots,\\lambda_n]$ and \n",
+ "$\\boldsymbol{y}=[y_1,y_2,\\dots,y_n]$. \n",
+ "With the slack constants this leads to the additional constraint $0\\leq \\lambda_i \\leq C$.\n",
+ "\n",
+ "**code will be added**"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
diff --git a/doc/src/LectureNotes/chapter8.ipynb b/doc/src/LectureNotes/chapter8.ipynb
new file mode 100644
index 000000000..86dc8a18f
--- /dev/null
+++ b/doc/src/LectureNotes/chapter8.ipynb
@@ -0,0 +1,1923 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Dimensionality Reduction\n",
+ "\n",
+ "\n",
+ "## Reducing the number of degrees of freedom, overarching view\n",
+ "\n",
+ "Many Machine Learning problems involve thousands or even millions of\n",
+ "features for each training instance. Not only does this make training\n",
+ "extremely slow, it can also make it much harder to find a good\n",
+ "solution, as we will see. This problem is often referred to as the\n",
+ "curse of dimensionality. Fortunately, in real-world problems, it is\n",
+ "often possible to reduce the number of features considerably, turning\n",
+ "an intractable problem into a tractable one.\n",
+ "\n",
+ "Here we will discuss some of the most popular dimensionality reduction\n",
+ "techniques: the principal component analysis (PCA), Kernel PCA, and\n",
+ "Locally Linear Embedding (LLE). Furthermore, we will start by looking\n",
+ "at some simple preprocessing of the data which allow us to rescale the\n",
+ "data.\n",
+ "\n",
+ "Principal component analysis and its various variants deal with the\n",
+ "problem of fitting a low-dimensional [affine\n",
+ "subspace](https://en.wikipedia.org/wiki/Affine_space) to a set of of\n",
+ "data points in a high-dimensional space. With its family of methods it\n",
+ "is one of the most used tools in data modeling, compression and\n",
+ "visualization.\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Preprocessing our data\n",
+ "\n",
+ "Before we proceed however, we will discuss how to preprocess our\n",
+ "data. Till now and in connection with our previous examples we have\n",
+ "not met so many cases where we are too sensitive to the scaling of our\n",
+ "data. Normally the data may need a rescaling and/or may be sensitive\n",
+ "to extreme values. Scaling the data renders our inputs much more\n",
+ "suitable for the algorithms we want to employ.\n",
+ "\n",
+ "**Scikit-Learn** has several functions which allow us to rescale the\n",
+ "data, normally resulting in much better results in terms of various\n",
+ "accuracy scores. The **StandardScaler** function in **Scikit-Learn**\n",
+ "ensures that for each feature/predictor we study the mean value is\n",
+ "zero and the variance is one (every column in the design/feature\n",
+ "matrix). This scaling has the drawback that it does not ensure that\n",
+ "we have a particular maximum or minimum in our data set. Another\n",
+ "function included in **Scikit-Learn** is the **MinMaxScaler** which\n",
+ "ensures that all features are exactly between $0$ and $1$. The\n",
+ "\n",
+ "\n",
+ "## More preprocessing\n",
+ "\n",
+ "\n",
+ "The **Normalizer** scales each data\n",
+ "point such that the feature vector has a euclidean length of one. In other words, it\n",
+ "projects a data point on the circle (or sphere in the case of higher dimensions) with a\n",
+ "radius of 1. This means every data point is scaled by a different number (by the\n",
+ "inverse of it’s length).\n",
+ "This normalization is often used when only the direction (or angle) of the data matters,\n",
+ "not the length of the feature vector.\n",
+ "\n",
+ "The **RobustScaler** works similarly to the StandardScaler in that it\n",
+ "ensures statistical properties for each feature that guarantee that\n",
+ "they are on the same scale. However, the RobustScaler uses the median\n",
+ "and quartiles, instead of mean and variance. This makes the\n",
+ "RobustScaler ignore data points that are very different from the rest\n",
+ "(like measurement errors). These odd data points are also called\n",
+ "outliers, and might often lead to trouble for other scaling\n",
+ "techniques.\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Simple preprocessing examples, Franke function and regression"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "%matplotlib inline\n",
+ "\n",
+ "# Common imports\n",
+ "import os\n",
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "import matplotlib.pyplot as plt\n",
+ "import sklearn.linear_model as skl\n",
+ "from sklearn.metrics import mean_squared_error\n",
+ "from sklearn.model_selection import train_test_split\n",
+ "from sklearn.preprocessing import MinMaxScaler, StandardScaler, Normalizer\n",
+ "from sklearn.svm import SVR\n",
+ "\n",
+ "# Where to save the figures and data files\n",
+ "PROJECT_ROOT_DIR = \"Results\"\n",
+ "FIGURE_ID = \"Results/FigureFiles\"\n",
+ "DATA_ID = \"DataFiles/\"\n",
+ "\n",
+ "if not os.path.exists(PROJECT_ROOT_DIR):\n",
+ " os.mkdir(PROJECT_ROOT_DIR)\n",
+ "\n",
+ "if not os.path.exists(FIGURE_ID):\n",
+ " os.makedirs(FIGURE_ID)\n",
+ "\n",
+ "if not os.path.exists(DATA_ID):\n",
+ " os.makedirs(DATA_ID)\n",
+ "\n",
+ "def image_path(fig_id):\n",
+ " return os.path.join(FIGURE_ID, fig_id)\n",
+ "\n",
+ "def data_path(dat_id):\n",
+ " return os.path.join(DATA_ID, dat_id)\n",
+ "\n",
+ "def save_fig(fig_id):\n",
+ " plt.savefig(image_path(fig_id) + \".png\", format='png')\n",
+ "\n",
+ "\n",
+ "def FrankeFunction(x,y):\n",
+ "\tterm1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))\n",
+ "\tterm2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))\n",
+ "\tterm3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))\n",
+ "\tterm4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)\n",
+ "\treturn term1 + term2 + term3 + term4\n",
+ "\n",
+ "\n",
+ "def create_X(x, y, n ):\n",
+ "\tif len(x.shape) > 1:\n",
+ "\t\tx = np.ravel(x)\n",
+ "\t\ty = np.ravel(y)\n",
+ "\n",
+ "\tN = len(x)\n",
+ "\tl = int((n+1)*(n+2)/2)\t\t# Number of elements in beta\n",
+ "\tX = np.ones((N,l))\n",
+ "\n",
+ "\tfor i in range(1,n+1):\n",
+ "\t\tq = int((i)*(i+1)/2)\n",
+ "\t\tfor k in range(i+1):\n",
+ "\t\t\tX[:,q+k] = (x**(i-k))*(y**k)\n",
+ "\n",
+ "\treturn X\n",
+ "\n",
+ "\n",
+ "# Making meshgrid of datapoints and compute Franke's function\n",
+ "n = 5\n",
+ "N = 1000\n",
+ "x = np.sort(np.random.uniform(0, 1, N))\n",
+ "y = np.sort(np.random.uniform(0, 1, N))\n",
+ "z = FrankeFunction(x, y)\n",
+ "X = create_X(x, y, n=n) \n",
+ "# split in training and test data\n",
+ "X_train, X_test, y_train, y_test = train_test_split(X,z,test_size=0.2)\n",
+ "\n",
+ "\n",
+ "svm = SVR(gamma='auto',C=10.0)\n",
+ "svm.fit(X_train, y_train)\n",
+ "\n",
+ "# The mean squared error and R2 score\n",
+ "print(\"MSE before scaling: {:.2f}\".format(mean_squared_error(svm.predict(X_test), y_test)))\n",
+ "print(\"R2 score before scaling {:.2f}\".format(svm.score(X_test,y_test)))\n",
+ "\n",
+ "scaler = StandardScaler()\n",
+ "scaler.fit(X_train)\n",
+ "X_train_scaled = scaler.transform(X_train)\n",
+ "X_test_scaled = scaler.transform(X_test)\n",
+ "\n",
+ "print(\"Feature min values before scaling:\\n {}\".format(X_train.min(axis=0)))\n",
+ "print(\"Feature max values before scaling:\\n {}\".format(X_train.max(axis=0)))\n",
+ "\n",
+ "print(\"Feature min values after scaling:\\n {}\".format(X_train_scaled.min(axis=0)))\n",
+ "print(\"Feature max values after scaling:\\n {}\".format(X_train_scaled.max(axis=0)))\n",
+ "\n",
+ "svm = SVR(gamma='auto',C=10.0)\n",
+ "svm.fit(X_train_scaled, y_train)\n",
+ "\n",
+ "print(\"MSE after scaling: {:.2f}\".format(mean_squared_error(svm.predict(X_test_scaled), y_test)))\n",
+ "print(\"R2 score for scaled data: {:.2f}\".format(svm.score(X_test_scaled,y_test)))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Simple preprocessing examples, breast cancer data and classification, Support Vector Machines\n",
+ "\n",
+ "We show here how we can use a simple regression case on the breast\n",
+ "cancer data using support vector machines (SVM) as algorithm for\n",
+ "classification."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "import matplotlib.pyplot as plt\n",
+ "import numpy as np\n",
+ "from sklearn.model_selection import train_test_split \n",
+ "from sklearn.datasets import load_breast_cancer\n",
+ "from sklearn.svm import SVC\n",
+ "cancer = load_breast_cancer()\n",
+ "\n",
+ "X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)\n",
+ "print(X_train.shape)\n",
+ "print(X_test.shape)\n",
+ "\n",
+ "svm = SVC(C=100)\n",
+ "svm.fit(X_train, y_train)\n",
+ "print(\"Test set accuracy: {:.2f}\".format(svm.score(X_test,y_test)))\n",
+ "\n",
+ "from sklearn.preprocessing import MinMaxScaler, StandardScaler\n",
+ "scaler = MinMaxScaler()\n",
+ "scaler.fit(X_train)\n",
+ "X_train_scaled = scaler.transform(X_train)\n",
+ "X_test_scaled = scaler.transform(X_test)\n",
+ "\n",
+ "print(\"Feature min values before scaling:\\n {}\".format(X_train.min(axis=0)))\n",
+ "print(\"Feature max values before scaling:\\n {}\".format(X_train.max(axis=0)))\n",
+ "\n",
+ "print(\"Feature min values before scaling:\\n {}\".format(X_train_scaled.min(axis=0)))\n",
+ "print(\"Feature max values before scaling:\\n {}\".format(X_train_scaled.max(axis=0)))\n",
+ "\n",
+ "\n",
+ "svm.fit(X_train_scaled, y_train)\n",
+ "print(\"Test set accuracy scaled data with Min-Max scaling: {:.2f}\".format(svm.score(X_test_scaled,y_test)))\n",
+ "\n",
+ "scaler = StandardScaler()\n",
+ "scaler.fit(X_train)\n",
+ "X_train_scaled = scaler.transform(X_train)\n",
+ "X_test_scaled = scaler.transform(X_test)\n",
+ "\n",
+ "svm.fit(X_train_scaled, y_train)\n",
+ "print(\"Test set accuracy scaled data with Standar Scaler: {:.2f}\".format(svm.score(X_test_scaled,y_test)))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## More on Cancer Data, now with Logistic Regression"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "import matplotlib.pyplot as plt\n",
+ "import numpy as np\n",
+ "from sklearn.model_selection import train_test_split \n",
+ "from sklearn.datasets import load_breast_cancer\n",
+ "from sklearn.linear_model import LogisticRegression\n",
+ "cancer = load_breast_cancer()\n",
+ "\n",
+ "# Set up training data\n",
+ "X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)\n",
+ "logreg = LogisticRegression()\n",
+ "logreg.fit(X_train, y_train)\n",
+ "print(\"Test set accuracy: {:.2f}\".format(logreg.score(X_test,y_test)))\n",
+ "\n",
+ "# Scale data\n",
+ "from sklearn.preprocessing import StandardScaler\n",
+ "scaler = StandardScaler()\n",
+ "scaler.fit(X_train)\n",
+ "X_train_scaled = scaler.transform(X_train)\n",
+ "X_test_scaled = scaler.transform(X_test)\n",
+ "logreg.fit(X_train_scaled, y_train)\n",
+ "print(\"Test set accuracy scaled data: {:.2f}\".format(logreg.score(X_test_scaled,y_test)))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Why should we think of reducing the dimensionality\n",
+ "\n",
+ "In addition to the plot of the features, we study now also the covariance (and the correlation matrix).\n",
+ "We use also **Pandas** to compute the correlation matrix."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "import matplotlib.pyplot as plt\n",
+ "import numpy as np\n",
+ "from sklearn.model_selection import train_test_split \n",
+ "from sklearn.datasets import load_breast_cancer\n",
+ "from sklearn.linear_model import LogisticRegression\n",
+ "cancer = load_breast_cancer()\n",
+ "import pandas as pd\n",
+ "# Making a data frame\n",
+ "cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names)\n",
+ "\n",
+ "fig, axes = plt.subplots(15,2,figsize=(10,20))\n",
+ "malignant = cancer.data[cancer.target == 0]\n",
+ "benign = cancer.data[cancer.target == 1]\n",
+ "ax = axes.ravel()\n",
+ "\n",
+ "for i in range(30):\n",
+ " _, bins = np.histogram(cancer.data[:,i], bins =50)\n",
+ " ax[i].hist(malignant[:,i], bins = bins, alpha = 0.5)\n",
+ " ax[i].hist(benign[:,i], bins = bins, alpha = 0.5)\n",
+ " ax[i].set_title(cancer.feature_names[i])\n",
+ " ax[i].set_yticks(())\n",
+ "ax[0].set_xlabel(\"Feature magnitude\")\n",
+ "ax[0].set_ylabel(\"Frequency\")\n",
+ "ax[0].legend([\"Malignant\", \"Benign\"], loc =\"best\")\n",
+ "fig.tight_layout()\n",
+ "plt.show()\n",
+ "\n",
+ "import seaborn as sns\n",
+ "correlation_matrix = cancerpd.corr().round(1)\n",
+ "# use the heatmap function from seaborn to plot the correlation matrix\n",
+ "# annot = True to print the values inside the square\n",
+ "sns.heatmap(data=correlation_matrix, annot=True)\n",
+ "plt.show()\n",
+ "\n",
+ "#print eigvalues of correlation matrix\n",
+ "EigValues, EigVectors = np.linalg.eig(correlation_matrix)\n",
+ "print(EigValues)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "In the above example we note two things. In the first plot we display\n",
+ "the overlap of benign and malignant tumors as functions of the various\n",
+ "features in the Wisconsing breast cancer data set. We see that for\n",
+ "some of the features we can distinguish clearly the benign and\n",
+ "malignant cases while for other features we cannot. This can point to\n",
+ "us which features may be of greater interest when we wish to classify\n",
+ "a benign or not benign tumour.\n",
+ "\n",
+ "In the second figure we have computed the so-called correlation\n",
+ "matrix, which in our case with thirty features becomes a $30\\times 30$\n",
+ "matrix.\n",
+ "\n",
+ "We constructed this matrix using **pandas** via the statements"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and then"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "correlation_matrix = cancerpd.corr().round(1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Diagonalizing this matrix we can in turn say something about which\n",
+ "features are of relevance and which are not. But before we proceed we\n",
+ "need to define covariance and correlation matrices. This leads us to\n",
+ "the classical Principal Component Analysis (PCA) theorem with\n",
+ "applications.\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Basic ideas of the Principal Component Analysis (PCA)\n",
+ "\n",
+ "The principal component analysis deals with the problem of fitting a\n",
+ "low-dimensional affine subspace $S$ of dimension $d$ much smaller than\n",
+ "the totaldimension $D$ of the problem at hand (our data\n",
+ "set). Mathematically it can be formulated as a statistical problem or\n",
+ "a geometric problem. In our discussion of the theorem for the\n",
+ "classical PCA, we will stay with a statistical approach. This is also\n",
+ "what set the scene historically which for the PCA.\n",
+ "\n",
+ "We have a data set defined by a design/feature matrix $\\boldsymbol{X}$ (see below for its definition) \n",
+ "* Each data point is determined by $p$ extrinsic (measurement) variables\n",
+ "\n",
+ "* We may want to ask the following question: Are there fewer intrinsic variables (say $d << p$) that still approximately describe the data?\n",
+ "\n",
+ "* If so, these intrinsic variables may tell us something important and finding these intrinsic variables is what dimension reduction methods do. \n",
+ "\n",
+ "## Introducing the Covariance and Correlation functions\n",
+ "\n",
+ "Before we discuss the PCA theorem, we need to remind ourselves about\n",
+ "the definition of the covariance and the correlation function. These are quantities \n",
+ "\n",
+ "Suppose we have defined two vectors\n",
+ "$\\hat{x}$ and $\\hat{y}$ with $n$ elements each. The covariance matrix $\\boldsymbol{C}$ is defined as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x},\\boldsymbol{y}] = \\begin{bmatrix} \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{x}] & \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] \\\\\n",
+ " \\mathrm{cov}[\\boldsymbol{y},\\boldsymbol{x}] & \\mathrm{cov}[\\boldsymbol{y},\\boldsymbol{y}] \\\\\n",
+ " \\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where for example"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] =\\frac{1}{n} \\sum_{i=0}^{n-1}(x_i- \\overline{x})(y_i- \\overline{y}).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "With this definition and recalling that the variance is defined as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mathrm{var}[\\boldsymbol{x}]=\\frac{1}{n} \\sum_{i=0}^{n-1}(x_i- \\overline{x})^2,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "we can rewrite the covariance matrix as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x},\\boldsymbol{y}] = \\begin{bmatrix} \\mathrm{var}[\\boldsymbol{x}] & \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] \\\\\n",
+ " \\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}] & \\mathrm{var}[\\boldsymbol{y}] \\\\\n",
+ " \\end{bmatrix}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "The covariance takes values between zero and infinity and may thus\n",
+ "lead to problems with loss of numerical precision for particularly\n",
+ "large values. It is common to scale the covariance matrix by\n",
+ "introducing instead the correlation matrix defined via the so-called\n",
+ "correlation function"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mathrm{corr}[\\boldsymbol{x},\\boldsymbol{y}]=\\frac{\\mathrm{cov}[\\boldsymbol{x},\\boldsymbol{y}]}{\\sqrt{\\mathrm{var}[\\boldsymbol{x}] \\mathrm{var}[\\boldsymbol{y}]}}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "The correlation function is then given by values $\\mathrm{corr}[\\boldsymbol{x},\\boldsymbol{y}]\n",
+ "\\in [-1,1]$. This avoids eventual problems with too large values. We\n",
+ "can then define the correlation matrix for the two vectors $\\boldsymbol{x}$\n",
+ "and $\\boldsymbol{y}$ as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{K}[\\boldsymbol{x},\\boldsymbol{y}] = \\begin{bmatrix} 1 & \\mathrm{corr}[\\boldsymbol{x},\\boldsymbol{y}] \\\\\n",
+ " \\mathrm{corr}[\\boldsymbol{y},\\boldsymbol{x}] & 1 \\\\\n",
+ " \\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "In the above example this is the function we constructed using **pandas**.\n",
+ "\n",
+ "\n",
+ "## Correlation Function and Design/Feature Matrix\n",
+ "\n",
+ "In our derivation of the various regression algorithms like **Ordinary Least Squares** or **Ridge regression**\n",
+ "we defined the design/feature matrix $\\boldsymbol{X}$ as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{X}=\\begin{bmatrix}\n",
+ "x_{0,0} & x_{0,1} & x_{0,2}& \\dots & \\dots x_{0,p-1}\\\\\n",
+ "x_{1,0} & x_{1,1} & x_{1,2}& \\dots & \\dots x_{1,p-1}\\\\\n",
+ "x_{2,0} & x_{2,1} & x_{2,2}& \\dots & \\dots x_{2,p-1}\\\\\n",
+ "\\dots & \\dots & \\dots & \\dots \\dots & \\dots \\\\\n",
+ "x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \\dots & \\dots x_{n-2,p-1}\\\\\n",
+ "x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \\dots & \\dots x_{n-1,p-1}\\\\\n",
+ "\\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "with $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$, with the predictors/features $p$ refering to the column numbers and the\n",
+ "entries $n$ being the row elements.\n",
+ "We can rewrite the design/feature matrix in terms of its column vectors as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{X}=\\begin{bmatrix} \\boldsymbol{x}_0 & \\boldsymbol{x}_1 & \\boldsymbol{x}_2 & \\dots & \\dots & \\boldsymbol{x}_{p-1}\\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "with a given vector"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{x}_i^T = \\begin{bmatrix}x_{0,i} & x_{1,i} & x_{2,i}& \\dots & \\dots x_{n-1,i}\\end{bmatrix}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "With these definitions, we can now rewrite our $2\\times 2$\n",
+ "correaltion/covariance matrix in terms of a moe general design/feature\n",
+ "matrix $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$. This leads to a $p\\times p$\n",
+ "covariance matrix for the vectors $\\boldsymbol{x}_i$ with $i=0,1,\\dots,p-1$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x}] = \\begin{bmatrix}\n",
+ "\\mathrm{var}[\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_{p-1}]\\\\\n",
+ "\\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_0] & \\mathrm{var}[\\boldsymbol{x}_1] & \\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_{p-1}]\\\\\n",
+ "\\mathrm{cov}[\\boldsymbol{x}_2,\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_2,\\boldsymbol{x}_1] & \\mathrm{var}[\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{cov}[\\boldsymbol{x}_2,\\boldsymbol{x}_{p-1}]\\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "\\mathrm{cov}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_1] & \\mathrm{cov}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_{2}] & \\dots & \\dots & \\mathrm{var}[\\boldsymbol{x}_{p-1}]\\\\\n",
+ "\\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and the correlation matrix"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{K}[\\boldsymbol{x}] = \\begin{bmatrix}\n",
+ "1 & \\mathrm{corr}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] & \\mathrm{corr}[\\boldsymbol{x}_0,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{corr}[\\boldsymbol{x}_0,\\boldsymbol{x}_{p-1}]\\\\\n",
+ "\\mathrm{corr}[\\boldsymbol{x}_1,\\boldsymbol{x}_0] & 1 & \\mathrm{corr}[\\boldsymbol{x}_1,\\boldsymbol{x}_2] & \\dots & \\dots & \\mathrm{corr}[\\boldsymbol{x}_1,\\boldsymbol{x}_{p-1}]\\\\\n",
+ "\\mathrm{corr}[\\boldsymbol{x}_2,\\boldsymbol{x}_0] & \\mathrm{corr}[\\boldsymbol{x}_2,\\boldsymbol{x}_1] & 1 & \\dots & \\dots & \\mathrm{corr}[\\boldsymbol{x}_2,\\boldsymbol{x}_{p-1}]\\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "\\dots & \\dots & \\dots & \\dots & \\dots & \\dots \\\\\n",
+ "\\mathrm{corr}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_0] & \\mathrm{corr}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_1] & \\mathrm{corr}[\\boldsymbol{x}_{p-1},\\boldsymbol{x}_{2}] & \\dots & \\dots & 1\\\\\n",
+ "\\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Covariance Matrix Examples\n",
+ "\n",
+ "\n",
+ "The Numpy function **np.cov** calculates the covariance elements using\n",
+ "the factor $1/(n-1)$ instead of $1/n$ since it assumes we do not have\n",
+ "the exact mean values. The following simple function uses the\n",
+ "**np.vstack** function which takes each vector of dimension $1\\times n$\n",
+ "and produces a $2\\times n$ matrix $\\boldsymbol{W}$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{W} = \\begin{bmatrix} x_0 & y_0 \\\\\n",
+ " x_1 & y_1 \\\\\n",
+ " x_2 & y_2\\\\\n",
+ " \\dots & \\dots \\\\\n",
+ " x_{n-2} & y_{n-2}\\\\\n",
+ " x_{n-1} & y_{n-1} & \n",
+ " \\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "which in turn is converted into into the $2\\times 2$ covariance matrix\n",
+ "$\\boldsymbol{C}$ via the Numpy function **np.cov()**. We note that we can also calculate\n",
+ "the mean value of each set of samples $\\boldsymbol{x}$ etc using the Numpy\n",
+ "function **np.mean(x)**. We can also extract the eigenvalues of the\n",
+ "covariance matrix through the **np.linalg.eig()** function."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "# Importing various packages\n",
+ "import numpy as np\n",
+ "n = 100\n",
+ "x = np.random.normal(size=n)\n",
+ "print(np.mean(x))\n",
+ "y = 4+3*x+np.random.normal(size=n)\n",
+ "print(np.mean(y))\n",
+ "W = np.vstack((x, y))\n",
+ "C = np.cov(W)\n",
+ "print(C)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Correlation Matrix\n",
+ "\n",
+ "The previous example can be converted into the correlation matrix by\n",
+ "simply scaling the matrix elements with the variances. We should also\n",
+ "subtract the mean values for each column. This leads to the following\n",
+ "code which sets up the correlations matrix for the previous example in\n",
+ "a more brute force way. Here we scale the mean values for each column of the design matrix, calculate the relevant mean values and variances and then finally set up the $2\\times 2$ correlation matrix (since we have only two vectors)."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "import numpy as np\n",
+ "n = 100\n",
+ "# define two vectors \n",
+ "x = np.random.random(size=n)\n",
+ "y = 4+3*x+np.random.normal(size=n)\n",
+ "#scaling the x and y vectors \n",
+ "x = x - np.mean(x)\n",
+ "y = y - np.mean(y)\n",
+ "variance_x = np.sum(x@x)/n\n",
+ "variance_y = np.sum(y@y)/n\n",
+ "print(variance_x)\n",
+ "print(variance_y)\n",
+ "cov_xy = np.sum(x@y)/n\n",
+ "cov_xx = np.sum(x@x)/n\n",
+ "cov_yy = np.sum(y@y)/n\n",
+ "C = np.zeros((2,2))\n",
+ "C[0,0]= cov_xx/variance_x\n",
+ "C[1,1]= cov_yy/variance_y\n",
+ "C[0,1]= cov_xy/np.sqrt(variance_y*variance_x)\n",
+ "C[1,0]= C[0,1]\n",
+ "print(C)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We see that the matrix elements along the diagonal are one as they\n",
+ "should be and that the matrix is symmetric. Furthermore, diagonalizing\n",
+ "this matrix we easily see that it is a positive definite matrix.\n",
+ "\n",
+ "The above procedure with **numpy** can be made more compact if we use **pandas**.\n",
+ "\n",
+ "\n",
+ "## Correlation Matrix with Pandas\n",
+ "\n",
+ "We whow here how we can set up the correlation matrix using **pandas**, as done in this simple code"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "n = 10\n",
+ "x = np.random.normal(size=n)\n",
+ "x = x - np.mean(x)\n",
+ "y = 4+3*x+np.random.normal(size=n)\n",
+ "y = y - np.mean(y)\n",
+ "X = (np.vstack((x, y))).T\n",
+ "print(X)\n",
+ "Xpd = pd.DataFrame(X)\n",
+ "print(Xpd)\n",
+ "correlation_matrix = Xpd.corr()\n",
+ "print(correlation_matrix)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We expand this model to the Franke function discussed above.\n",
+ "\n",
+ "\n",
+ "## Correlation Matrix with Pandas and the Franke function"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "# Common imports\n",
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "\n",
+ "\n",
+ "def FrankeFunction(x,y):\n",
+ "\tterm1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))\n",
+ "\tterm2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))\n",
+ "\tterm3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))\n",
+ "\tterm4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)\n",
+ "\treturn term1 + term2 + term3 + term4\n",
+ "\n",
+ "\n",
+ "def create_X(x, y, n ):\n",
+ "\tif len(x.shape) > 1:\n",
+ "\t\tx = np.ravel(x)\n",
+ "\t\ty = np.ravel(y)\n",
+ "\n",
+ "\tN = len(x)\n",
+ "\tl = int((n+1)*(n+2)/2)\t\t# Number of elements in beta\n",
+ "\tX = np.ones((N,l))\n",
+ "\n",
+ "\tfor i in range(1,n+1):\n",
+ "\t\tq = int((i)*(i+1)/2)\n",
+ "\t\tfor k in range(i+1):\n",
+ "\t\t\tX[:,q+k] = (x**(i-k))*(y**k)\n",
+ "\n",
+ "\treturn X\n",
+ "\n",
+ "\n",
+ "# Making meshgrid of datapoints and compute Franke's function\n",
+ "n = 4\n",
+ "N = 100\n",
+ "x = np.sort(np.random.uniform(0, 1, N))\n",
+ "y = np.sort(np.random.uniform(0, 1, N))\n",
+ "z = FrankeFunction(x, y)\n",
+ "X = create_X(x, y, n=n) \n",
+ "\n",
+ "Xpd = pd.DataFrame(X)\n",
+ "# subtract the mean values and set up the covariance matrix\n",
+ "Xpd = Xpd - Xpd.mean()\n",
+ "covariance_matrix = Xpd.cov()\n",
+ "print(covariance_matrix)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We note here that the covariance is zero for the first rows and\n",
+ "columns since all matrix elements in the design matrix were set to one\n",
+ "(we are fitting the function in terms of a polynomial of degree $n$).\n",
+ "\n",
+ "This means that the variance for these elements will be zero and will\n",
+ "cause problems when we set up the correlation matrix. We can simply\n",
+ "drop these elements and construct a correlation\n",
+ "matrix without these elements. \n",
+ "\n",
+ "\n",
+ "\n",
+ "## Rewriting the Covariance and/or Correlation Matrix\n",
+ "\n",
+ "We can rewrite the covariance matrix in a more compact form in terms of the design/feature matrix $\\boldsymbol{X}$ as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x}] = \\frac{1}{n}\\boldsymbol{X}\\boldsymbol{X}^T= \\mathbb{E}[\\boldsymbol{X}\\boldsymbol{X}^T].\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "To see this let us simply look at a design matrix $\\boldsymbol{X}\\in {\\mathbb{R}}^{2\\times 2}$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{X}=\\begin{bmatrix}\n",
+ "x_{00} & x_{01}\\\\\n",
+ "x_{10} & x_{11}\\\\\n",
+ "\\end{bmatrix}=\\begin{bmatrix}\n",
+ "\\boldsymbol{x}_{0} & \\boldsymbol{x}_{1}\\\\\n",
+ "\\end{bmatrix}.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "If we then compute the expectation value"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mathbb{E}[\\boldsymbol{X}\\boldsymbol{X}^T] = \\frac{1}{n}\\boldsymbol{X}\\boldsymbol{X}^T=\\begin{bmatrix}\n",
+ "x_{00}^2+x_{01}^2 & x_{00}x_{10}+x_{01}x_{11}\\\\\n",
+ "x_{10}x_{00}+x_{11}x_{01} & x_{10}^2+x_{11}^2\\\\\n",
+ "\\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "which is just"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] = \\boldsymbol{C}[\\boldsymbol{x}]=\\begin{bmatrix} \\mathrm{var}[\\boldsymbol{x}_0] & \\mathrm{cov}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] \\\\\n",
+ " \\mathrm{cov}[\\boldsymbol{x}_1,\\boldsymbol{x}_0] & \\mathrm{var}[\\boldsymbol{x}_1] \\\\\n",
+ " \\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where we wrote $$\\boldsymbol{C}[\\boldsymbol{x}_0,\\boldsymbol{x}_1] = \\boldsymbol{C}[\\boldsymbol{x}]$$ to indicate that this the covariance of the vectors $\\boldsymbol{x}$ of the design/feature matrix $\\boldsymbol{X}$.\n",
+ "\n",
+ "It is easy to generalize this to a matrix $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$.\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Towards the PCA theorem\n",
+ "\n",
+ "We have that the covariance matrix (the correlation matrix involves a simple rescaling) is given as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x}] = \\frac{1}{n}\\boldsymbol{X}\\boldsymbol{X}^T= \\mathbb{E}[\\boldsymbol{X}\\boldsymbol{X}^T].\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Let us now assume that we can perform a series of orthogonal transformations where we employ some orthogonal matrices $\\boldsymbol{S}$.\n",
+ "These matrices are defined as $\\boldsymbol{S}\\in {\\mathbb{R}}^{p\\times p}$ and obey the orthogonality requirements $\\boldsymbol{S}\\boldsymbol{S}^T=\\boldsymbol{S}^T\\boldsymbol{S}=\\boldsymbol{I}$. The matrix can be written out in terms of the column vectors $\\boldsymbol{s}_i$ as $\\boldsymbol{S}=[\\boldsymbol{s}_0,\\boldsymbol{s}_1,\\dots,\\boldsymbol{s}_{p-1}]$ and $\\boldsymbol{s}_i \\in {\\mathbb{R}}^{p}$.\n",
+ "\n",
+ "Assume also that there is a transformation $\\boldsymbol{S}\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{S}^T=\\boldsymbol{C}[\\boldsymbol{y}]$ such that the new matrix $\\boldsymbol{C}[\\boldsymbol{y}]$ is diagonal with elements $[\\lambda_0,\\lambda_1,\\lambda_2,\\dots,\\lambda_{p-1}]$. \n",
+ "\n",
+ "That is we have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{y}] = \\mathbb{E}[\\boldsymbol{S}\\boldsymbol{X}\\boldsymbol{X}^T\\boldsymbol{S}^T]=\\boldsymbol{S}\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{S}^T,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "since the matrix $\\boldsymbol{S}$ is not a data dependent matrix. Multiplying with $\\boldsymbol{S}^T$ from the left we have"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{S}^T\\boldsymbol{C}[\\boldsymbol{y}] = \\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{S}^T,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and since $\\boldsymbol{C}[\\boldsymbol{y}]$ is diagonal we have for a given eigenvalue $i$ of the covariance matrix that"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{S}^T_i\\lambda_i = \\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{S}^T_i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "In the derivation of the PCA theorem we will assume that the eigenvalues are ordered in descending order, that is\n",
+ "$\\lambda_0 > \\lambda_1 > \\dots > \\lambda_{p-1}$. \n",
+ "\n",
+ "\n",
+ "The eigenvalues tell us then how much we need to stretch the\n",
+ "corresponding eigenvectors. Dimensions with large eigenvalues have\n",
+ "thus large variations (large variance) and define therefore useful\n",
+ "dimensions. The data points are more spread out in the direction of\n",
+ "these eigenvectors. Smaller eigenvalues mean on the other hand that\n",
+ "the corresponding eigenvectors are shrunk accordingly and the data\n",
+ "points are tightly bunched together and there is not much variation in\n",
+ "these specific directions. Hopefully then we could leave it out\n",
+ "dimensions where the eigenvalues are very small. If $p$ is very large,\n",
+ "we could then aim at reducing $p$ to $l << p$ and handle only $l$\n",
+ "features/predictors.\n",
+ "\n",
+ "\n",
+ "## The Algorithm before theorem\n",
+ "\n",
+ "Here's how we would proceed in setting up the algorithm for the PCA, see also discussion below here. \n",
+ "* Set up the datapoints for the design/feature matrix $\\boldsymbol{X}$ with $\\boldsymbol{X}\\in {\\mathbb{R}}^{n\\times p}$, with the predictors/features $p$ referring to the column numbers and the entries $n$ being the row elements."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{X}=\\begin{bmatrix}\n",
+ "x_{0,0} & x_{0,1} & x_{0,2}& \\dots & \\dots x_{0,p-1}\\\\\n",
+ "x_{1,0} & x_{1,1} & x_{1,2}& \\dots & \\dots x_{1,p-1}\\\\\n",
+ "x_{2,0} & x_{2,1} & x_{2,2}& \\dots & \\dots x_{2,p-1}\\\\\n",
+ "\\dots & \\dots & \\dots & \\dots \\dots & \\dots \\\\\n",
+ "x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \\dots & \\dots x_{n-2,p-1}\\\\\n",
+ "x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \\dots & \\dots x_{n-1,p-1}\\\\\n",
+ "\\end{bmatrix},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "* Center the data by subtracting the mean value for each column. This leads to a new matrix $\\boldsymbol{X}\\rightarrow \\overline{\\boldsymbol{X}}$.\n",
+ "\n",
+ "* Compute then the covariance/correlation matrix $\\mathbb{E}[\\overline{\\boldsymbol{X}}\\overline{\\boldsymbol{X}}^T]$.\n",
+ "\n",
+ "* Find the eigenpairs of $\\boldsymbol{C}$ with eigenvalues $[\\lambda_0,\\lambda_1,\\dots,\\lambda_{p-1}]$ and eigenvectors $[\\boldsymbol{s}_0,\\boldsymbol{s}_1,\\dots,\\boldsymbol{s}_{p-1}]$.\n",
+ "\n",
+ "* Order the eigenvalue (and the eigenvectors accordingly) in order of decreasing eigenvalues.\n",
+ "\n",
+ "* Keep only those $l$ eigenvalues larger than a selected threshold value, discarding thus $p-l$ features since we expect small variations in the data here.\n",
+ "\n",
+ "## Writing our own PCA code\n",
+ "\n",
+ "We will use a simple example first with two-dimensional data\n",
+ "drawn from a multivariate normal distribution with the following mean and covariance matrix:"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mu = (-1,2) \\qquad \\Sigma = \\begin{bmatrix} 4 & 2 \\\\\n",
+ "2 & 2\n",
+ "\\end{bmatrix}\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Note that the mean refers to each column of data. \n",
+ "We will generate $n = 1000$ points $X = \\{ x_1, \\ldots, x_N \\}$ from\n",
+ "this distribution, and store them in the $1000 \\times 2$ matrix $\\boldsymbol{X}$.\n",
+ "\n",
+ "The following Python code aids in setting up the data and writing out the design matrix.\n",
+ "Note that the function **multivariate** returns also the covariance discussed above and that it is defined by dividing by $n-1$ instead of $n$."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "import matplotlib.pyplot as plt\n",
+ "from IPython.display import display\n",
+ "n = 10000\n",
+ "mean = (-1, 2)\n",
+ "cov = [[4, 2], [2, 2]]\n",
+ "X = np.random.multivariate_normal(mean, cov, n)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Now we are going to implement the PCA algorithm. We will break it down into various substeps.\n",
+ "\n",
+ "### Compute the sample mean and center the data\n",
+ "\n",
+ "The first step of PCA is to compute the sample mean of the data and use it to center the data. Recall that the sample mean is"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mu_n = \\frac{1}{n} \\sum_{i=1}^n x_i\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and the mean-centered data $\\bar{X} = \\{ \\bar{x}_1, \\ldots, \\bar{x}_n \\}$ takes the form"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\bar{x}_i = x_i - \\mu_n.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "When you are done with these steps, print out $\\mu_n$ to verify it is\n",
+ "close to $\\mu$ and plot your mean centered data to verify it is\n",
+ "centered at the origin! Compare your code with the functionality from **Scikit-Learn** discussed above.\n",
+ "The following code elements perform these operations using **pandas** or using our own functionality for doing so. The latter, using **numpy** is rather simple through the **mean()** function."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "df = pd.DataFrame(X)\n",
+ "# Pandas does the centering for us\n",
+ "df = df -df.mean()\n",
+ "# we center it ourselves\n",
+ "X_centered = X - X.mean(axis=0)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Alternatively, we could use the functions we discussed\n",
+ "earlier for scaling the data set. That is, we could have used the\n",
+ "**StandardScaler** function in **Scikit-Learn**, a function which ensures\n",
+ "that for each feature/predictor we study the mean value is zero and\n",
+ "the variance is one (every column in the design/feature matrix). You\n",
+ "would then not get the same results, since we divide by the\n",
+ "variance. The diagonal covariance matrix elements will then be one,\n",
+ "while the non-diagonal ones need to be divided by $2\\sqrt{2}$ for our\n",
+ "specific case.\n",
+ "\n",
+ "### Compute the sample covariance\n",
+ "\n",
+ "Now we are going to use the mean centered data to compute the sample covariance of the data by using the following equation"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\Sigma_n = \\frac{1}{n-1} \\sum_{i=1}^n \\bar{x}_i^T \\bar{x}_i = \\frac{1}{n-1} \\sum_{i=1}^n (x_i - \\mu_n)^T (x_i - \\mu_n)\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where the data points $x_i \\in \\mathbb{R}^p$ (here in this example $p = 2$) are column vectors and $x^T$ is the transpose of $x$.\n",
+ "We can write our own code or simply use either the functionaly of **numpy** or that of **pandas**, as follows"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "print(df.cov())\n",
+ "print(np.cov(X_centered.T))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Note that the way we define the covariance matrix here has a factor $n-1$ instead of $n$. This is included in the **cov()** function by **numpy** and **pandas**. \n",
+ "Our own code here is not very elegant and asks for obvious improvements. It is tailored to this specific $2\\times 2$ covariance matrix."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "# extract the relevant columns from the centered design matrix of dim n x 2\n",
+ "x = X_centered[:,0]\n",
+ "y = X_centered[:,1]\n",
+ "Cov = np.zeros((2,2))\n",
+ "Cov[0,1] = np.sum(x.T@y)/(n-1.0)\n",
+ "Cov[0,0] = np.sum(x.T@x)/(n-1.0)\n",
+ "Cov[1,1] = np.sum(y.T@y)/(n-1.0)\n",
+ "Cov[1,0]= Cov[0,1]\n",
+ "print(\"Centered covariance using own code\")\n",
+ "print(Cov)\n",
+ "plt.plot(x, y, 'x')\n",
+ "plt.axis('equal')\n",
+ "plt.show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Depending on the number of points $n$, we will get results that are close to the covariance values defined above.\n",
+ "The plot shows how the data are clustered around a line with slope close to one. Is this expected?\n",
+ "\n",
+ "### Diagonalize the sample covariance matrix to obtain the principal components\n",
+ "\n",
+ "Now we are ready to solve for the principal components! To do so we\n",
+ "diagonalize the sample covariance matrix $\\Sigma$. We can use the\n",
+ "function **np.linalg.eig** to do so. It will return the eigenvalues and\n",
+ "eigenvectors of $\\Sigma$. Once we have these we can perform the \n",
+ "following tasks:\n",
+ "\n",
+ "* We compute the percentage of the total variance captured by the first principal component\n",
+ "\n",
+ "* We plot the mean centered data and lines along the first and second principal components\n",
+ "\n",
+ "* Then we project the mean centered data onto the first and second principal components, and plot the projected data. \n",
+ "\n",
+ "* Finally, we approximate the data as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "x_i \\approx \\tilde{x}_i = \\mu_n + \\langle x_i, v_0 \\rangle v_0\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where $v_0$ is the first principal component. \n",
+ "\n",
+ "Collecting all these steps we can write our own PCA function and\n",
+ "compare this with the functionality included in **Scikit-Learn**. \n",
+ "\n",
+ "The code here outlines some of the elements we could include in the\n",
+ "analysis. Feel free to extend upon this in order to address the above\n",
+ "questions."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "# diagonalize and obtain eigenvalues, not necessarily sorted\n",
+ "EigValues, EigVectors = np.linalg.eig(Cov)\n",
+ "# sort eigenvectors and eigenvalues\n",
+ "#permute = EigValues.argsort()\n",
+ "#EigValues = EigValues[permute]\n",
+ "#EigVectors = EigVectors[:,permute]\n",
+ "print(\"Eigenvalues of Covariance matrix\")\n",
+ "for i in range(2):\n",
+ " print(EigValues[i])\n",
+ "FirstEigvector = EigVectors[:,0]\n",
+ "SecondEigvector = EigVectors[:,1]\n",
+ "print(\"First eigenvector\")\n",
+ "print(FirstEigvector)\n",
+ "print(\"Second eigenvector\")\n",
+ "print(SecondEigvector)\n",
+ "#thereafter we do a PCA with Scikit-learn\n",
+ "from sklearn.decomposition import PCA\n",
+ "pca = PCA(n_components = 2)\n",
+ "X2Dsl = pca.fit_transform(X)\n",
+ "print(\"Eigenvector of largest eigenvalue\")\n",
+ "print(pca.components_.T[:, 0])"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "This code does not contain all the above elements, but it shows how we can use **Scikit-Learn** to extract the eigenvector which corresponds to the largest eigenvalue. Try to address the questions we pose before the above code. Try also to change the values of the covariance matrix by making one of the diagonal elements much larger than the other. What do you observe then? \n",
+ "\n",
+ "\n",
+ "## Classical PCA Theorem\n",
+ "\n",
+ "We assume now that we have a design matrix $\\boldsymbol{X}$ which has been\n",
+ "centered as discussed above. For the sake of simplicity we skip the\n",
+ "overline symbol. The matrix is defined in terms of the various column\n",
+ "vectors $[\\boldsymbol{x}_0,\\boldsymbol{x}_1,\\dots, \\boldsymbol{x}_{p-1}]$ each with dimension\n",
+ "$\\boldsymbol{x}\\in {\\mathbb{R}}^{n}$.\n",
+ "\n",
+ "We assume also that we have an orthogonal transformation $\\boldsymbol{W}\\in {\\mathbb{R}}^{p\\times p}$. We define the reconstruction error (which is similar to the mean squared error we have seen before) as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "J(\\boldsymbol{W},\\boldsymbol{Z}) = \\frac{1}{n}\\sum_i (\\boldsymbol{x}_i - \\overline{\\boldsymbol{x}}_i)^2,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "with $\\overline{\\boldsymbol{x}}_i = \\boldsymbol{W}\\boldsymbol{z}_i$, where $\\boldsymbol{z}_i$ is a row vector with dimension ${\\mathbb{R}}^{n}$ of the matrix\n",
+ "$\\boldsymbol{Z}\\in{\\mathbb{R}}^{p\\times n}$. When doing PCA we want to reduce this dimensionality. \n",
+ "\n",
+ "The PCA theorem states that minimizing the above reconstruction error\n",
+ "corresponds to setting $\\boldsymbol{W}=\\boldsymbol{S}$, the orthogonal matrix which\n",
+ "diagonalizes the empirical covariance(correlation) matrix. The optimal\n",
+ "low-dimensional encoding of the data is then given by a set of vectors\n",
+ "$\\boldsymbol{z}_i$ with at most $l$ vectors, with $l << p$, defined by the\n",
+ "orthogonal projection of the data onto the columns spanned by the\n",
+ "eigenvectors of the covariance(correlations matrix).\n",
+ "\n",
+ "The proof which follows will be updated by mid January 2020.\n",
+ "\n",
+ "\n",
+ "## Proof of the PCA Theorem\n",
+ "\n",
+ "To show the PCA theorem let us start with the assumption that there is one vector $\\boldsymbol{w}_0$ which corresponds to a solution which minimized the reconstruction error $J$. This is an orthogonal vector. It means that we now approximate the reconstruction error in terms of $\\boldsymbol{w}_0$ and $\\boldsymbol{z}_0$ as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "J(\\boldsymbol{w}_0,\\boldsymbol{z}_0)= \\frac{1}{n}\\sum_i (\\boldsymbol{x}_i - z_{i0}\\boldsymbol{w}_0)^2=\\frac{1}{n}\\sum_i (\\boldsymbol{x}_i^T\\boldsymbol{x}_i - 2z_{i0}\\boldsymbol{w}_0^T\\boldsymbol{x}_i+z_{i0}^2\\boldsymbol{w}_0^T\\boldsymbol{w}_0),\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "which we can rewrite due to the orthogonality of $\\boldsymbol{w}_i$ as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "J(\\boldsymbol{w}_0,\\boldsymbol{z}_0)=\\frac{1}{n}\\sum_i (\\boldsymbol{x}_i^T\\boldsymbol{x}_i - 2z_{i0}\\boldsymbol{w}_0^T\\boldsymbol{x}_i+z_{i0}^2).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Minimizing $J$ with respect to the unknown parameters $z_{0i}$ we obtain that"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "z_{i0}=\\boldsymbol{w}_0^T\\boldsymbol{x}_i,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where the vectors on the rhs are known. \n",
+ "\n",
+ "\n",
+ "\n",
+ "## PCA Proof continued\n",
+ "\n",
+ "We have now found the unknown parameters $z_{i0}$. These correspond to the projected coordinates and we can write"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "J(\\boldsymbol{w}_0)= \\frac{1}{p}\\sum_i (\\boldsymbol{x}_i^T\\boldsymbol{x}_i - z_{i0}^2)=\\mathrm{const}-\\frac{1}{n}\\sum_i z_{i0}^2.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We can show that the variance of the projected coordinates defined by $\\boldsymbol{w}_0^T\\boldsymbol{x}_i$ are given by"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mathrm{var}[\\boldsymbol{w}_0^T\\boldsymbol{x}_i] = \\frac{1}{n}\\sum_i z_{i0}^2,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "since the expectation value of"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mathbb{E}[\\boldsymbol{w}_0^T\\boldsymbol{x}_i] = \\mathbb{E}[z_{i0}]= \\boldsymbol{w}_0^T\\mathbb{E}[\\boldsymbol{x}_i]=0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "where we have used the fact that our data are centered.\n",
+ "\n",
+ "Recalling our definition of the covariance as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x}] = \\frac{1}{n}\\boldsymbol{X}\\boldsymbol{X}^T=\\mathbb{E}[\\boldsymbol{X}\\boldsymbol{X}^T],\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "we have thus that"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\mathrm{var}[\\boldsymbol{w}_0^T\\boldsymbol{x}_i] = \\frac{1}{n}\\sum_i z_{i0}^2=\\boldsymbol{w}_0^T\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{w}_0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We are almost there, we have obtained a relation between minimizing\n",
+ "the reconstruction error and the variance and the covariance\n",
+ "matrix. Minimizing the error is equivalent to maximizing the variance\n",
+ "of the projected data.\n",
+ "\n",
+ "\n",
+ "## The final step\n",
+ "\n",
+ "We could trivially maximize the variance of the projection (and\n",
+ "thereby minimize the error in the reconstruction function) by letting\n",
+ "the norm-2 of $\\boldsymbol{w}_0$ go to infinity. However, this norm since we\n",
+ "want the matrix $\\boldsymbol{W}$ to be an orthogonal matrix, is constrained by\n",
+ "$\\vert\\vert \\boldsymbol{w}_0 \\vert\\vert_2^2=1$. Imposing this condition via a\n",
+ "Lagrange multiplier we can then in turn maximize"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "J(\\boldsymbol{w}_0)= \\boldsymbol{w}_0^T\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{w}_0+\\lambda_0(1-\\boldsymbol{w}_0^T\\boldsymbol{w}_0).\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Taking the derivative with respect to $\\boldsymbol{w}_0$ we obtain"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\frac{\\partial J(\\boldsymbol{w}_0)}{\\partial \\boldsymbol{w}_0}= 2\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{w}_0-2\\lambda_0\\boldsymbol{w}_0=0,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "meaning that"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{w}_0=\\lambda_0\\boldsymbol{w}_0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "**The direction that maximizes the variance (or minimizes the construction error) is an eigenvector of the covariance matrix**! If we left multiply with $\\boldsymbol{w}_0^T$ we have the variance of the projected data is"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "$$\n",
+ "\\boldsymbol{w}_0^T\\boldsymbol{C}[\\boldsymbol{x}]\\boldsymbol{w}_0=\\lambda_0.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "If we want to maximize the variance (minimize the construction error)\n",
+ "we simply pick the eigenvector of the covariance matrix with the\n",
+ "largest eigenvalue. This establishes the link between the minimization\n",
+ "of the reconstruction function $J$ in terms of an orthogonal matrix\n",
+ "and the maximization of the variance and thereby the covariance of our\n",
+ "observations encoded in the design/feature matrix $\\boldsymbol{X}$.\n",
+ "\n",
+ "The proof\n",
+ "for the other eigenvectors $\\boldsymbol{w}_1,\\boldsymbol{w}_2,\\dots$ can be\n",
+ "established by applying the above arguments and using the fact that\n",
+ "our basis of eigenvectors is orthogonal, see [Murphy chapter\n",
+ "12.2](https://mitpress.mit.edu/books/machine-learning-1). The\n",
+ "discussion in chapter 12.2 of Murphy's text has also a nice link with\n",
+ "the Singular Value Decomposition theorem. For categorical data, see\n",
+ "chapter 12.4 and discussion therein.\n",
+ "\n",
+ "Additional part of the proof for the other eigenvectors will be added by mid January 2020.\n",
+ "\n",
+ "\n",
+ "## Geometric Interpretation and link with Singular Value Decomposition\n",
+ "\n",
+ "This material will be added by mid January 2020.\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Principal Component Analysis\n",
+ "\n",
+ "Principal Component Analysis (PCA) is by far the most popular dimensionality reduction algorithm.\n",
+ "First it identifies the hyperplane that lies closest to the data, and then it projects the data onto it.\n",
+ "\n",
+ "The following Python code uses NumPy’s **svd()** function to obtain all the principal components of the\n",
+ "training set, then extracts the first two principal components. First we center the data using either **pandas** or our own code"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "from IPython.display import display\n",
+ "np.random.seed(100)\n",
+ "# setting up a 10 x 5 vanilla matrix \n",
+ "rows = 10\n",
+ "cols = 5\n",
+ "X = np.random.randn(rows,cols)\n",
+ "df = pd.DataFrame(X)\n",
+ "# Pandas does the centering for us\n",
+ "df = df -df.mean()\n",
+ "display(df)\n",
+ "\n",
+ "# we center it ourselves\n",
+ "X_centered = X - X.mean(axis=0)\n",
+ "# Then check the difference between pandas and our own set up\n",
+ "print(X_centered-df)\n",
+ "#Now we do an SVD\n",
+ "U, s, V = np.linalg.svd(X_centered)\n",
+ "c1 = V.T[:, 0]\n",
+ "c2 = V.T[:, 1]\n",
+ "W2 = V.T[:, :2]\n",
+ "X2D = X_centered.dot(W2)\n",
+ "print(X2D)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "PCA assumes that the dataset is centered around the origin. Scikit-Learn’s PCA classes take care of centering\n",
+ "the data for you. However, if you implement PCA yourself (as in the preceding example), or if you use other libraries, don’t\n",
+ "forget to center the data first.\n",
+ "\n",
+ "Once you have identified all the principal components, you can reduce the dimensionality of the dataset\n",
+ "down to $d$ dimensions by projecting it onto the hyperplane defined by the first $d$ principal components.\n",
+ "Selecting this hyperplane ensures that the projection will preserve as much variance as possible."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "W2 = V.T[:, :2]\n",
+ "X2D = X_centered.dot(W2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## PCA and scikit-learn\n",
+ "\n",
+ "Scikit-Learn’s PCA class implements PCA using SVD decomposition just like we did before. The\n",
+ "following code applies PCA to reduce the dimensionality of the dataset down to two dimensions (note\n",
+ "that it automatically takes care of centering the data):"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "#thereafter we do a PCA with Scikit-learn\n",
+ "from sklearn.decomposition import PCA\n",
+ "pca = PCA(n_components = 2)\n",
+ "X2D = pca.fit_transform(X)\n",
+ "print(X2D)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "After fitting the PCA transformer to the dataset, you can access the principal components using the\n",
+ "components variable (note that it contains the PCs as horizontal vectors, so, for example, the first\n",
+ "principal component is equal to"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "pca.components_.T[:, 0]."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Another very useful piece of information is the explained variance ratio of each principal component,\n",
+ "available via the $explained\\_variance\\_ratio$ variable. It indicates the proportion of the dataset’s\n",
+ "variance that lies along the axis of each principal component. \n",
+ "\n",
+ "\n",
+ "## Back to the Cancer Data\n",
+ "We can now repeat the above but applied to real data, in this case our breast cancer data.\n",
+ "Here we compute performance scores on the training data using logistic regression."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "import matplotlib.pyplot as plt\n",
+ "import numpy as np\n",
+ "from sklearn.model_selection import train_test_split \n",
+ "from sklearn.datasets import load_breast_cancer\n",
+ "from sklearn.linear_model import LogisticRegression\n",
+ "cancer = load_breast_cancer()\n",
+ "\n",
+ "X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)\n",
+ "\n",
+ "logreg = LogisticRegression()\n",
+ "logreg.fit(X_train, y_train)\n",
+ "print(\"Train set accuracy from Logistic Regression: {:.2f}\".format(logreg.score(X_train,y_train)))\n",
+ "# We scale the data\n",
+ "from sklearn.preprocessing import StandardScaler\n",
+ "scaler = StandardScaler()\n",
+ "scaler.fit(X_train)\n",
+ "X_train_scaled = scaler.transform(X_train)\n",
+ "X_test_scaled = scaler.transform(X_test)\n",
+ "# Then perform again a log reg fit\n",
+ "logreg.fit(X_train_scaled, y_train)\n",
+ "print(\"Train set accuracy scaled data: {:.2f}\".format(logreg.score(X_train_scaled,y_train)))\n",
+ "#thereafter we do a PCA with Scikit-learn\n",
+ "from sklearn.decomposition import PCA\n",
+ "pca = PCA(n_components = 2)\n",
+ "X2D_train = pca.fit_transform(X_train_scaled)\n",
+ "# and finally compute the log reg fit and the score on the training data\t\n",
+ "logreg.fit(X2D_train,y_train)\n",
+ "print(\"Train set accuracy scaled and PCA data: {:.2f}\".format(logreg.score(X2D_train,y_train)))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "We see that our training data after the PCA decomposition has a performance similar to the non-scaled data. \n",
+ "\n",
+ "\n",
+ "## More on the PCA\n",
+ "\n",
+ "Instead of arbitrarily choosing the number of dimensions to reduce down to, it is generally preferable to\n",
+ "choose the number of dimensions that add up to a sufficiently large portion of the variance (e.g., 95%).\n",
+ "Unless, of course, you are reducing dimensionality for data visualization — in that case you will\n",
+ "generally want to reduce the dimensionality down to 2 or 3.\n",
+ "The following code computes PCA without reducing dimensionality, then computes the minimum number\n",
+ "of dimensions required to preserve 95% of the training set’s variance:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "pca = PCA()\n",
+ "pca.fit(X)\n",
+ "cumsum = np.cumsum(pca.explained_variance_ratio_)\n",
+ "d = np.argmax(cumsum >= 0.95) + 1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "You could then set $n\\_components=d$ and run PCA again. However, there is a much better option: instead\n",
+ "of specifying the number of principal components you want to preserve, you can set $n\\_components$ to be\n",
+ "a float between 0.0 and 1.0, indicating the ratio of variance you wish to preserve:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "pca = PCA(n_components=0.95)\n",
+ "X_reduced = pca.fit_transform(X)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Incremental PCA\n",
+ "\n",
+ "One problem with the preceding implementation of PCA is that it requires the whole training set to fit in\n",
+ "memory in order for the SVD algorithm to run. Fortunately, Incremental PCA (IPCA) algorithms have\n",
+ "been developed: you can split the training set into mini-batches and feed an IPCA algorithm one minibatch\n",
+ "at a time. This is useful for large training sets, and also to apply PCA online (i.e., on the fly, as new\n",
+ "instances arrive).\n",
+ "\n",
+ "\n",
+ "## Randomized PCA\n",
+ "\n",
+ "Scikit-Learn offers yet another option to perform PCA, called Randomized PCA. This is a stochastic\n",
+ "algorithm that quickly finds an approximation of the first d principal components. Its computational\n",
+ "complexity is $O(m \\times d^2)+O(d^3)$, instead of $O(m \\times n^2) + O(n^3)$, so it is dramatically faster than the\n",
+ "previous algorithms when $d$ is much smaller than $n$.\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Kernel PCA\n",
+ "\n",
+ "The kernel trick is a mathematical technique that implicitly maps instances into a\n",
+ "very high-dimensional space (called the feature space), enabling nonlinear classification and regression\n",
+ "with Support Vector Machines. Recall that a linear decision boundary in the high-dimensional feature\n",
+ "space corresponds to a complex nonlinear decision boundary in the original space.\n",
+ "It turns out that the same trick can be applied to PCA, making it possible to perform complex nonlinear\n",
+ "projections for dimensionality reduction. This is called Kernel PCA (kPCA). It is often good at\n",
+ "preserving clusters of instances after projection, or sometimes even unrolling datasets that lie close to a\n",
+ "twisted manifold.\n",
+ "For example, the following code uses Scikit-Learn’s KernelPCA class to perform kPCA with an"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "from sklearn.decomposition import KernelPCA\n",
+ "rbf_pca = KernelPCA(n_components = 2, kernel=\"rbf\", gamma=0.04)\n",
+ "X_reduced = rbf_pca.fit_transform(X)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## LLE\n",
+ "\n",
+ "Locally Linear Embedding (LLE) is another very powerful nonlinear dimensionality reduction\n",
+ "(NLDR) technique. It is a Manifold Learning technique that does not rely on projections like the previous\n",
+ "algorithms. In a nutshell, LLE works by first measuring how each training instance linearly relates to its\n",
+ "closest neighbors (c.n.), and then looking for a low-dimensional representation of the training set where\n",
+ "these local relationships are best preserved (more details shortly). \n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "## Other techniques\n",
+ "\n",
+ "\n",
+ "There are many other dimensionality reduction techniques, several of which are available in Scikit-Learn.\n",
+ "\n",
+ "Here are some of the most popular:\n",
+ "* **Multidimensional Scaling (MDS)** reduces dimensionality while trying to preserve the distances between the instances.\n",
+ "\n",
+ "* **Isomap** creates a graph by connecting each instance to its nearest neighbors, then reduces dimensionality while trying to preserve the geodesic distances between the instances.\n",
+ "\n",
+ "* **t-Distributed Stochastic Neighbor Embedding** (t-SNE) reduces dimensionality while trying to keep similar instances close and dissimilar instances apart. It is mostly used for visualization, in particular to visualize clusters of instances in high-dimensional space (e.g., to visualize the MNIST images in 2D).\n",
+ "\n",
+ "* Linear Discriminant Analysis (LDA) is actually a classification algorithm, but during training it learns the most discriminative axes between the classes, and these axes can then be used to define a hyperplane onto which to project the data. The benefit is that the projection will keep classes as far apart as possible, so LDA is a good technique to reduce dimensionality before running another classification algorithm such as a Support Vector Machine (SVM) classifier discussed in the SVM lectures."
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
diff --git a/doc/src/LectureNotes/gaussian.pdf b/doc/src/LectureNotes/gaussian.pdf
index 6ab8f203c..e88db4b7b 100644
Binary files a/doc/src/LectureNotes/gaussian.pdf and b/doc/src/LectureNotes/gaussian.pdf differ
diff --git a/doc/src/LogisticRegression/chapter5.dlog b/doc/src/LogisticRegression/chapter5.dlog
new file mode 100644
index 000000000..ab46c4883
--- /dev/null
+++ b/doc/src/LogisticRegression/chapter5.dlog
@@ -0,0 +1,8 @@
+translating doconce text in chapter5.do.txt to ipynb
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+Failed to remove ans_at_end environment
+Failed to remove sol_at_end environment
+output in chapter5.ipynb
diff --git a/doc/src/LogisticRegression/chapter5.do.txt b/doc/src/LogisticRegression/chapter5.do.txt
new file mode 100644
index 000000000..faa50a3e9
--- /dev/null
+++ b/doc/src/LogisticRegression/chapter5.do.txt
@@ -0,0 +1,366 @@
+======= Logistic Regression =======
+
+===== Introduction =====
+In linear regression our main interest was centered on learning the
+coefficients of a functional fit (say a polynomial) in order to be
+able to predict the response of a continuous variable on some unseen
+data. The fit to the continuous variable $y_i$ is based on some
+independent variables $\hat{x}_i$. Linear regression resulted in
+analytical expressions for standard ordinary Least Squares or Ridge
+regression (in terms of matrices to invert) for several quantities,
+ranging from the variance and thereby the confidence intervals of the
+parameters $\hat{\beta}$ to the mean squared error. If we can invert
+the product of the design matrices, linear regression gives then a
+simple recipe for fitting our data.
+
+
+Classification problems, however, are concerned with outcomes taking
+the form of discrete variables (i.e. categories). We may for example,
+on the basis of DNA sequencing for a number of patients, like to find
+out which mutations are important for a certain disease; or based on
+scans of various patients' brains, figure out if there is a tumor or
+not; or given a specific physical system, we'd like to identify its
+state, say whether it is an ordered or disordered system (typical
+situation in solid state physics); or classify the status of a
+patient, whether she/he has a stroke or not and many other similar
+situations.
+
+The most common situation we encounter when we apply logistic
+regression is that of two possible outcomes, normally denoted as a
+binary outcome, true or false, positive or negative, success or
+failure etc.
+
+Logistic regression will also serve as our stepping stone towards
+neural network algorithms and supervised deep learning. For logistic
+learning, the minimization of the cost function leads to a non-linear
+equation in the parameters $\hat{\beta}$. The optimization of the
+problem calls therefore for minimization algorithms. This forms the
+bottle neck of all machine learning algorithms, namely how to find
+reliable minima of a multi-variable function. This leads us to the
+family of gradient descent methods. The latter are the working horses
+of basically all modern machine learning algorithms.
+
+We note also that many of the topics discussed here on logistic
+regression are also commonly used in modern supervised Deep Learning
+models, as we will see later.
+
+
+
+===== Basics =====
+
+We consider the case where the dependent variables, also called the
+responses or the outcomes, $y_i$ are discrete and only take values
+from $k=0,\dots,K-1$ (i.e. $K$ classes).
+
+The goal is to predict the
+output classes from the design matrix $\hat{X}\in\mathbb{R}^{n\times p}$
+made of $n$ samples, each of which carries $p$ features or predictors. The
+primary goal is to identify the classes to which new unseen samples
+belong.
+
+Let us specialize to the case of two classes only, with outputs
+$y_i=0$ and $y_i=1$. Our outcomes could represent the status of a
+credit card user that could default or not on her/his credit card
+debt. That is
+
+
+!bt
+\[
+y_i = \begin{bmatrix} 0 & \mathrm{no}\\ 1 & \mathrm{yes} \end{bmatrix}.
+\]
+!et
+
+
+
+Before moving to the logistic model, let us try to use our linear
+regression model to classify these two outcomes. We could for example
+fit a linear model to the default case if $y_i > 0.5$ and the no
+default case $y_i \leq 0.5$.
+
+We would then have our
+weighted linear combination, namely
+!bt
+\begin{equation}
+\hat{y} = \hat{X}^T\hat{\beta} + \hat{\epsilon},
+\end{equation}
+!et
+where $\hat{y}$ is a vector representing the possible outcomes, $\hat{X}$ is our
+$n\times p$ design matrix and $\hat{\beta}$ represents our estimators/predictors.
+
+
+The main problem with our function is that it takes values on the
+entire real axis. In the case of logistic regression, however, the
+labels $y_i$ are discrete variables. A typical example is the credit
+card data discussed below here, where we can set the state of
+defaulting the debt to $y_i=1$ and not to $y_i=0$ for one the persons
+in the data set (see the full example below).
+
+One simple way to get a discrete output is to have sign
+functions that map the output of a linear regressor to values $\{0,1\}$,
+$f(s_i)=sign(s_i)=1$ if $s_i\ge 0$ and 0 if otherwise.
+We will encounter this model in our first demonstration of neural networks. Historically it is called the ``perceptron" model in the machine learning
+literature. This model is extremely simple. However, in many cases it is more
+favorable to use a ``soft" classifier that outputs
+the probability of a given category. This leads us to the logistic function.
+
+
+
+===== The logistic function =====
+
+The perceptron is an example of a ``hard classification'' model. We
+will encounter this model when we discuss neural networks as
+well. Each datapoint is deterministically assigned to a category (i.e
+$y_i=0$ or $y_i=1$). In many cases, it is favorable to have a ``soft''
+classifier that outputs the probability of a given category rather
+than a single value. For example, given $x_i$, the classifier
+outputs the probability of being in a category $k$. Logistic regression
+is the most common example of a so-called soft classifier. In logistic
+regression, the probability that a data point $x_i$
+belongs to a category $y_i=\{0,1\}$ is given by the so-called logit function (or Sigmoid) which is meant to represent the likelihood for a given event,
+!bt
+\[
+p(t) = \frac{1}{1+\mathrm \exp{-t}}=\frac{\exp{t}}{1+\mathrm \exp{t}}.
+\]
+!et
+Note that $1-p(t)= p(-t)$.
+
+
+The following code plots the logistic function, the step function and other functions we will encounter from here and on.
+
+
+!bc pycod
+"""The sigmoid function (or the logistic curve) is a
+function that takes any real number, z, and outputs a number (0,1).
+It is useful in neural networks for assigning weights on a relative scale.
+The value z is the weighted sum of parameters involved in the learning algorithm."""
+
+import numpy
+import matplotlib.pyplot as plt
+import math as mt
+
+z = numpy.arange(-5, 5, .1)
+sigma_fn = numpy.vectorize(lambda z: 1/(1+numpy.exp(-z)))
+sigma = sigma_fn(z)
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot(z, sigma)
+ax.set_ylim([-0.1, 1.1])
+ax.set_xlim([-5,5])
+ax.grid(True)
+ax.set_xlabel('z')
+ax.set_title('sigmoid function')
+
+plt.show()
+
+"""Step Function"""
+z = numpy.arange(-5, 5, .02)
+step_fn = numpy.vectorize(lambda z: 1.0 if z >= 0.0 else 0.0)
+step = step_fn(z)
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot(z, step)
+ax.set_ylim([-0.5, 1.5])
+ax.set_xlim([-5,5])
+ax.grid(True)
+ax.set_xlabel('z')
+ax.set_title('step function')
+
+plt.show()
+
+"""tanh Function"""
+z = numpy.arange(-2*mt.pi, 2*mt.pi, 0.1)
+t = numpy.tanh(z)
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot(z, t)
+ax.set_ylim([-1.0, 1.0])
+ax.set_xlim([-2*mt.pi,2*mt.pi])
+ax.grid(True)
+ax.set_xlabel('z')
+ax.set_title('tanh function')
+
+plt.show()
+!ec
+
+
+===== Two parameters =====
+
+We assume now that we have two classes with $y_i$ either $0$ or $1$. Furthermore we assume also that we have only two parameters $\beta$ in our fitting of the Sigmoid function, that is we define probabilities
+!bt
+\begin{align*}
+p(y_i=1|x_i,\hat{\beta}) &= \frac{\exp{(\beta_0+\beta_1x_i)}}{1+\exp{(\beta_0+\beta_1x_i)}},\nonumber\\
+p(y_i=0|x_i,\hat{\beta}) &= 1 - p(y_i=1|x_i,\hat{\beta}),
+\end{align*}
+!et
+where $\hat{\beta}$ are the weights we wish to extract from data, in our case $\beta_0$ and $\beta_1$.
+
+Note that we used
+!bt
+\[
+p(y_i=0\vert x_i, \hat{\beta}) = 1-p(y_i=1\vert x_i, \hat{\beta}).
+\]
+!et
+
+===== Maximum likelihood =====
+
+In order to define the total likelihood for all possible outcomes from a
+dataset $\mathcal{D}=\{(y_i,x_i)\}$, with the binary labels
+$y_i\in\{0,1\}$ and where the data points are drawn independently, we use the so-called "Maximum Likelihood Estimation":"https://en.wikipedia.org/wiki/Maximum_likelihood_estimation" (MLE) principle.
+We aim thus at maximizing
+the probability of seeing the observed data. We can then approximate the
+likelihood in terms of the product of the individual probabilities of a specific outcome $y_i$, that is
+!bt
+\begin{align*}
+P(\mathcal{D}|\hat{\beta})& = \prod_{i=1}^n \left[p(y_i=1|x_i,\hat{\beta})\right]^{y_i}\left[1-p(y_i=1|x_i,\hat{\beta}))\right]^{1-y_i}\nonumber \\
+\end{align*}
+!et
+from which we obtain the log-likelihood and our _cost/loss_ function
+!bt
+\[
+\mathcal{C}(\hat{\beta}) = \sum_{i=1}^n \left( y_i\log{p(y_i=1|x_i,\hat{\beta})} + (1-y_i)\log\left[1-p(y_i=1|x_i,\hat{\beta}))\right]\right).
+\]
+!et
+
+
+Reordering the logarithms, we can rewrite the _cost/loss_ function as
+!bt
+\[
+\mathcal{C}(\hat{\beta}) = \sum_{i=1}^n \left(y_i(\beta_0+\beta_1x_i) -\log{(1+\exp{(\beta_0+\beta_1x_i)})}\right).
+\]
+!et
+
+The maximum likelihood estimator is defined as the set of parameters that maximize the log-likelihood where we maximize with respect to $\beta$.
+Since the cost (error) function is just the negative log-likelihood, for logistic regression we have that
+!bt
+\[
+\mathcal{C}(\hat{\beta})=-\sum_{i=1}^n \left(y_i(\beta_0+\beta_1x_i) -\log{(1+\exp{(\beta_0+\beta_1x_i)})}\right).
+\]
+!et
+This equation is known in statistics as the _cross entropy_. Finally, we note that just as in linear regression,
+in practice we often supplement the cross-entropy with additional regularization terms, usually $L_1$ and $L_2$ regularization as we did for Ridge and Lasso regression.
+
+
+The cross entropy is a convex function of the weights $\hat{\beta}$ and,
+therefore, any local minimizer is a global minimizer.
+
+
+Minimizing this
+cost function with respect to the two parameters $\beta_0$ and $\beta_1$ we obtain
+
+!bt
+\[
+\frac{\partial \mathcal{C}(\hat{\beta})}{\partial \beta_0} = -\sum_{i=1}^n \left(y_i -\frac{\exp{(\beta_0+\beta_1x_i)}}{1+\exp{(\beta_0+\beta_1x_i)}}\right),
+\]
+!et
+and
+!bt
+\[
+\frac{\partial \mathcal{C}(\hat{\beta})}{\partial \beta_1} = -\sum_{i=1}^n \left(y_ix_i -x_i\frac{\exp{(\beta_0+\beta_1x_i)}}{1+\exp{(\beta_0+\beta_1x_i)}}\right).
+\]
+!et
+
+Let us now define a vector $\hat{y}$ with $n$ elements $y_i$, an
+$n\times p$ matrix $\hat{X}$ which contains the $x_i$ values and a
+vector $\hat{p}$ of fitted probabilities $p(y_i\vert x_i,\hat{\beta})$. We can rewrite in a more compact form the first
+derivative of cost function as
+
+!bt
+\[
+\frac{\partial \mathcal{C}(\hat{\beta})}{\partial \hat{\beta}} = -\hat{X}^T\left(\hat{y}-\hat{p}\right).
+\]
+!et
+
+If we in addition define a diagonal matrix $\hat{W}$ with elements
+$p(y_i\vert x_i,\hat{\beta})(1-p(y_i\vert x_i,\hat{\beta})$, we can obtain a compact expression of the second derivative as
+
+!bt
+\[
+\frac{\partial^2 \mathcal{C}(\hat{\beta})}{\partial \hat{\beta}\partial \hat{\beta}^T} = \hat{X}^T\hat{W}\hat{X}.
+\]
+!et
+
+
+Within a binary classification problem, we can easily expand our model to include multiple predictors. Our ratio between likelihoods is then with $p$ predictors
+!bt
+\[
+\log{ \frac{p(\hat{\beta}\hat{x})}{1-p(\hat{\beta}\hat{x})}} = \beta_0+\beta_1x_1+\beta_2x_2+\dots+\beta_px_p.
+\]
+!et
+Here we defined $\hat{x}=[1,x_1,x_2,\dots,x_p]$ and $\hat{\beta}=[\beta_0, \beta_1, \dots, \beta_p]$ leading to
+!bt
+\[
+p(\hat{\beta}\hat{x})=\frac{ \exp{(\beta_0+\beta_1x_1+\beta_2x_2+\dots+\beta_px_p)}}{1+\exp{(\beta_0+\beta_1x_1+\beta_2x_2+\dots+\beta_px_p)}}.
+\]
+!et
+
+
+===== Including more classes =====
+
+Till now we have mainly focused on two classes, the so-called binary
+system. Suppose we wish to extend to $K$ classes. Let us for the sake
+of simplicity assume we have only two predictors. We have then
+following model
+
+!bt
+\[
+\log{\frac{p(C=1\vert x)}{p(K\vert x)}} = \beta_{10}+\beta_{11}x_1,
+\]
+!et
+!bt
+\[
+\log{\frac{p(C=2\vert x)}{p(K\vert x)}} = \beta_{20}+\beta_{21}x_1,
+\]
+!et
+and so on till the class $C=K-1$ class
+!bt
+\[
+\log{\frac{p(C=K-1\vert x)}{p(K\vert x)}} = \beta_{(K-1)0}+\beta_{(K-1)1}x_1,
+\]
+!et
+
+and the model is specified in term of $K-1$ so-called log-odds or
+_logit_ transformations.
+
+
+
+In our discussion of neural networks we will encounter the above again
+in terms of a slightly modified function, the so-called _Softmax_ function.
+
+The softmax function is used in various multiclass classification
+methods, such as multinomial logistic regression (also known as
+softmax regression), multiclass linear discriminant analysis, naive
+Bayes classifiers, and artificial neural networks. Specifically, in
+multinomial logistic regression and linear discriminant analysis, the
+input to the function is the result of $K$ distinct linear functions,
+and the predicted probability for the $k$-th class given a sample
+vector $\hat{x}$ and a weighting vector $\hat{\beta}$ is (with two
+predictors):
+
+!bt
+\[
+p(C=k\vert \mathbf {x} )=\frac{\exp{(\beta_{k0}+\beta_{k1}x_1)}}{1+\sum_{l=1}^{K-1}\exp{(\beta_{l0}+\beta_{l1}x_1)}}.
+\]
+!et
+It is easy to extend to more predictors. The final class is
+!bt
+\[
+p(C=K\vert \mathbf {x} )=\frac{1}{1+\sum_{l=1}^{K-1}\exp{(\beta_{l0}+\beta_{l1}x_1)}},
+\]
+!et
+
+and they sum to one. Our earlier discussions were all specialized to
+the case with two classes only. It is easy to see from the above that
+what we derived earlier is compatible with these equations.
+
+To find the optimal parameters we would typically use a gradient
+descent method. Newton's method and gradient descent methods are
+discussed in the material on "optimization
+methods":"https://compphysics.github.io/MachineLearning/doc/pub/Splines/html/Splines-bs.html".
+
+
+
+
+
diff --git a/doc/src/NeuralNet/chapter6.dlog b/doc/src/NeuralNet/chapter6.dlog
new file mode 100644
index 000000000..7cc5f0c3e
--- /dev/null
+++ b/doc/src/NeuralNet/chapter6.dlog
@@ -0,0 +1,4 @@
+translating doconce text in chapter6.do.txt to ipynb
+Failed to remove ans_at_end environment
+Failed to remove sol_at_end environment
+output in chapter6.ipynb
diff --git a/doc/src/NeuralNet/chapter6.do.txt b/doc/src/NeuralNet/chapter6.do.txt
new file mode 100644
index 000000000..cb962573f
--- /dev/null
+++ b/doc/src/NeuralNet/chapter6.do.txt
@@ -0,0 +1,2462 @@
+======= Neural networks, from the simple perceptron to deep learning =======
+
+===== To do list =====
+
+* write code for single perceptron model and make link with linear regression
+* revise initial info and add references
+* Update tensorflow material, with keras
+* think of adding material about pytorch
+* rework pulsar example and breast cancer example
+* add ising model example for both regression and classification
+* make data on gravitational problem, add reference to articles on uncovering physical laws from ML
+* think of genetic data
+
+
+
+===== Neural networks =====
+
+Artificial neural networks are computational systems that can learn to
+perform tasks by considering examples, generally without being
+programmed with any task-specific rules. It is supposed to mimic a
+biological system, wherein neurons interact by sending signals in the
+form of mathematical functions between layers. All layers can contain
+an arbitrary number of neurons, and each connection is represented by
+a weight variable.
+
+
+
+===== Artificial neurons =====
+
+The field of artificial neural networks has a long history of
+development, and is closely connected with the advancement of computer
+science and computers in general. A model of artificial neurons was
+first developed by McCulloch and Pitts in 1943 to study signal
+processing in the brain and has later been refined by others. The
+general idea is to mimic neural networks in the human brain, which is
+composed of billions of neurons that communicate with each other by
+sending electrical signals. Each neuron accumulates its incoming
+signals, which must exceed an activation threshold to yield an
+output. If the threshold is not overcome, the neuron remains inactive,
+i.e. has zero output.
+
+This behaviour has inspired a simple mathematical model for an artificial neuron.
+
+!bt
+\begin{equation}
+ y = f\left(\sum_{i=1}^n w_ix_i\right) = f(u)
+ label{artificialNeuron}
+\end{equation}
+!et
+Here, the output $y$ of the neuron is the value of its activation function, which have as input
+a weighted sum of signals $x_i, \dots ,x_n$ received by $n$ other neurons.
+
+Conceptually, it is helpful to divide neural networks into four
+categories:
+o general purpose neural networks for supervised learning,
+o neural networks designed specifically for image processing, the most prominent example of this class being Convolutional Neural Networks (CNNs),
+o neural networks for sequential data such as Recurrent Neural Networks (RNNs), and
+o neural networks for unsupervised learning such as Deep Boltzmann Machines.
+
+
+In natural science, DNNs and CNNs have already found numerous
+applications. In statistical physics, they have been applied to detect
+phase transitions in 2D Ising and Potts models, lattice gauge
+theories, and different phases of polymers, or solving the
+Navier-Stokes equation in weather forecasting. Deep learning has also
+found interesting applications in quantum physics. Various quantum
+phase transitions can be detected and studied using DNNs and CNNs,
+topological phases, and even non-equilibrium many-body
+localization. Representing quantum states as DNNs quantum state
+tomography are among some of the impressive achievements to reveal the
+potential of DNNs to facilitate the study of quantum systems.
+
+In quantum information theory, it has been shown that one can perform
+gate decompositions with the help of neural.
+
+The applications are not limited to the natural sciences. There is a
+plethora of applications in essentially all disciplines, from the
+humanities to life science and medicine.
+
+
+===== Neural network types =====
+
+An artificial neural network (ANN), is a computational model that
+consists of layers of connected neurons, or nodes or units. We will
+refer to these interchangeably as units or nodes, and sometimes as
+neurons.
+
+It is supposed to mimic a biological nervous system by letting each
+neuron interact with other neurons by sending signals in the form of
+mathematical functions between layers. A wide variety of different
+ANNs have been developed, but most of them consist of an input layer,
+an output layer and eventual layers in-between, called *hidden
+layers*. All layers can contain an arbitrary number of nodes, and each
+connection between two nodes is associated with a weight variable.
+
+Neural networks (also called neural nets) are neural-inspired
+nonlinear models for supervised learning. As we will see, neural nets
+can be viewed as natural, more powerful extensions of supervised
+learning methods such as linear and logistic regression and soft-max
+methods we discussed earlier.
+
+
+
+===== Feed-forward neural networks =====
+
+The feed-forward neural network (FFNN) was the first and simplest type
+of ANNs that were devised. In this network, the information moves in
+only one direction: forward through the layers.
+
+Nodes are represented by circles, while the arrows display the
+connections between the nodes, including the direction of information
+flow. Additionally, each arrow corresponds to a weight variable
+(figure to come). We observe that each node in a layer is connected
+to *all* nodes in the subsequent layer, making this a so-called
+*fully-connected* FFNN.
+
+
+
+
+===== Convolutional Neural Network =====
+
+A different variant of FFNNs are *convolutional neural networks*
+(CNNs), which have a connectivity pattern inspired by the animal
+visual cortex. Individual neurons in the visual cortex only respond to
+stimuli from small sub-regions of the visual field, called a receptive
+field. This makes the neurons well-suited to exploit the strong
+spatially local correlation present in natural images. The response of
+each neuron can be approximated mathematically as a convolution
+operation. (figure to come)
+
+Convolutional neural networks emulate the behaviour of neurons in the
+visual cortex by enforcing a *local* connectivity pattern between
+nodes of adjacent layers: Each node in a convolutional layer is
+connected only to a subset of the nodes in the previous layer, in
+contrast to the fully-connected FFNN. Often, CNNs consist of several
+convolutional layers that learn local features of the input, with a
+fully-connected layer at the end, which gathers all the local data and
+produces the outputs. They have wide applications in image and video
+recognition.
+
+
+===== Recurrent neural networks =====
+
+So far we have only mentioned ANNs where information flows in one
+direction: forward. *Recurrent neural networks* on the other hand,
+have connections between nodes that form directed *cycles*. This
+creates a form of internal memory which are able to capture
+information on what has been calculated before; the output is
+dependent on the previous computations. Recurrent NNs make use of
+sequential information by performing the same task for every element
+in a sequence, where each element depends on previous elements. An
+example of such information is sentences, making recurrent NNs
+especially well-suited for handwriting and speech recognition.
+
+
+===== Other types of networks =====
+
+There are many other kinds of ANNs that have been developed. One type
+that is specifically designed for interpolation in multidimensional
+space is the radial basis function (RBF) network. RBFs are typically
+made up of three layers: an input layer, a hidden layer with
+non-linear radial symmetric activation functions and a linear output
+layer (''linear'' here means that each node in the output layer has a
+linear activation function). The layers are normally fully-connected
+and there are no cycles, thus RBFs can be viewed as a type of
+fully-connected FFNN. They are however usually treated as a separate
+type of NN due the unusual activation functions.
+
+
+===== Multilayer perceptrons =====
+
+One uses often so-called fully-connected feed-forward neural networks
+with three or more layers (an input layer, one or more hidden layers
+and an output layer) consisting of neurons that have non-linear
+activation functions.
+
+Such networks are often called *multilayer perceptrons* (MLPs).
+
+
+===== Why multilayer perceptrons? =====
+
+According to the *Universal approximation theorem*, a feed-forward
+neural network with just a single hidden layer containing a finite
+number of neurons can approximate a continuous multidimensional
+function to arbitrary accuracy, assuming the activation function for
+the hidden layer is a _non-constant, bounded and
+monotonically-increasing continuous function_.
+
+Note that the requirements on the activation function only applies to
+the hidden layer, the output nodes are always assumed to be linear, so
+as to not restrict the range of output values.
+
+
+
+===== Mathematical model =====
+
+The output $y$ is produced via the activation function $f$
+!bt
+\[
+ y = f\left(\sum_{i=1}^n w_ix_i + b_i\right) = f(z),
+\]
+!et
+This function receives $x_i$ as inputs.
+Here the activation $z=(\sum_{i=1}^n w_ix_i+b_i)$.
+In an FFNN of such neurons, the *inputs* $x_i$ are the *outputs* of
+the neurons in the preceding layer. Furthermore, an MLP is
+fully-connected, which means that each neuron receives a weighted sum
+of the outputs of *all* neurons in the previous layer.
+
+
+===== Mathematical model =====
+
+First, for each node $i$ in the first hidden layer, we calculate a weighted sum $z_i^1$ of the input coordinates $x_j$,
+
+!bt
+\begin{equation} z_i^1 = \sum_{j=1}^{M} w_{ij}^1 x_j + b_i^1
+\end{equation}
+!et
+
+Here $b_i$ is the so-called bias which is normally needed in
+case of zero activation weights or inputs. How to fix the biases and
+the weights will be discussed below. The value of $z_i^1$ is the
+argument to the activation function $f_i$ of each node $i$, The
+variable $M$ stands for all possible inputs to a given node $i$ in the
+first layer. We define the output $y_i^1$ of all neurons in layer 1 as
+
+!bt
+\begin{equation}
+ y_i^1 = f(z_i^1) = f\left(\sum_{j=1}^M w_{ij}^1 x_j + b_i^1\right)
+ label{outputLayer1}
+\end{equation}
+!et
+
+where we assume that all nodes in the same layer have identical
+activation functions, hence the notation $f$. In general, we could assume in the more general case that different layers have different activation functions.
+In this case we would identify these functions with a superscript $l$ for the $l$-th layer,
+
+!bt
+\begin{equation}
+ y_i^l = f^l(u_i^l) = f^l\left(\sum_{j=1}^{N_{l-1}} w_{ij}^l y_j^{l-1} + b_i^l\right)
+ label{generalLayer}
+\end{equation}
+!et
+
+where $N_l$ is the number of nodes in layer $l$. When the output of
+all the nodes in the first hidden layer are computed, the values of
+the subsequent layer can be calculated and so forth until the output
+is obtained.
+
+
+
+
+===== Mathematical model =====
+
+The output of neuron $i$ in layer 2 is thus,
+
+!bt
+\begin{align}
+ y_i^2 &= f^2\left(\sum_{j=1}^N w_{ij}^2 y_j^1 + b_i^2\right) \\
+ &= f^2\left[\sum_{j=1}^N w_{ij}^2f^1\left(\sum_{k=1}^M w_{jk}^1 x_k + b_j^1\right) + b_i^2\right]
+ label{outputLayer2}
+\end{align}
+!et
+where we have substituted $y_k^1$ with the inputs $x_k$. Finally, the ANN output reads
+
+!bt
+\begin{align}
+ y_i^3 &= f^3\left(\sum_{j=1}^N w_{ij}^3 y_j^2 + b_i^3\right) \\
+ &= f_3\left[\sum_{j} w_{ij}^3 f^2\left(\sum_{k} w_{jk}^2 f^1\left(\sum_{m} w_{km}^1 x_m + b_k^1\right) + b_j^2\right)
+ + b_1^3\right]
+\end{align}
+!et
+
+
+===== Mathematical model =====
+
+We can generalize this expression to an MLP with $l$ hidden
+layers. The complete functional form is,
+
+!bt
+\begin{align}
+&y^{l+1}_i = f^{l+1}\left[\!\sum_{j=1}^{N_l} w_{ij}^3 f^l\left(\sum_{k=1}^{N_{l-1}}w_{jk}^{l-1}\left(\dots f^1\left(\sum_{n=1}^{N_0} w_{mn}^1 x_n+ b_m^1\right)\dots\right)+b_k^2\right)+b_1^3\right] &&
+ label{completeNN}
+\end{align}
+!et
+
+which illustrates a basic property of MLPs: The only independent
+variables are the input values $x_n$.
+
+
+===== Mathematical model =====
+
+This confirms that an MLP, despite its quite convoluted mathematical
+form, is nothing more than an analytic function, specifically a
+mapping of real-valued vectors $\hat{x} \in \mathbb{R}^n \rightarrow
+\hat{y} \in \mathbb{R}^m$.
+
+Furthermore, the flexibility and universality of an MLP can be
+illustrated by realizing that the expression is essentially a nested
+sum of scaled activation functions of the form
+
+!bt
+\begin{equation}
+ f(x) = c_1 f(c_2 x + c_3) + c_4
+\end{equation}
+!et
+
+where the parameters $c_i$ are weights and biases. By adjusting these
+parameters, the activation functions can be shifted up and down or
+left and right, change slope or be rescaled which is the key to the
+flexibility of a neural network.
+
+
+=== Matrix-vector notation ===
+
+We can introduce a more convenient notation for the activations in an A NN.
+
+Additionally, we can represent the biases and activations
+as layer-wise column vectors $\hat{b}_l$ and $\hat{y}_l$, so that the $i$-th element of each vector
+is the bias $b_i^l$ and activation $y_i^l$ of node $i$ in layer $l$ respectively.
+
+We have that $\mathrm{W}_l$ is an $N_{l-1} \times N_l$ matrix, while $\hat{b}_l$ and $\hat{y}_l$ are $N_l \times 1$ column vectors.
+With this notation, the sum becomes a matrix-vector multiplication, and we can write
+the equation for the activations of hidden layer 2 (assuming three nodes for simplicity) as
+!bt
+\begin{equation}
+ \hat{y}_2 = f_2(\mathrm{W}_2 \hat{y}_{1} + \hat{b}_{2}) =
+ f_2\left(\left[\begin{array}{ccc}
+ w^2_{11} &w^2_{12} &w^2_{13} \\
+ w^2_{21} &w^2_{22} &w^2_{23} \\
+ w^2_{31} &w^2_{32} &w^2_{33} \\
+ \end{array} \right] \cdot
+ \left[\begin{array}{c}
+ y^1_1 \\
+ y^1_2 \\
+ y^1_3 \\
+ \end{array}\right] +
+ \left[\begin{array}{c}
+ b^2_1 \\
+ b^2_2 \\
+ b^2_3 \\
+ \end{array}\right]\right).
+\end{equation}
+!et
+
+
+=== Matrix-vector notation and activation ===
+
+The activation of node $i$ in layer 2 is
+
+!bt
+\begin{equation}
+ y^2_i = f_2\Bigr(w^2_{i1}y^1_1 + w^2_{i2}y^1_2 + w^2_{i3}y^1_3 + b^2_i\Bigr) =
+ f_2\left(\sum_{j=1}^3 w^2_{ij} y_j^1 + b^2_i\right).
+\end{equation}
+!et
+
+This is not just a convenient and compact notation, but also a useful
+and intuitive way to think about MLPs: The output is calculated by a
+series of matrix-vector multiplications and vector additions that are
+used as input to the activation functions. For each operation
+$\mathrm{W}_l \hat{y}_{l-1}$ we move forward one layer.
+
+
+
+=== Activation functions ===
+
+
+A property that characterizes a neural network, other than its
+connectivity, is the choice of activation function(s). As described
+in, the following restrictions are imposed on an activation function
+for a FFNN to fulfill the universal approximation theorem
+
+ * Non-constant
+
+ * Bounded
+
+ * Monotonically-increasing
+
+ * Continuous
+
+
+=== Activation functions, Logistic and Hyperbolic ones ===
+
+The second requirement excludes all linear functions. Furthermore, in
+a MLP with only linear activation functions, each layer simply
+performs a linear transformation of its inputs.
+
+Regardless of the number of layers, the output of the NN will be
+nothing but a linear function of the inputs. Thus we need to introduce
+some kind of non-linearity to the NN to be able to fit non-linear
+functions Typical examples are the logistic *Sigmoid*
+
+!bt
+\[
+ f(x) = \frac{1}{1 + e^{-x}},
+\]
+!et
+and the *hyperbolic tangent* function
+!bt
+\[
+ f(x) = \tanh(x)
+\]
+!et
+
+
+=== Relevance ===
+
+The *sigmoid* function are more biologically plausible because the
+output of inactive neurons are zero. Such activation function are
+called *one-sided*. However, it has been shown that the hyperbolic
+tangent performs better than the sigmoid for training MLPs. has
+become the most popular for *deep neural networks*
+
+!bc pycod
+"""The sigmoid function (or the logistic curve) is a
+function that takes any real number, z, and outputs a number (0,1).
+It is useful in neural networks for assigning weights on a relative scale.
+The value z is the weighted sum of parameters involved in the learning algorithm."""
+
+import numpy
+import matplotlib.pyplot as plt
+import math as mt
+
+z = numpy.arange(-5, 5, .1)
+sigma_fn = numpy.vectorize(lambda z: 1/(1+numpy.exp(-z)))
+sigma = sigma_fn(z)
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot(z, sigma)
+ax.set_ylim([-0.1, 1.1])
+ax.set_xlim([-5,5])
+ax.grid(True)
+ax.set_xlabel('z')
+ax.set_title('sigmoid function')
+
+plt.show()
+
+"""Step Function"""
+z = numpy.arange(-5, 5, .02)
+step_fn = numpy.vectorize(lambda z: 1.0 if z >= 0.0 else 0.0)
+step = step_fn(z)
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot(z, step)
+ax.set_ylim([-0.5, 1.5])
+ax.set_xlim([-5,5])
+ax.grid(True)
+ax.set_xlabel('z')
+ax.set_title('step function')
+
+plt.show()
+
+"""Sine Function"""
+z = numpy.arange(-2*mt.pi, 2*mt.pi, 0.1)
+t = numpy.sin(z)
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot(z, t)
+ax.set_ylim([-1.0, 1.0])
+ax.set_xlim([-2*mt.pi,2*mt.pi])
+ax.grid(True)
+ax.set_xlabel('z')
+ax.set_title('sine function')
+
+plt.show()
+
+"""Plots a graph of the squashing function used by a rectified linear
+unit"""
+z = numpy.arange(-2, 2, .1)
+zero = numpy.zeros(len(z))
+y = numpy.max([zero, z], axis=0)
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot(z, y)
+ax.set_ylim([-2.0, 2.0])
+ax.set_xlim([-2.0, 2.0])
+ax.grid(True)
+ax.set_xlabel('z')
+ax.set_title('Rectified linear unit')
+
+plt.show()
+!ec
+
+
+
+===== The multilayer perceptron (MLP) =====
+
+The multilayer perceptron is a very popular, and easy to implement approach, to deep learning. It consists of
+o A neural network with one or more layers of nodes between the input and the output nodes.
+o The multilayer network structure, or architecture, or topology, consists of an input layer, one or more hidden layers, and one output layer.
+o The input nodes pass values to the first hidden layer, its nodes pass the information on to the second and so on till we reach the output layer.
+
+As a convention it is normal to call a network with one layer of input units, one layer of hidden
+units and one layer of output units as a two-layer network. A network with two layers of hidden units is called a three-layer network etc etc.
+
+For an MLP network there is no direct connection between the output nodes/neurons/units and the input nodes/neurons/units.
+Hereafter we will call the various entities of a layer for nodes.
+There are also no connections within a single layer.
+
+The number of input nodes does not need to equal the number of output
+nodes. This applies also to the hidden layers. Each layer may have its
+own number of nodes and activation functions.
+
+The hidden layers have their name from the fact that they are not
+linked to observables and as we will see below when we define the
+so-called activation $\hat{z}$, we can think of this as a basis
+expansion of the original inputs $\hat{x}$. The difference however
+between neural networks and say linear regression is that now these
+basis functions (which will correspond to the weights in the network)
+are learned from data. This results in an important difference between
+neural networks and deep learning approaches on one side and methods
+like logistic regression or linear regression and their modifications on the other side.
+
+
+
+===== From one to many layers, the universal approximation theorem =====
+
+
+A neural network with only one layer, what we called the simple
+perceptron, is best suited if we have a standard binary model with
+clear (linear) boundaries between the outcomes. As such it could
+equally well be replaced by standard linear regression or logistic
+regression. Networks with one or more hidden layers approximate
+systems with more complex boundaries.
+
+As stated earlier,
+an important theorem in studies of neural networks, restated without
+proof here, is the "universal approximation
+theorem":"http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.441.7873&rep=rep1&type=pdf".
+
+It states that a feed-forward network with a single hidden layer
+containing a finite number of neurons can approximate continuous
+functions on compact subsets of real functions. The theorem thus
+states that simple neural networks can represent a wide variety of
+interesting functions when given appropriate parameters. It is the
+multilayer feedforward architecture itself which gives neural networks
+the potential of being universal approximators.
+
+
+
+===== Deriving the back propagation code for a multilayer perceptron model =====
+
+
+_Note: figures will be inserted later!_
+
+As we have seen now in a feed forward network, we can express the final output of our network in terms of basic matrix-vector multiplications.
+The unknowwn quantities are our weights $w_{ij}$ and we need to find an algorithm for changing them so that our errors are as small as possible.
+This leads us to the famous "back propagation algorithm":"https://www.nature.com/articles/323533a0".
+
+The questions we want to ask are how do changes in the biases and the
+weights in our network change the cost function and how can we use the
+final output to modify the weights?
+
+To derive these equations let us start with a plain regression problem
+and define our cost function as
+
+!bt
+\[
+{\cal C}(\hat{W}) = \frac{1}{2}\sum_{i=1}^n\left(y_i - t_i\right)^2,
+\]
+!et
+
+where the $t_i$s are our $n$ targets (the values we want to
+reproduce), while the outputs of the network after having propagated
+all inputs $\hat{x}$ are given by $y_i$. Below we will demonstrate
+how the basic equations arising from the back propagation algorithm
+can be modified in order to study classification problems with $K$
+classes.
+
+
+===== Definitions =====
+
+With our definition of the targets $\hat{t}$, the outputs of the
+network $\hat{y}$ and the inputs $\hat{x}$ we
+define now the activation $z_j^l$ of node/neuron/unit $j$ of the
+$l$-th layer as a function of the bias, the weights which add up from
+the previous layer $l-1$ and the forward passes/outputs
+$\hat{a}^{l-1}$ from the previous layer as
+
+
+!bt
+\[
+z_j^l = \sum_{i=1}^{M_{l-1}}w_{ij}^la_i^{l-1}+b_j^l,
+\]
+!et
+
+where $b_k^l$ are the biases from layer $l$. Here $M_{l-1}$
+represents the total number of nodes/neurons/units of layer $l-1$. The
+figure here illustrates this equation. We can rewrite this in a more
+compact form as the matrix-vector products we discussed earlier,
+
+!bt
+\[
+\hat{z}^l = \left(\hat{W}^l\right)^T\hat{a}^{l-1}+\hat{b}^l.
+\]
+!et
+
+With the activation values $\hat{z}^l$ we can in turn define the
+output of layer $l$ as $\hat{a}^l = f(\hat{z}^l)$ where $f$ is our
+activation function. In the examples here we will use the sigmoid
+function discussed in our logistic regression lectures. We will also use the same activation function $f$ for all layers
+and their nodes. It means we have
+
+!bt
+\[
+a_j^l = f(z_j^l) = \frac{1}{1+\exp{-(z_j^l)}}.
+\]
+!et
+
+
+
+===== Derivatives and the chain rule =====
+
+From the definition of the activation $z_j^l$ we have
+!bt
+\[
+\frac{\partial z_j^l}{\partial w_{ij}^l} = a_i^{l-1},
+\]
+!et
+and
+!bt
+\[
+\frac{\partial z_j^l}{\partial a_i^{l-1}} = w_{ji}^l.
+\]
+!et
+
+With our definition of the activation function we have that (note that this function depends only on $z_j^l$)
+!bt
+\[
+\frac{\partial a_j^l}{\partial z_j^{l}} = a_j^l(1-a_j^l)=f(z_j^l)(1-f(z_j^l)).
+\]
+!et
+
+
+
+===== Derivative of the cost function =====
+
+With these definitions we can now compute the derivative of the cost function in terms of the weights.
+
+Let us specialize to the output layer $l=L$. Our cost function is
+!bt
+\[
+{\cal C}(\hat{W^L}) = \frac{1}{2}\sum_{i=1}^n\left(y_i - t_i\right)^2=\frac{1}{2}\sum_{i=1}^n\left(a_i^L - t_i\right)^2,
+\]
+!et
+The derivative of this function with respect to the weights is
+
+!bt
+\[
+\frac{\partial{\cal C}(\hat{W^L})}{\partial w_{jk}^L} = \left(a_j^L - t_j\right)\frac{\partial a_j^L}{\partial w_{jk}^{L}},
+\]
+!et
+The last partial derivative can easily be computed and reads (by applying the chain rule)
+!bt
+\[
+\frac{\partial a_j^L}{\partial w_{jk}^{L}} = \frac{\partial a_j^L}{\partial z_{j}^{L}}\frac{\partial z_j^L}{\partial w_{jk}^{L}}=a_j^L(1-a_j^L)a_k^{L-1},
+\]
+!et
+
+
+
+
+===== Bringing it together, first back propagation equation =====
+
+We have thus
+!bt
+\[
+\frac{\partial{\cal C}(\hat{W^L})}{\partial w_{jk}^L} = \left(a_j^L - t_j\right)a_j^L(1-a_j^L)a_k^{L-1},
+\]
+!et
+
+Defining
+!bt
+\[
+\delta_j^L = a_j^L(1-a_j^L)\left(a_j^L - t_j\right) = f'(z_j^L)\frac{\partial {\cal C}}{\partial (a_j^L)},
+\]
+!et
+and using the Hadamard product of two vectors we can write this as
+!bt
+\[
+\hat{\delta}^L = f'(\hat{z}^L)\circ\frac{\partial {\cal C}}{\partial (\hat{a}^L)}.
+\]
+!et
+
+This is an important expression. The second term on the right handside
+measures how fast the cost function is changing as a function of the $j$th
+output activation. If, for example, the cost function doesn't depend
+much on a particular output node $j$, then $\delta_j^L$ will be small,
+which is what we would expect. The first term on the right, measures
+how fast the activation function $f$ is changing at a given activation
+value $z_j^L$.
+
+Notice that everything in the above equations is easily computed. In
+particular, we compute $z_j^L$ while computing the behaviour of the
+network, and it is only a small additional overhead to compute
+$f'(z^L_j)$. The exact form of the derivative with respect to the
+output depends on the form of the cost function.
+However, provided the cost function is known there should be little
+trouble in calculating
+
+!bt
+\[
+\frac{\partial {\cal C}}{\partial (a_j^L)}
+\]
+!et
+
+With the definition of $\delta_j^L$ we have a more compact definition of the derivative of the cost function in terms of the weights, namely
+!bt
+\[
+\frac{\partial{\cal C}(\hat{W^L})}{\partial w_{jk}^L} = \delta_j^La_k^{L-1}.
+\]
+!et
+
+
+===== Derivatives in terms of $z_j^L$ =====
+
+It is also easy to see that our previous equation can be written as
+
+!bt
+\[
+\delta_j^L =\frac{\partial {\cal C}}{\partial z_j^L}= \frac{\partial {\cal C}}{\partial a_j^L}\frac{\partial a_j^L}{\partial z_j^L},
+\]
+!et
+which can also be interpreted as the partial derivative of the cost function with respect to the biases $b_j^L$, namely
+!bt
+\[
+\delta_j^L = \frac{\partial {\cal C}}{\partial b_j^L}\frac{\partial b_j^L}{\partial z_j^L}=\frac{\partial {\cal C}}{\partial b_j^L},
+\]
+!et
+That is, the error $\delta_j^L$ is exactly equal to the rate of change of the cost function as a function of the bias.
+
+===== Bringing it together =====
+
+We have now three equations that are essential for the computations of the derivatives of the cost function at the output layer. These equations are needed to start the algorithm and they are
+
+!bblock The starting equations
+
+!bt
+\begin{equation}
+\frac{\partial{\cal C}(\hat{W^L})}{\partial w_{jk}^L} = \delta_j^La_k^{L-1},
+\end{equation}
+!et
+and
+!bt
+\begin{equation}
+\delta_j^L = f'(z_j^L)\frac{\partial {\cal C}}{\partial (a_j^L)},
+\end{equation}
+!et
+and
+
+!bt
+\begin{equation}
+\delta_j^L = \frac{\partial {\cal C}}{\partial b_j^L},
+\end{equation}
+!et
+!eblock
+
+
+An interesting consequence of the above equations is that when the
+activation $a_k^{L-1}$ is small, the gradient term, that is the
+derivative of the cost function with respect to the weights, will also
+tend to be small. We say then that the weight learns slowly, meaning
+that it changes slowly when we minimize the weights via say gradient
+descent. In this case we say the system learns slowly.
+
+Another interesting feature is that is when the activation function,
+represented by the sigmoid function here, is rather flat when we move towards
+its end values $0$ and $1$ (see the above Python codes). In these
+cases, the derivatives of the activation function will also be close
+to zero, meaning again that the gradients will be small and the
+network learns slowly again.
+
+
+
+We need a fourth equation and we are set. We are going to propagate
+backwards in order to the determine the weights and biases. In order
+to do so we need to represent the error in the layer before the final
+one $L-1$ in terms of the errors in the final output layer.
+
+
+===== Final back propagating equation =====
+
+We have that (replacing $L$ with a general layer $l$)
+!bt
+\[
+\delta_j^l =\frac{\partial {\cal C}}{\partial z_j^l}.
+\]
+!et
+We want to express this in terms of the equations for layer $l+1$. Using the chain rule and summing over all $k$ entries we have
+
+!bt
+\[
+\delta_j^l =\sum_k \frac{\partial {\cal C}}{\partial z_k^{l+1}}\frac{\partial z_k^{l+1}}{\partial z_j^{l}}=\sum_k \delta_k^{l+1}\frac{\partial z_k^{l+1}}{\partial z_j^{l}},
+\]
+!et
+and recalling that
+!bt
+\[
+z_j^{l+1} = \sum_{i=1}^{M_{l}}w_{ij}^{l+1}a_i^{l}+b_j^{l+1},
+\]
+!et
+with $M_l$ being the number of nodes in layer $l$, we obtain
+!bt
+\[
+\delta_j^l =\sum_k \delta_k^{l+1}w_{kj}^{l+1}f'(z_j^l),
+\]
+!et
+This is our final equation.
+
+We are now ready to set up the algorithm for back propagation and learning the weights and biases.
+
+
+===== Setting up the Back propagation algorithm =====
+
+
+
+The four equations provide us with a way of computing the gradient of the cost function. Let us write this out in the form of an algorithm.
+
+!bblock
+First, we set up the input data $\hat{x}$ and the activations
+$\hat{z}_1$ of the input layer and compute the activation function and
+the pertinent outputs $\hat{a}^1$.
+!eblock
+
+!bblock
+Secondly, we perform then the feed forward till we reach the output
+layer and compute all $\hat{z}_l$ of the input layer and compute the
+activation function and the pertinent outputs $\hat{a}^l$ for
+$l=2,3,\dots,L$.
+!eblock
+
+!bblock
+Thereafter we compute the ouput error $\hat{\delta}^L$ by computing all
+!bt
+\[
+\delta_j^L = f'(z_j^L)\frac{\partial {\cal C}}{\partial (a_j^L)}.
+\]
+!et
+!eblock
+
+!bblock
+Then we compute the back propagate error for each $l=L-1,L-2,\dots,2$ as
+!bt
+\[
+\delta_j^l = \sum_k \delta_k^{l+1}w_{kj}^{l+1}f'(z_j^l).
+\]
+!et
+!eblock
+
+!bblock
+Finally, we update the weights and the biases using gradient descent for each $l=L-1,L-2,\dots,2$ and update the weights and biases according to the rules
+!bt
+\[
+w_{jk}^l\leftarrow = w_{jk}^l- \eta \delta_j^la_k^{l-1},
+\]
+!et
+
+!bt
+\[
+b_j^l \leftarrow b_j^l-\eta \frac{\partial {\cal C}}{\partial b_j^l}=b_j^l-\eta \delta_j^l,
+\]
+!et
+!eblock
+
+The parameter $\eta$ is the learning parameter discussed in connection with the gradient descent methods.
+Here it is convenient to use stochastic gradient descent (see the examples below) with mini-batches with an outer loop that steps through multiple epochs of training.
+
+
+
+===== Setting up a Multi-layer perceptron model for classification =====
+
+We are now gong to develop an example based on the MNIST data
+base. This is a classification problem and we need to use our
+cross-entropy function we discussed in connection with logistic
+regression. The cross-entropy defines our cost function for the
+classificaton problems with neural networks.
+
+In binary classification with two classes $(0, 1)$ we define the
+logistic/sigmoid function as the probability that a particular input
+is in class $0$ or $1$. This is possible because the logistic
+function takes any input from the real numbers and inputs a number
+between 0 and 1, and can therefore be interpreted as a probability. It
+also has other nice properties, such as a derivative that is simple to
+calculate.
+
+For an input $\boldsymbol{a}$ from the hidden layer, the probability that the input $\boldsymbol{x}$
+is in class 0 or 1 is just. We let $\theta$ represent the unknown weights and biases to be adjusted by our equations). The variable $x$
+represents our activation values $z$. We have
+!bt
+\[
+P(y = 0 \mid \hat{x}, \hat{\theta}) = \frac{1}{1 + \exp{(- \hat{x}})} ,
+\]
+!et
+and
+!bt
+\[
+P(y = 1 \mid \hat{x}, \hat{\theta}) = 1 - P(y = 0 \mid \hat{x}, \hat{\theta}) ,
+\]
+!et
+
+where $y \in \{0, 1\}$ and $\hat{\theta}$ represents the weights and biases
+of our network.
+
+
+
+===== Defining the cost function =====
+
+Our cost function is given as (see the Logistic regression lectures)
+!bt
+\[
+\mathcal{C}(\hat{\theta}) = - \ln P(\mathcal{D} \mid \hat{\theta}) = - \sum_{i=1}^n
+y_i \ln[P(y_i = 0)] + (1 - y_i) \ln [1 - P(y_i = 0)] = \sum_{i=1}^n \mathcal{L}_i(\hat{\theta}) .
+\]
+!et
+
+This last equality means that we can interpret our *cost* function as a sum over the *loss* function
+for each point in the dataset $\mathcal{L}_i(\hat{\theta})$.
+The negative sign is just so that we can think about our algorithm as minimizing a positive number, rather
+than maximizing a negative number.
+
+In *multiclass* classification it is common to treat each integer label as a so called *one-hot* vector:
+
+$y = 5 \quad \rightarrow \quad \hat{y} = (0, 0, 0, 0, 0, 1, 0, 0, 0, 0) ,$ and
+
+
+$y = 1 \quad \rightarrow \quad \hat{y} = (0, 1, 0, 0, 0, 0, 0, 0, 0, 0) ,$
+
+
+i.e. a binary bit string of length $C$, where $C = 10$ is the number of classes in the MNIST dataset (numbers from $0$ to $9$)..
+
+If $\hat{x}_i$ is the $i$-th input (image), $y_{ic}$ refers to the $c$-th component of the $i$-th
+output vector $\hat{y}_i$.
+The probability of $\hat{x}_i$ being in class $c$ will be given by the softmax function:
+
+!bt
+\[
+P(y_{ic} = 1 \mid \hat{x}_i, \hat{\theta}) = \frac{\exp{((\hat{a}_i^{hidden})^T \hat{w}_c)}}
+{\sum_{c'=0}^{C-1} \exp{((\hat{a}_i^{hidden})^T \hat{w}_{c'})}} ,
+\]
+!et
+
+which reduces to the logistic function in the binary case.
+The likelihood of this $C$-class classifier
+is now given as:
+
+!bt
+\[
+P(\mathcal{D} \mid \hat{\theta}) = \prod_{i=1}^n \prod_{c=0}^{C-1} [P(y_{ic} = 1)]^{y_{ic}} .
+\]
+!et
+Again we take the negative log-likelihood to define our cost function:
+
+!bt
+\[
+\mathcal{C}(\hat{\theta}) = - \log{P(\mathcal{D} \mid \hat{\theta})}.
+\]
+!et
+See the logistic regression lectures for a full definition of the cost function.
+
+The back propagation equations need now only a small change, namely the definition of a new cost function. We are thus ready to use the same equations as before!
+
+
+===== Example: binary classification problem =====
+
+As an example of the above, relevant for project 2 as well, let us consider a binary class. As discussed in our logistic regression lectures, we defined a cost function in terms of the parameters $\beta$ as
+!bt
+\[
+\mathcal{C}(\hat{\beta}) = - \sum_{i=1}^n \left(y_i\log{p(y_i \vert x_i,\hat{\beta})}+(1-y_i)\log{1-p(y_i \vert x_i,\hat{\beta})}\right),
+\]
+!et
+where we had defined the logistic (sigmoid) function
+!bt
+\[
+p(y_i =1\vert x_i,\hat{\beta})=\frac{\exp{(\beta_0+\beta_1 x_i)}}{1+\exp{(\beta_0+\beta_1 x_i)}},
+\]
+!et
+and
+!bt
+\[
+p(y_i =0\vert x_i,\hat{\beta})=1-p(y_i =1\vert x_i,\hat{\beta}).
+\]
+!et
+The parameters $\hat{\beta}$ were defined using a minimization method like gradient descent or Newton-Raphson's method.
+
+Now we replace $x_i$ with the activation $z_i^l$ for a given layer $l$ and the outputs as $y_i=a_i^l=f(z_i^l)$, with $z_i^l$ now being a function of the weights $w_{ij}^l$ and biases $b_i^l$.
+We have then
+!bt
+\[
+a_i^l = y_i = \frac{\exp{(z_i^l)}}{1+\exp{(z_i^l)}},
+\]
+!et
+with
+!bt
+\[
+z_i^l = \sum_{j}w_{ij}^l a_j^{l-1}+b_i^l,
+\]
+!et
+where the superscript $l-1$ indicates that these are the outputs from layer $l-1$.
+Our cost function at the final layer $l=L$ is now
+!bt
+\[
+\mathcal{C}(\hat{W}) = - \sum_{i=1}^n \left(t_i\log{a_i^L}+(1-t_i)\log{(1-a_i^L)}\right),
+\]
+!et
+where we have defined the targets $t_i$. The derivatives of the cost function with respect to the output $a_i^L$ are then easily calculated and we get
+!bt
+\[
+\frac{\partial \mathcal{C}(\hat{W})}{\partial a_i^L} = \frac{a_i^L-t_i}{a_i^L(1-a_i^L)}.
+\]
+!et
+In case we use another activation function than the logistic one, we need to evaluate other derivatives.
+
+
+
+===== The Softmax function =====
+In case we employ the more general case given by the Softmax equation, we need to evaluate the derivative of the activation function with respect to the activation $z_i^l$, that is we need
+!bt
+\[
+\frac{\partial f(z_i^l)}{\partial w_{jk}^l} =
+\frac{\partial f(z_i^l)}{\partial z_j^l} \frac{\partial z_j^l}{\partial w_{jk}^l}= \frac{\partial f(z_i^l)}{\partial z_j^l}a_k^{l-1}.
+\]
+!et
+For the Softmax function we have
+!bt
+\[
+f(z_i^l) = \frac{\exp{(z_i^l)}}{\sum_{m=1}^K\exp{(z_m^l)}}.
+\]
+!et
+Its derivative with respect to $z_j^l$ gives
+!bt
+\[
+\frac{\partial f(z_i^l)}{\partial z_j^l}= f(z_i^l)\left(\delta_{ij}-f(z_j^l)\right),
+\]
+!et
+which in case of the simply binary model reduces to having $i=j$.
+
+
+===== Developing a code for doing neural networks with back propagation =====
+
+
+One can identify a set of key steps when using neural networks to solve supervised learning problems:
+
+o Collect and pre-process data
+o Define model and architecture
+o Choose cost function and optimizer
+o Train the model
+o Evaluate model performance on test data
+o Adjust hyperparameters (if necessary, network architecture)
+
+
+===== Collect and pre-process data =====
+
+Here we will be using the MNIST dataset, which is readily available through the _scikit-learn_
+package. You may also find it for example "here":"http://yann.lecun.com/exdb/mnist/".
+The *MNIST* (Modified National Institute of Standards and Technology) database is a large database
+of handwritten digits that is commonly used for training various image processing systems.
+The MNIST dataset consists of 70 000 images of size $28\times 28$ pixels, each labeled from 0 to 9.
+The scikit-learn dataset we will use consists of a selection of 1797 images of size $8\times 8$ collected and processed from this database.
+
+To feed data into a feed-forward neural network we need to represent
+the inputs as a design/feature matrix $X = (n_{inputs}, n_{features})$. Each
+row represents an *input*, in this case a handwritten digit, and
+each column represents a *feature*, in this case a pixel. The
+correct answers, also known as *labels* or *targets* are
+represented as a 1D array of integers
+$Y = (n_{inputs}) = (5, 3, 1, 8,...)$.
+
+As an example, say we want to build a neural network using supervised learning to predict Body-Mass Index (BMI) from
+measurements of height (in m)
+and weight (in kg). If we have measurements of 5 people the design/feature matrix could be for example:
+
+$$ X = \begin{bmatrix}
+1.85 & 81\\
+1.71 & 65\\
+1.95 & 103\\
+1.55 & 42\\
+1.63 & 56
+\end{bmatrix} ,$$
+
+and the targets would be:
+
+$$ Y = (23.7, 22.2, 27.1, 17.5, 21.1) $$
+
+Since each input image is a 2D matrix, we need to flatten the image
+(i.e. "unravel" the 2D matrix into a 1D array) to turn the data into a
+design/feature matrix. This means we lose all spatial information in the
+image, such as locality and translational invariance. More complicated
+architectures such as Convolutional Neural Networks can take advantage
+of such information, and are most commonly applied when analyzing
+images.
+
+
+!bc pycod
+# import necessary packages
+import numpy as np
+import matplotlib.pyplot as plt
+from sklearn import datasets
+
+
+# ensure the same random numbers appear every time
+np.random.seed(0)
+
+# display images in notebook
+%matplotlib inline
+plt.rcParams['figure.figsize'] = (12,12)
+
+
+# download MNIST dataset
+digits = datasets.load_digits()
+
+# define inputs and labels
+inputs = digits.images
+labels = digits.target
+
+print("inputs = (n_inputs, pixel_width, pixel_height) = " + str(inputs.shape))
+print("labels = (n_inputs) = " + str(labels.shape))
+
+
+# flatten the image
+# the value -1 means dimension is inferred from the remaining dimensions: 8x8 = 64
+n_inputs = len(inputs)
+inputs = inputs.reshape(n_inputs, -1)
+print("X = (n_inputs, n_features) = " + str(inputs.shape))
+
+
+# choose some random images to display
+indices = np.arange(n_inputs)
+random_indices = np.random.choice(indices, size=5)
+
+for i, image in enumerate(digits.images[random_indices]):
+ plt.subplot(1, 5, i+1)
+ plt.axis('off')
+ plt.imshow(image, cmap=plt.cm.gray_r, interpolation='nearest')
+ plt.title("Label: %d" % digits.target[random_indices[i]])
+plt.show()
+!ec
+
+
+===== Train and test datasets =====
+
+Performing analysis before partitioning the dataset is a major error, that can lead to incorrect conclusions.
+
+We will reserve $80 \%$ of our dataset for training and $20 \%$ for testing.
+
+It is important that the train and test datasets are drawn randomly from our dataset, to ensure
+no bias in the sampling.
+Say you are taking measurements of weather data to predict the weather in the coming 5 days.
+You don't want to train your model on measurements taken from the hours 00.00 to 12.00, and then test it on data
+collected from 12.00 to 24.00.
+
+
+!bc pycod
+from sklearn.model_selection import train_test_split
+
+# one-liner from scikit-learn library
+train_size = 0.8
+test_size = 1 - train_size
+X_train, X_test, Y_train, Y_test = train_test_split(inputs, labels, train_size=train_size,
+ test_size=test_size)
+
+# equivalently in numpy
+def train_test_split_numpy(inputs, labels, train_size, test_size):
+ n_inputs = len(inputs)
+ inputs_shuffled = inputs.copy()
+ labels_shuffled = labels.copy()
+
+ np.random.shuffle(inputs_shuffled)
+ np.random.shuffle(labels_shuffled)
+
+ train_end = int(n_inputs*train_size)
+ X_train, X_test = inputs_shuffled[:train_end], inputs_shuffled[train_end:]
+ Y_train, Y_test = labels_shuffled[:train_end], labels_shuffled[train_end:]
+
+ return X_train, X_test, Y_train, Y_test
+
+#X_train, X_test, Y_train, Y_test = train_test_split_numpy(inputs, labels, train_size, test_size)
+
+print("Number of training images: " + str(len(X_train)))
+print("Number of test images: " + str(len(X_test)))
+!ec
+
+
+===== Define model and architecture =====
+
+Our simple feed-forward neural network will consist of an *input* layer, a single *hidden* layer and an *output* layer. The activation $y$ of each neuron is a weighted sum of inputs, passed through an activation function. In case of the simple perceptron model we have
+
+$$ z = \sum_{i=1}^n w_i a_i ,$$
+
+$$ y = f(z) ,$$
+
+where $f$ is the activation function, $a_i$ represents input from neuron $i$ in the preceding layer
+and $w_i$ is the weight to input $i$.
+The activation of the neurons in the input layer is just the features (e.g. a pixel value).
+
+The simplest activation function for a neuron is the *Heaviside* function:
+
+$$ f(z) =
+\begin{cases}
+1, & z > 0\\
+0, & \text{otherwise}
+\end{cases}
+$$
+
+A feed-forward neural network with this activation is known as a *perceptron*.
+For a binary classifier (i.e. two classes, 0 or 1, dog or not-dog) we can also use this in our output layer.
+This activation can be generalized to $k$ classes (using e.g. the *one-against-all* strategy),
+and we call these architectures *multiclass perceptrons*.
+
+However, it is now common to use the terms Single Layer Perceptron (SLP) (1 hidden layer) and
+Multilayer Perceptron (MLP) (2 or more hidden layers) to refer to feed-forward neural networks with any activation function.
+
+Typical choices for activation functions include the sigmoid function, hyperbolic tangent, and Rectified Linear Unit (ReLU).
+We will be using the sigmoid function $\sigma(x)$:
+
+$$ f(x) = \sigma(x) = \frac{1}{1 + e^{-x}} ,$$
+
+which is inspired by probability theory (see logistic regression) and was most commonly used until about 2011. See the discussion below concerning other activation functions.
+
+
+===== Layers =====
+
+* Input
+Since each input image has 8x8 = 64 pixels or features, we have an input layer of 64 neurons.
+
+* Hidden layer
+We will use 50 neurons in the hidden layer receiving input from the neurons in the input layer.
+Since each neuron in the hidden layer is connected to the 64 inputs we have 64x50 = 3200 weights to the hidden layer.
+
+* Output
+If we were building a binary classifier, it would be sufficient with a single neuron in the output layer,
+which could output 0 or 1 according to the Heaviside function. This would be an example of a *hard* classifier, meaning it outputs the class of the input directly. However, if we are dealing with noisy data it is often beneficial to use a *soft* classifier, which outputs the probability of being in class 0 or 1.
+
+For a soft binary classifier, we could use a single neuron and interpret the output as either being the probability of being in class 0 or the probability of being in class 1. Alternatively we could use 2 neurons, and interpret each neuron as the probability of being in each class.
+
+Since we are doing multiclass classification, with 10 categories, it is natural to use 10 neurons in the output layer. We number the neurons $j = 0,1,...,9$. The activation of each output neuron $j$ will be according to the *softmax* function:
+
+$$ P(\text{class $j$} \mid \text{input $\hat{a}$}) = \frac{\exp{(\hat{a}^T \hat{w}_j)}}
+{\sum_{c=0}^{9} \exp{(\hat{a}^T \hat{w}_c)}} ,$$
+
+i.e. each neuron $j$ outputs the probability of being in class $j$ given an input from the hidden layer $\hat{a}$, with $\hat{w}_j$ the weights of neuron $j$ to the inputs.
+The denominator is a normalization factor to ensure the outputs (probabilities) sum up to 1.
+The exponent is just the weighted sum of inputs as before:
+
+$$ z_j = \sum_{i=1}^n w_ {ij} a_i+b_j.$$
+
+Since each neuron in the output layer is connected to the 50 inputs from the hidden layer we have 50x10 = 500
+weights to the output layer.
+
+
+===== Weights and biases =====
+
+Typically weights are initialized with small values distributed around zero, drawn from a uniform
+or normal distribution. Setting all weights to zero means all neurons give the same output, making the network useless.
+
+Adding a bias value to the weighted sum of inputs allows the neural network to represent a greater range
+of values. Without it, any input with the value 0 will be mapped to zero (before being passed through the activation). The bias unit has an output of 1, and a weight to each neuron $j$, $b_j$:
+
+$$ z_j = \sum_{i=1}^n w_ {ij} a_i + b_j.$$
+
+The bias weights $\hat{b}$ are often initialized to zero, but a small value like $0.01$ ensures all neurons have some output which can be backpropagated in the first training cycle.
+!bc pycod
+# building our neural network
+
+n_inputs, n_features = X_train.shape
+n_hidden_neurons = 50
+n_categories = 10
+
+# we make the weights normally distributed using numpy.random.randn
+
+# weights and bias in the hidden layer
+hidden_weights = np.random.randn(n_features, n_hidden_neurons)
+hidden_bias = np.zeros(n_hidden_neurons) + 0.01
+
+# weights and bias in the output layer
+output_weights = np.random.randn(n_hidden_neurons, n_categories)
+output_bias = np.zeros(n_categories) + 0.01
+!ec
+
+
+===== Feed-forward pass =====
+
+Denote $F$ the number of features, $H$ the number of hidden neurons and $C$ the number of categories.
+For each input image we calculate a weighted sum of input features (pixel values) to each neuron $j$ in the hidden layer $l$:
+
+$$ z_{j}^{l} = \sum_{i=1}^{F} w_{ij}^{l} x_i + b_{j}^{l},$$
+
+this is then passed through our activation function
+
+$$ a_{j}^{l} = f(z_{j}^{l}) .$$
+
+We calculate a weighted sum of inputs (activations in the hidden layer) to each neuron $j$ in the output layer:
+
+$$ z_{j}^{L} = \sum_{i=1}^{H} w_{ij}^{L} a_{i}^{l} + b_{j}^{L}.$$
+
+Finally we calculate the output of neuron $j$ in the output layer using the softmax function:
+
+$$ a_{j}^{L} = \frac{\exp{(z_j^{L})}}
+{\sum_{c=0}^{C-1} \exp{(z_c^{L})}} .$$
+
+
+===== Matrix multiplications =====
+
+Since our data has the dimensions $X = (n_{inputs}, n_{features})$ and our weights to the hidden
+layer have the dimensions
+$W_{hidden} = (n_{features}, n_{hidden})$,
+we can easily feed the network all our training data in one go by taking the matrix product
+
+$$ X W^{h} = (n_{inputs}, n_{hidden}),$$
+
+and obtain a matrix that holds the weighted sum of inputs to the hidden layer
+for each input image and each hidden neuron.
+We also add the bias to obtain a matrix of weighted sums to the hidden layer $Z^{h}$:
+
+$$ \hat{z}^{l} = \hat{X} \hat{W}^{l} + \hat{b}^{l} ,$$
+
+meaning the same bias (1D array with size equal number of hidden neurons) is added to each input image.
+This is then passed through the activation:
+
+$$ \hat{a}^{l} = f(\hat{z}^l) .$$
+
+This is fed to the output layer:
+
+$$ \hat{z}^{L} = \hat{a}^{L} \hat{W}^{L} + \hat{b}^{L} .$$
+
+Finally we receive our output values for each image and each category by passing it through the softmax function:
+
+$$ output = softmax (\hat{z}^{L}) = (n_{inputs}, n_{categories}) .$$
+
+
+!bc pycod
+# setup the feed-forward pass, subscript h = hidden layer
+
+def sigmoid(x):
+ return 1/(1 + np.exp(-x))
+
+def feed_forward(X):
+ # weighted sum of inputs to the hidden layer
+ z_h = np.matmul(X, hidden_weights) + hidden_bias
+ # activation in the hidden layer
+ a_h = sigmoid(z_h)
+
+ # weighted sum of inputs to the output layer
+ z_o = np.matmul(a_h, output_weights) + output_bias
+ # softmax output
+ # axis 0 holds each input and axis 1 the probabilities of each category
+ exp_term = np.exp(z_o)
+ probabilities = exp_term / np.sum(exp_term, axis=1, keepdims=True)
+
+ return probabilities
+
+probabilities = feed_forward(X_train)
+print("probabilities = (n_inputs, n_categories) = " + str(probabilities.shape))
+print("probability that image 0 is in category 0,1,2,...,9 = \n" + str(probabilities[0]))
+print("probabilities sum up to: " + str(probabilities[0].sum()))
+print()
+
+# we obtain a prediction by taking the class with the highest likelihood
+def predict(X):
+ probabilities = feed_forward(X)
+ return np.argmax(probabilities, axis=1)
+
+predictions = predict(X_train)
+print("predictions = (n_inputs) = " + str(predictions.shape))
+print("prediction for image 0: " + str(predictions[0]))
+print("correct label for image 0: " + str(Y_train[0]))
+!ec
+
+
+===== Choose cost function and optimizer =====
+
+To measure how well our neural network is doing we need to introduce a cost function.
+We will call the function that gives the error of a single sample output the *loss* function, and the function
+that gives the total error of our network across all samples the *cost* function.
+A typical choice for multiclass classification is the *cross-entropy* loss, also known as the negative log likelihood.
+
+In *multiclass* classification it is common to treat each integer label as a so called *one-hot* vector:
+
+$$ y = 5 \quad \rightarrow \quad \hat{y} = (0, 0, 0, 0, 0, 1, 0, 0, 0, 0) ,$$
+
+
+$$ y = 1 \quad \rightarrow \quad \hat{y} = (0, 1, 0, 0, 0, 0, 0, 0, 0, 0) ,$$
+
+
+i.e. a binary bit string of length $C$, where $C = 10$ is the number of classes in the MNIST dataset.
+
+Let $y_{ic}$ denote the $c$-th component of the $i$-th one-hot vector.
+We define the cost function $\mathcal{C}$ as a sum over the cross-entropy loss for each point $\hat{x}_i$ in the dataset.
+
+In the one-hot representation only one of the terms in the loss function is non-zero, namely the
+probability of the correct category $c'$
+(i.e. the category $c'$ such that $y_{ic'} = 1$). This means that the cross entropy loss only punishes you for how wrong
+you got the correct label. The probability of category $c$ is given by the softmax function. The vector $\hat{\theta}$ represents the parameters of our network, i.e. all the weights and biases.
+
+
+
+===== Optimizing the cost function =====
+
+The network is trained by finding the weights and biases that minimize the cost function. One of the most widely used classes of methods is *gradient descent* and its generalizations. The idea behind gradient descent
+is simply to adjust the weights in the direction where the gradient of the cost function is large and negative. This ensures we flow toward a *local* minimum of the cost function.
+Each parameter $\theta$ is iteratively adjusted according to the rule
+
+$$ \theta_{i+1} = \theta_i - \eta \nabla \mathcal{C}(\theta_i) ,$$
+
+where $\eta$ is known as the *learning rate*, which controls how big a step we take towards the minimum.
+This update can be repeated for any number of iterations, or until we are satisfied with the result.
+
+A simple and effective improvement is a variant called *Batch Gradient Descent*.
+Instead of calculating the gradient on the whole dataset, we calculate an approximation of the gradient
+on a subset of the data called a *minibatch*.
+If there are $N$ data points and we have a minibatch size of $M$, the total number of batches
+is $N/M$.
+We denote each minibatch $B_k$, with $k = 1, 2,...,N/M$. The gradient then becomes:
+
+$$ \nabla \mathcal{C}(\theta) = \frac{1}{N} \sum_{i=1}^N \nabla \mathcal{L}_i(\theta) \quad \rightarrow \quad
+\frac{1}{M} \sum_{i \in B_k} \nabla \mathcal{L}_i(\theta) ,$$
+
+i.e. instead of averaging the loss over the entire dataset, we average over a minibatch.
+
+This has two important benefits:
+o Introducing stochasticity decreases the chance that the algorithm becomes stuck in a local minima.
+o It significantly speeds up the calculation, since we do not have to use the entire dataset to calculate the gradient.
+
+The various optmization methods, with codes and algorithms, are discussed in our lectures on "Gradient descent approaches":"https://compphysics.github.io/MachineLearning/doc/pub/Splines/html/Splines-bs.html".
+
+
+===== Regularization =====
+
+It is common to add an extra term to the cost function, proportional
+to the size of the weights. This is equivalent to constraining the
+size of the weights, so that they do not grow out of control.
+Constraining the size of the weights means that the weights cannot
+grow arbitrarily large to fit the training data, and in this way
+reduces *overfitting*.
+
+We will measure the size of the weights using the so called *L2-norm*, meaning our cost function becomes:
+
+$$ \mathcal{C}(\theta) = \frac{1}{N} \sum_{i=1}^N \mathcal{L}_i(\theta) \quad \rightarrow \quad
+\frac{1}{N} \sum_{i=1}^N \mathcal{L}_i(\theta) + \lambda \lvert \lvert \hat{w} \rvert \rvert_2^2
+= \frac{1}{N} \sum_{i=1}^N \mathcal{L}(\theta) + \lambda \sum_{ij} w_{ij}^2,$$
+
+i.e. we sum up all the weights squared. The factor $\lambda$ is known as a regularization parameter.
+
+
+In order to train the model, we need to calculate the derivative of
+the cost function with respect to every bias and weight in the
+network. In total our network has $(64 + 1)\times 50=3250$ weights in
+the hidden layer and $(50 + 1)\times 10=510$ weights to the output
+layer ($+1$ for the bias), and the gradient must be calculated for
+every parameter. We use the *backpropagation* algorithm discussed
+above. This is a clever use of the chain rule that allows us to
+calculate the gradient efficently.
+
+
+
+===== Matrix multiplication =====
+
+To more efficently train our network these equations are implemented using matrix operations.
+The error in the output layer is calculated simply as, with $\hat{t}$ being our targets,
+
+$$ \delta_L = \hat{t} - \hat{y} = (n_{inputs}, n_{categories}) .$$
+
+The gradient for the output weights is calculated as
+
+$$ \nabla W_{L} = \hat{a}^T \delta_L = (n_{hidden}, n_{categories}) ,$$
+
+where $\hat{a} = (n_{inputs}, n_{hidden})$. This simply means that we are summing up the gradients for each input.
+Since we are going backwards we have to transpose the activation matrix.
+
+The gradient with respect to the output bias is then
+
+$$ \nabla \hat{b}_{L} = \sum_{i=1}^{n_{inputs}} \delta_L = (n_{categories}) .$$
+
+The error in the hidden layer is
+
+$$ \Delta_h = \delta_L W_{L}^T \circ f'(z_{h}) = \delta_L W_{L}^T \circ a_{h} \circ (1 - a_{h}) = (n_{inputs}, n_{hidden}) ,$$
+
+where $f'(a_{h})$ is the derivative of the activation in the hidden layer. The matrix products mean
+that we are summing up the products for each neuron in the output layer. The symbol $\circ$ denotes
+the *Hadamard product*, meaning element-wise multiplication.
+
+This again gives us the gradients in the hidden layer:
+
+$$ \nabla W_{h} = X^T \delta_h = (n_{features}, n_{hidden}) ,$$
+
+$$ \nabla b_{h} = \sum_{i=1}^{n_{inputs}} \delta_h = (n_{hidden}) .$$
+
+
+!bc pycod
+# to categorical turns our integer vector into a onehot representation
+from sklearn.metrics import accuracy_score
+
+# one-hot in numpy
+def to_categorical_numpy(integer_vector):
+ n_inputs = len(integer_vector)
+ n_categories = np.max(integer_vector) + 1
+ onehot_vector = np.zeros((n_inputs, n_categories))
+ onehot_vector[range(n_inputs), integer_vector] = 1
+
+ return onehot_vector
+
+#Y_train_onehot, Y_test_onehot = to_categorical(Y_train), to_categorical(Y_test)
+Y_train_onehot, Y_test_onehot = to_categorical_numpy(Y_train), to_categorical_numpy(Y_test)
+
+def feed_forward_train(X):
+ # weighted sum of inputs to the hidden layer
+ z_h = np.matmul(X, hidden_weights) + hidden_bias
+ # activation in the hidden layer
+ a_h = sigmoid(z_h)
+
+ # weighted sum of inputs to the output layer
+ z_o = np.matmul(a_h, output_weights) + output_bias
+ # softmax output
+ # axis 0 holds each input and axis 1 the probabilities of each category
+ exp_term = np.exp(z_o)
+ probabilities = exp_term / np.sum(exp_term, axis=1, keepdims=True)
+
+ # for backpropagation need activations in hidden and output layers
+ return a_h, probabilities
+
+def backpropagation(X, Y):
+ a_h, probabilities = feed_forward_train(X)
+
+ # error in the output layer
+ error_output = probabilities - Y
+ # error in the hidden layer
+ error_hidden = np.matmul(error_output, output_weights.T) * a_h * (1 - a_h)
+
+ # gradients for the output layer
+ output_weights_gradient = np.matmul(a_h.T, error_output)
+ output_bias_gradient = np.sum(error_output, axis=0)
+
+ # gradient for the hidden layer
+ hidden_weights_gradient = np.matmul(X.T, error_hidden)
+ hidden_bias_gradient = np.sum(error_hidden, axis=0)
+
+ return output_weights_gradient, output_bias_gradient, hidden_weights_gradient, hidden_bias_gradient
+
+print("Old accuracy on training data: " + str(accuracy_score(predict(X_train), Y_train)))
+
+eta = 0.01
+lmbd = 0.01
+for i in range(1000):
+ # calculate gradients
+ dWo, dBo, dWh, dBh = backpropagation(X_train, Y_train_onehot)
+
+ # regularization term gradients
+ dWo += lmbd * output_weights
+ dWh += lmbd * hidden_weights
+
+ # update weights and biases
+ output_weights -= eta * dWo
+ output_bias -= eta * dBo
+ hidden_weights -= eta * dWh
+ hidden_bias -= eta * dBh
+
+print("New accuracy on training data: " + str(accuracy_score(predict(X_train), Y_train)))
+!ec
+
+
+===== Improving performance =====
+
+As we can see the network does not seem to be learning at all. It seems to be just guessing the label for each image.
+In order to obtain a network that does something useful, we will have to do a bit more work.
+
+The choice of *hyperparameters* such as learning rate and regularization parameter is hugely influential for the performance of the network. Typically a *grid-search* is performed, wherein we test different hyperparameters separated by orders of magnitude. For example we could test the learning rates $\eta = 10^{-6}, 10^{-5},...,10^{-1}$ with different regularization parameters $\lambda = 10^{-6},...,10^{-0}$.
+
+Next, we haven't implemented minibatching yet, which introduces stochasticity and is though to act as an important regularizer on the weights. We call a feed-forward + backward pass with a minibatch an *iteration*, and a full training period
+going through the entire dataset ($n/M$ batches) an *epoch*.
+
+If this does not improve network performance, you may want to consider altering the network architecture, adding more neurons or hidden layers.
+Andrew Ng goes through some of these considerations in this "video":"https://youtu.be/F1ka6a13S9I". You can find a summary of the video "here":"https://kevinzakka.github.io/2016/09/26/applying-deep-learning/".
+
+
+===== Full object-oriented implementation =====
+
+It is very natural to think of the network as an object, with specific instances of the network
+being realizations of this object with different hyperparameters. An implementation using Python classes provides a clean structure and interface, and the full implementation of our neural network is given below.
+
+
+!bc pycod
+class NeuralNetwork:
+ def __init__(
+ self,
+ X_data,
+ Y_data,
+ n_hidden_neurons=50,
+ n_categories=10,
+ epochs=10,
+ batch_size=100,
+ eta=0.1,
+ lmbd=0.0):
+
+ self.X_data_full = X_data
+ self.Y_data_full = Y_data
+
+ self.n_inputs = X_data.shape[0]
+ self.n_features = X_data.shape[1]
+ self.n_hidden_neurons = n_hidden_neurons
+ self.n_categories = n_categories
+
+ self.epochs = epochs
+ self.batch_size = batch_size
+ self.iterations = self.n_inputs // self.batch_size
+ self.eta = eta
+ self.lmbd = lmbd
+
+ self.create_biases_and_weights()
+
+ def create_biases_and_weights(self):
+ self.hidden_weights = np.random.randn(self.n_features, self.n_hidden_neurons)
+ self.hidden_bias = np.zeros(self.n_hidden_neurons) + 0.01
+
+ self.output_weights = np.random.randn(self.n_hidden_neurons, self.n_categories)
+ self.output_bias = np.zeros(self.n_categories) + 0.01
+
+ def feed_forward(self):
+ # feed-forward for training
+ self.z_h = np.matmul(self.X_data, self.hidden_weights) + self.hidden_bias
+ self.a_h = sigmoid(self.z_h)
+
+ self.z_o = np.matmul(self.a_h, self.output_weights) + self.output_bias
+
+ exp_term = np.exp(self.z_o)
+ self.probabilities = exp_term / np.sum(exp_term, axis=1, keepdims=True)
+
+ def feed_forward_out(self, X):
+ # feed-forward for output
+ z_h = np.matmul(X, self.hidden_weights) + self.hidden_bias
+ a_h = sigmoid(z_h)
+
+ z_o = np.matmul(a_h, self.output_weights) + self.output_bias
+
+ exp_term = np.exp(z_o)
+ probabilities = exp_term / np.sum(exp_term, axis=1, keepdims=True)
+ return probabilities
+
+ def backpropagation(self):
+ error_output = self.probabilities - self.Y_data
+ error_hidden = np.matmul(error_output, self.output_weights.T) * self.a_h * (1 - self.a_h)
+
+ self.output_weights_gradient = np.matmul(self.a_h.T, error_output)
+ self.output_bias_gradient = np.sum(error_output, axis=0)
+
+ self.hidden_weights_gradient = np.matmul(self.X_data.T, error_hidden)
+ self.hidden_bias_gradient = np.sum(error_hidden, axis=0)
+
+ if self.lmbd > 0.0:
+ self.output_weights_gradient += self.lmbd * self.output_weights
+ self.hidden_weights_gradient += self.lmbd * self.hidden_weights
+
+ self.output_weights -= self.eta * self.output_weights_gradient
+ self.output_bias -= self.eta * self.output_bias_gradient
+ self.hidden_weights -= self.eta * self.hidden_weights_gradient
+ self.hidden_bias -= self.eta * self.hidden_bias_gradient
+
+ def predict(self, X):
+ probabilities = self.feed_forward_out(X)
+ return np.argmax(probabilities, axis=1)
+
+ def predict_probabilities(self, X):
+ probabilities = self.feed_forward_out(X)
+ return probabilities
+
+ def train(self):
+ data_indices = np.arange(self.n_inputs)
+
+ for i in range(self.epochs):
+ for j in range(self.iterations):
+ # pick datapoints with replacement
+ chosen_datapoints = np.random.choice(
+ data_indices, size=self.batch_size, replace=False
+ )
+
+ # minibatch training data
+ self.X_data = self.X_data_full[chosen_datapoints]
+ self.Y_data = self.Y_data_full[chosen_datapoints]
+
+ self.feed_forward()
+ self.backpropagation()
+!ec
+
+
+===== Evaluate model performance on test data =====
+
+To measure the performance of our network we evaluate how well it does it data it has never seen before, i.e. the test data.
+We measure the performance of the network using the *accuracy* score.
+The accuracy is as you would expect just the number of images correctly labeled divided by the total number of images. A perfect classifier will have an accuracy score of $1$.
+
+$$ \text{Accuracy} = \frac{\sum_{i=1}^n I(\hat{y}_i = y_i)}{n} ,$$
+
+where $I$ is the indicator function, $1$ if $\hat{y}_i = y_i$ and $0$ otherwise.
+
+
+!bc pycod
+epochs = 100
+batch_size = 100
+
+dnn = NeuralNetwork(X_train, Y_train_onehot, eta=eta, lmbd=lmbd, epochs=epochs, batch_size=batch_size,
+ n_hidden_neurons=n_hidden_neurons, n_categories=n_categories)
+dnn.train()
+test_predict = dnn.predict(X_test)
+
+# accuracy score from scikit library
+print("Accuracy score on test set: ", accuracy_score(Y_test, test_predict))
+
+# equivalent in numpy
+def accuracy_score_numpy(Y_test, Y_pred):
+ return np.sum(Y_test == Y_pred) / len(Y_test)
+
+#print("Accuracy score on test set: ", accuracy_score_numpy(Y_test, test_predict))
+!ec
+
+
+===== Adjust hyperparameters =====
+
+We now perform a grid search to find the optimal hyperparameters for the network.
+Note that we are only using 1 layer with 50 neurons, and human performance is estimated to be around $98\%$ ($2\%$ error rate).
+
+!bc pycod
+eta_vals = np.logspace(-5, 1, 7)
+lmbd_vals = np.logspace(-5, 1, 7)
+# store the models for later use
+DNN_numpy = np.zeros((len(eta_vals), len(lmbd_vals)), dtype=object)
+
+# grid search
+for i, eta in enumerate(eta_vals):
+ for j, lmbd in enumerate(lmbd_vals):
+ dnn = NeuralNetwork(X_train, Y_train_onehot, eta=eta, lmbd=lmbd, epochs=epochs, batch_size=batch_size,
+ n_hidden_neurons=n_hidden_neurons, n_categories=n_categories)
+ dnn.train()
+
+ DNN_numpy[i][j] = dnn
+
+ test_predict = dnn.predict(X_test)
+
+ print("Learning rate = ", eta)
+ print("Lambda = ", lmbd)
+ print("Accuracy score on test set: ", accuracy_score(Y_test, test_predict))
+ print()
+!ec
+
+
+===== Visualization =====
+
+!bc pycod
+# visual representation of grid search
+# uses seaborn heatmap, you can also do this with matplotlib imshow
+import seaborn as sns
+
+sns.set()
+
+train_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+test_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+
+for i in range(len(eta_vals)):
+ for j in range(len(lmbd_vals)):
+ dnn = DNN_numpy[i][j]
+
+ train_pred = dnn.predict(X_train)
+ test_pred = dnn.predict(X_test)
+
+ train_accuracy[i][j] = accuracy_score(Y_train, train_pred)
+ test_accuracy[i][j] = accuracy_score(Y_test, test_pred)
+
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(train_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Training Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(test_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Test Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+!ec
+
+
+===== scikit-learn implementation =====
+
+_scikit-learn_ focuses more
+on traditional machine learning methods, such as regression,
+clustering, decision trees, etc. As such, it has only two types of
+neural networks: Multi Layer Perceptron outputting continuous values,
+*MPLRegressor*, and Multi Layer Perceptron outputting labels,
+*MLPClassifier*. We will see how simple it is to use these classes.
+
+_scikit-learn_ implements a few improvements from our neural network,
+such as early stopping, a varying learning rate, different
+optimization methods, etc. We would therefore expect a better
+performance overall.
+
+!bc pycod
+from sklearn.neural_network import MLPClassifier
+# store models for later use
+DNN_scikit = np.zeros((len(eta_vals), len(lmbd_vals)), dtype=object)
+
+for i, eta in enumerate(eta_vals):
+ for j, lmbd in enumerate(lmbd_vals):
+ dnn = MLPClassifier(hidden_layer_sizes=(n_hidden_neurons), activation='logistic',
+ alpha=lmbd, learning_rate_init=eta, max_iter=epochs)
+ dnn.fit(X_train, Y_train)
+
+ DNN_scikit[i][j] = dnn
+
+ print("Learning rate = ", eta)
+ print("Lambda = ", lmbd)
+ print("Accuracy score on test set: ", dnn.score(X_test, Y_test))
+ print()
+!ec
+
+
+
+===== Visualization =====
+!bc pycod
+# optional
+# visual representation of grid search
+# uses seaborn heatmap, could probably do this in matplotlib
+import seaborn as sns
+
+sns.set()
+
+train_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+test_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+
+for i in range(len(eta_vals)):
+ for j in range(len(lmbd_vals)):
+ dnn = DNN_scikit[i][j]
+
+ train_pred = dnn.predict(X_train)
+ test_pred = dnn.predict(X_test)
+
+ train_accuracy[i][j] = accuracy_score(Y_train, train_pred)
+ test_accuracy[i][j] = accuracy_score(Y_test, test_pred)
+
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(train_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Training Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(test_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Test Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+!ec
+
+
+
+===== Building neural networks in Tensorflow and Keras =====
+
+Now we want to build on the experience gained from our neural network implementation in NumPy and scikit-learn
+and use it to construct a neural network in Tensorflow. Once we have constructed a neural network in NumPy
+and Tensorflow, building one in Keras is really quite trivial, though the performance may suffer.
+
+In our previous example we used only one hidden layer, and in this we will use two. From this it should be quite
+clear how to build one using an arbitrary number of hidden layers, using data structures such as Python lists or
+NumPy arrays.
+
+
+===== Tensorflow =====
+
+Tensorflow is an open source library machine learning library
+developed by the Google Brain team for internal use. It was released
+under the Apache 2.0 open source license in November 9, 2015.
+
+Tensorflow is a computational framework that allows you to construct
+machine learning models at different levels of abstraction, from
+high-level, object-oriented APIs like Keras, down to the C++ kernels
+that Tensorflow is built upon. The higher levels of abstraction are
+simpler to use, but less flexible, and our choice of implementation
+should reflect the problems we are trying to solve.
+
+"Tensorflow uses":"https://www.tensorflow.org/guide/graphs" so-called graphs to represent your computation
+in terms of the dependencies between individual operations, such that you first build a Tensorflow *graph*
+to represent your model, and then create a Tensorflow *session* to run the graph.
+
+In this guide we will analyze the same data as we did in our NumPy and
+scikit-learn tutorial, gathered from the MNIST database of images. We
+will give an introduction to the lower level Python Application
+Program Interfaces (APIs), and see how we use them to build our graph.
+Then we will build (effectively) the same graph in Keras, to see just
+how simple solving a machine learning problem can be.
+
+To install tensorflow on Unix/Linux systems, use pip as
+!bc pycod
+pip3 install tensorflow
+!ec
+and/or if you use _anaconda_, just write (or install from the graphical user interface)
+!bc pycod
+conda install tensorflow
+!ec
+
+
+===== Collect and pre-process data =====
+
+!bc pycod
+# import necessary packages
+import numpy as np
+import matplotlib.pyplot as plt
+from sklearn import datasets
+
+
+# ensure the same random numbers appear every time
+np.random.seed(0)
+
+# display images in notebook
+%matplotlib inline
+plt.rcParams['figure.figsize'] = (12,12)
+
+
+# download MNIST dataset
+digits = datasets.load_digits()
+
+# define inputs and labels
+inputs = digits.images
+labels = digits.target
+
+print("inputs = (n_inputs, pixel_width, pixel_height) = " + str(inputs.shape))
+print("labels = (n_inputs) = " + str(labels.shape))
+
+
+# flatten the image
+# the value -1 means dimension is inferred from the remaining dimensions: 8x8 = 64
+n_inputs = len(inputs)
+inputs = inputs.reshape(n_inputs, -1)
+print("X = (n_inputs, n_features) = " + str(inputs.shape))
+
+
+# choose some random images to display
+indices = np.arange(n_inputs)
+random_indices = np.random.choice(indices, size=5)
+
+for i, image in enumerate(digits.images[random_indices]):
+ plt.subplot(1, 5, i+1)
+ plt.axis('off')
+ plt.imshow(image, cmap=plt.cm.gray_r, interpolation='nearest')
+ plt.title("Label: %d" % digits.target[random_indices[i]])
+plt.show()
+!ec
+
+!bc pycod
+from keras.utils import to_categorical
+from sklearn.model_selection import train_test_split
+
+# one-hot representation of labels
+labels = to_categorical(labels)
+
+# split into train and test data
+train_size = 0.8
+test_size = 1 - train_size
+X_train, X_test, Y_train, Y_test = train_test_split(inputs, labels, train_size=train_size,
+ test_size=test_size)
+!ec
+
+
+===== Using TensorFlow backend =====
+
+o Define model and architecture
+o Choose cost function and optimizer
+
+!bc pycod
+import tensorflow as tf
+
+class NeuralNetworkTensorflow:
+ def __init__(
+ self,
+ X_train,
+ Y_train,
+ X_test,
+ Y_test,
+ n_neurons_layer1=100,
+ n_neurons_layer2=50,
+ n_categories=2,
+ epochs=10,
+ batch_size=100,
+ eta=0.1,
+ lmbd=0.0):
+
+ # keep track of number of steps
+ self.global_step = tf.Variable(0, dtype=tf.int32, trainable=False, name='global_step')
+
+ self.X_train = X_train
+ self.Y_train = Y_train
+ self.X_test = X_test
+ self.Y_test = Y_test
+
+ self.n_inputs = X_train.shape[0]
+ self.n_features = X_train.shape[1]
+ self.n_neurons_layer1 = n_neurons_layer1
+ self.n_neurons_layer2 = n_neurons_layer2
+ self.n_categories = n_categories
+
+ self.epochs = epochs
+ self.batch_size = batch_size
+ self.iterations = self.n_inputs // self.batch_size
+ self.eta = eta
+ self.lmbd = lmbd
+
+ # build network piece by piece
+ # name scopes (with) are used to enforce creation of new variables
+ # https://www.tensorflow.org/guide/variables
+ self.create_placeholders()
+ self.create_DNN()
+ self.create_loss()
+ self.create_optimiser()
+ self.create_accuracy()
+
+ def create_placeholders(self):
+ # placeholders are fine here, but "Datasets" are the preferred method
+ # of streaming data into a model
+ with tf.name_scope('data'):
+ self.X = tf.placeholder(tf.float32, shape=(None, self.n_features), name='X_data')
+ self.Y = tf.placeholder(tf.float32, shape=(None, self.n_categories), name='Y_data')
+
+ def create_DNN(self):
+ with tf.name_scope('DNN'):
+ # the weights are stored to calculate regularization loss later
+
+ # Fully connected layer 1
+ self.W_fc1 = self.weight_variable([self.n_features, self.n_neurons_layer1], name='fc1', dtype=tf.float32)
+ b_fc1 = self.bias_variable([self.n_neurons_layer1], name='fc1', dtype=tf.float32)
+ a_fc1 = tf.nn.sigmoid(tf.matmul(self.X, self.W_fc1) + b_fc1)
+
+ # Fully connected layer 2
+ self.W_fc2 = self.weight_variable([self.n_neurons_layer1, self.n_neurons_layer2], name='fc2', dtype=tf.float32)
+ b_fc2 = self.bias_variable([self.n_neurons_layer2], name='fc2', dtype=tf.float32)
+ a_fc2 = tf.nn.sigmoid(tf.matmul(a_fc1, self.W_fc2) + b_fc2)
+
+ # Output layer
+ self.W_out = self.weight_variable([self.n_neurons_layer2, self.n_categories], name='out', dtype=tf.float32)
+ b_out = self.bias_variable([self.n_categories], name='out', dtype=tf.float32)
+ self.z_out = tf.matmul(a_fc2, self.W_out) + b_out
+
+ def create_loss(self):
+ with tf.name_scope('loss'):
+ softmax_loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits_v2(labels=self.Y, logits=self.z_out))
+
+ regularizer_loss_fc1 = tf.nn.l2_loss(self.W_fc1)
+ regularizer_loss_fc2 = tf.nn.l2_loss(self.W_fc2)
+ regularizer_loss_out = tf.nn.l2_loss(self.W_out)
+ regularizer_loss = self.lmbd*(regularizer_loss_fc1 + regularizer_loss_fc2 + regularizer_loss_out)
+
+ self.loss = softmax_loss + regularizer_loss
+
+ def create_accuracy(self):
+ with tf.name_scope('accuracy'):
+ probabilities = tf.nn.softmax(self.z_out)
+ predictions = tf.argmax(probabilities, axis=1)
+ labels = tf.argmax(self.Y, axis=1)
+
+ correct_predictions = tf.equal(predictions, labels)
+ correct_predictions = tf.cast(correct_predictions, tf.float32)
+ self.accuracy = tf.reduce_mean(correct_predictions)
+
+ def create_optimiser(self):
+ with tf.name_scope('optimizer'):
+ self.optimizer = tf.train.GradientDescentOptimizer(learning_rate=self.eta).minimize(self.loss, global_step=self.global_step)
+
+ def weight_variable(self, shape, name='', dtype=tf.float32):
+ initial = tf.truncated_normal(shape, stddev=0.1)
+ return tf.Variable(initial, name=name, dtype=dtype)
+
+ def bias_variable(self, shape, name='', dtype=tf.float32):
+ initial = tf.constant(0.1, shape=shape)
+ return tf.Variable(initial, name=name, dtype=dtype)
+
+ def fit(self):
+ data_indices = np.arange(self.n_inputs)
+
+ with tf.Session() as sess:
+ sess.run(tf.global_variables_initializer())
+ for i in range(self.epochs):
+ for j in range(self.iterations):
+ chosen_datapoints = np.random.choice(data_indices, size=self.batch_size, replace=False)
+ batch_X, batch_Y = self.X_train[chosen_datapoints], self.Y_train[chosen_datapoints]
+
+ sess.run([DNN.loss, DNN.optimizer],
+ feed_dict={DNN.X: batch_X,
+ DNN.Y: batch_Y})
+ accuracy = sess.run(DNN.accuracy,
+ feed_dict={DNN.X: batch_X,
+ DNN.Y: batch_Y})
+ step = sess.run(DNN.global_step)
+
+ self.train_loss, self.train_accuracy = sess.run([DNN.loss, DNN.accuracy],
+ feed_dict={DNN.X: self.X_train,
+ DNN.Y: self.Y_train})
+
+ self.test_loss, self.test_accuracy = sess.run([DNN.loss, DNN.accuracy],
+ feed_dict={DNN.X: self.X_test,
+ DNN.Y: self.Y_test})
+!ec
+
+
+
+===== Optimizing and using gradient descent =====
+
+!bc pycod
+epochs = 100
+batch_size = 100
+n_neurons_layer1 = 100
+n_neurons_layer2 = 50
+n_categories = 10
+eta_vals = np.logspace(-5, 1, 7)
+lmbd_vals = np.logspace(-5, 1, 7)
+!ec
+
+
+!bc pycod
+DNN_tf = np.zeros((len(eta_vals), len(lmbd_vals)), dtype=object)
+
+for i, eta in enumerate(eta_vals):
+ for j, lmbd in enumerate(lmbd_vals):
+ DNN = NeuralNetworkTensorflow(X_train, Y_train, X_test, Y_test,
+ n_neurons_layer1, n_neurons_layer2, n_categories,
+ epochs=epochs, batch_size=batch_size, eta=eta, lmbd=lmbd)
+ DNN.fit()
+
+ DNN_tf[i][j] = DNN
+
+ print("Learning rate = ", eta)
+ print("Lambda = ", lmbd)
+ print("Test accuracy: %.3f" % DNN.test_accuracy)
+ print()
+!ec
+
+!bc pycod
+# optional
+# visual representation of grid search
+# uses seaborn heatmap, could probably do this in matplotlib
+import seaborn as sns
+
+sns.set()
+
+train_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+test_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+
+for i in range(len(eta_vals)):
+ for j in range(len(lmbd_vals)):
+ DNN = DNN_tf[i][j]
+
+ train_accuracy[i][j] = DNN.train_accuracy
+ test_accuracy[i][j] = DNN.test_accuracy
+
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(train_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Training Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(test_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Test Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+!ec
+
+!bc pycod
+# optional
+# we can use log files to visualize our graph in Tensorboard
+writer = tf.summary.FileWriter('logs/')
+writer.add_graph(tf.get_default_graph())
+!ec
+
+
+
+===== Using Keras =====
+
+Keras is a high level "neural network":"https://en.wikipedia.org/wiki/Application_programming_interface"
+that supports Tensorflow, CTNK and Theano as backends.
+If you have Tensorflow installed Keras is available through the *tf.keras* module.
+If you have Anaconda installed you may run the following command
+!bc pycod
+conda install keras
+!ec
+
+Alternatively, if you have Tensorflow or one of the other supported backends install you may use the pip package manager:
+
+!bc pycod
+pip3 install keras
+!ec
+or look up the "instructions here":"https://keras.io/".
+
+!bc pycod
+from keras.models import Sequential
+from keras.layers import Dense
+from keras.regularizers import l2
+from keras.optimizers import SGD
+
+def create_neural_network_keras(n_neurons_layer1, n_neurons_layer2, n_categories, eta, lmbd):
+ model = Sequential()
+ model.add(Dense(n_neurons_layer1, activation='sigmoid', kernel_regularizer=l2(lmbd)))
+ model.add(Dense(n_neurons_layer2, activation='sigmoid', kernel_regularizer=l2(lmbd)))
+ model.add(Dense(n_categories, activation='softmax'))
+
+ sgd = SGD(lr=eta)
+ model.compile(loss='categorical_crossentropy', optimizer=sgd, metrics=['accuracy'])
+
+ return model
+!ec
+
+!bc pycod
+DNN_keras = np.zeros((len(eta_vals), len(lmbd_vals)), dtype=object)
+
+for i, eta in enumerate(eta_vals):
+ for j, lmbd in enumerate(lmbd_vals):
+ DNN = create_neural_network_keras(n_neurons_layer1, n_neurons_layer2, n_categories,
+ eta=eta, lmbd=lmbd)
+ DNN.fit(X_train, Y_train, epochs=epochs, batch_size=batch_size, verbose=0)
+ scores = DNN.evaluate(X_test, Y_test)
+
+ DNN_keras[i][j] = DNN
+
+ print("Learning rate = ", eta)
+ print("Lambda = ", lmbd)
+ print("Test accuracy: %.3f" % scores[1])
+ print()
+!ec
+
+!bc pycod
+# optional
+# visual representation of grid search
+# uses seaborn heatmap, could probably do this in matplotlib
+import seaborn as sns
+
+sns.set()
+
+train_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+test_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+
+for i in range(len(eta_vals)):
+ for j in range(len(lmbd_vals)):
+ DNN = DNN_keras[i][j]
+
+ train_accuracy[i][j] = DNN.evaluate(X_train, Y_train)[1]
+ test_accuracy[i][j] = DNN.evaluate(X_test, Y_test)[1]
+
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(train_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Training Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(test_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Test Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+!ec
+
+
+
+
+
+===== Which activation function should I use? =====
+
+The Back propagation algorithm we derived above works by going from
+the output layer to the input layer, propagating the error gradient on
+the way. Once the algorithm has computed the gradient of the cost
+function with regards to each parameter in the network, it uses these
+gradients to update each parameter with a Gradient Descent (GD) step.
+
+
+Unfortunately for us, the gradients often get smaller and smaller as the
+algorithm progresses down to the first hidden layers. As a result, the
+GD update leaves the lower layer connection weights
+virtually unchanged, and training never converges to a good
+solution. This is known in the literature as
+_the vanishing gradients problem_.
+
+In other cases, the opposite can happen, namely the the gradients can grow bigger and
+bigger. The result is that many of the layers get large updates of the
+weights the
+algorithm diverges. This is the _exploding gradients problem_, which is
+mostly encountered in recurrent neural networks. More generally, deep
+neural networks suffer from unstable gradients, different layers may
+learn at widely different speeds
+
+
+===== Is the Logistic activation function (Sigmoid) our choice? =====
+
+Although this unfortunate behavior has been empirically observed for
+quite a while (it was one of the reasons why deep neural networks were
+mostly abandoned for a long time), it is only around 2010 that
+significant progress was made in understanding it.
+
+A paper titled "Understanding the Difficulty of Training Deep
+Feedforward Neural Networks by Xavier Glorot and Yoshua Bengio":"http://proceedings.mlr.press/v9/glorot10a.html" found that
+the problems with the popular logistic
+sigmoid activation function and the weight initialization technique
+that was most popular at the time, namely random initialization using
+a normal distribution with a mean of 0 and a standard deviation of
+1.
+
+They showed that with this activation function and this
+initialization scheme, the variance of the outputs of each layer is
+much greater than the variance of its inputs. Going forward in the
+network, the variance keeps increasing after each layer until the
+activation function saturates at the top layers. This is actually made
+worse by the fact that the logistic function has a mean of 0.5, not 0
+(the hyperbolic tangent function has a mean of 0 and behaves slightly
+better than the logistic function in deep networks).
+
+
+
+===== The derivative of the Logistic funtion =====
+
+Looking at the logistic activation function, when inputs become large
+(negative or positive), the function saturates at 0 or 1, with a
+derivative extremely close to 0. Thus when backpropagation kicks in,
+it has virtually no gradient to propagate back through the network,
+and what little gradient exists keeps getting diluted as
+backpropagation progresses down through the top layers, so there is
+really nothing left for the lower layers.
+
+In their paper, Glorot and Bengio propose a way to significantly
+alleviate this problem. We need the signal to flow properly in both
+directions: in the forward direction when making predictions, and in
+the reverse direction when backpropagating gradients. We don’t want
+the signal to die out, nor do we want it to explode and saturate. For
+the signal to flow properly, the authors argue that we need the
+variance of the outputs of each layer to be equal to the variance of
+its inputs, and we also need the gradients to have equal variance
+before and after flowing through a layer in the reverse direction.
+
+
+
+One of the insights in the 2010 paper by Glorot and Bengio was that
+the vanishing/exploding gradients problems were in part due to a poor
+choice of activation function. Until then most people had assumed that
+if Nature had chosen to use roughly sigmoid activation functions in
+biological neurons, they must be an excellent choice. But it turns out
+that other activation functions behave much better in deep neural
+networks, in particular the ReLU activation function, mostly because
+it does not saturate for positive values (and also because it is quite
+fast to compute).
+
+
+
+===== The RELU function family =====
+
+The ReLU activation function suffers from a problem known as the dying
+ReLUs: during training, some neurons effectively die, meaning they
+stop outputting anything other than 0.
+
+In some cases, you may find that half of your network’s neurons are
+dead, especially if you used a large learning rate. During training,
+if a neuron’s weights get updated such that the weighted sum of the
+neuron’s inputs is negative, it will start outputting 0. When this
+happen, the neuron is unlikely to come back to life since the gradient
+of the ReLU function is 0 when its input is negative.
+
+To solve this problem, nowadays practitioners use a variant of the ReLU
+function, such as the leaky ReLU discussed above or the so-called
+exponential linear unit (ELU) function
+
+
+!bt
+\[
+ELU(z) = \left\{\begin{array}{cc} \alpha\left( \exp{(z)}-1\right) & z < 0,\\ z & z \ge 0.\end{array}\right.
+\]
+!et
+
+
+===== Which activation function should we use? =====
+
+In general it seems that the ELU activation function is better than
+the leaky ReLU function (and its variants), which is better than
+ReLU. ReLU performs better than $\tanh$ which in turn performs better
+than the logistic function.
+
+If runtime
+performance is an issue, then you may opt for the leaky ReLU function over the
+ELU function If you don’t
+want to tweak yet another hyperparameter, you may just use the default
+$\alpha$ of $0.01$ for the leaky ReLU, and $1$ for ELU. If you have
+spare time and computing power, you can use cross-validation or
+bootstrap to evaluate other activation functions.
+
+
+
+===== A top-down perspective on Neural networks =====
+
+
+The first thing we would like to do is divide the data into two or three
+parts. A training set, a validation or dev (development) set, and a
+test set. The test set is the data on which we want to make
+predictions. The dev set is a subset of the training data we use to
+check how well we are doing out-of-sample, after training the model on
+the training dataset. We use the validation error as a proxy for the
+test error in order to make tweaks to our model. It is crucial that we
+do not use any of the test data to train the algorithm. This is a
+cardinal sin in ML. Then:
+
+
+* Estimate optimal error rate
+
+* Minimize underfitting (bias) on training data set.
+
+* Make sure you are not overfitting.
+
+If the validation and test sets are drawn from the same distributions,
+then a good performance on the validation set should lead to similarly
+good performance on the test set.
+
+However, sometimes
+the training data and test data differ in subtle ways because, for
+example, they are collected using slightly different methods, or
+because it is cheaper to collect data in one way versus another. In
+this case, there can be a mismatch between the training and test
+data. This can lead to the neural network overfitting these small
+differences between the test and training sets, and a poor performance
+on the test set despite having a good performance on the validation
+set. To rectify this, Andrew Ng suggests making two validation or dev
+sets, one constructed from the training data and one constructed from
+the test data. The difference between the performance of the algorithm
+on these two validation sets quantifies the train-test mismatch. This
+can serve as another important diagnostic when using DNNs for
+supervised learning.
+
+
+===== Limitations of supervised learning with deep networks =====
+
+Like all statistical methods, supervised learning using neural
+networks has important limitations. This is especially important when
+one seeks to apply these methods, especially to physics problems. Like
+all tools, DNNs are not a universal solution. Often, the same or
+better performance on a task can be achieved by using a few
+hand-engineered features (or even a collection of random
+features).
+
+Here we list some of the important limitations of supervised neural network based models.
+
+
+
+* _Need labeled data_. All supervised learning methods, DNNs for supervised learning require labeled data. Often, labeled data is harder to acquire than unlabeled data (e.g. one must pay for human experts to label images).
+* _Supervised neural networks are extremely data intensive._ DNNs are data hungry. They perform best when data is plentiful. This is doubly so for supervised methods where the data must also be labeled. The utility of DNNs is extremely limited if data is hard to acquire or the datasets are small (hundreds to a few thousand samples). In this case, the performance of other methods that utilize hand-engineered features can exceed that of DNNs.
+* _Homogeneous data._ Almost all DNNs deal with homogeneous data of one type. It is very hard to design architectures that mix and match data types (i.e.~some continuous variables, some discrete variables, some time series). In applications beyond images, video, and language, this is often what is required. In contrast, ensemble models like random forests or gradient-boosted trees have no difficulty handling mixed data types.
+* _Many problems are not about prediction._ In natural science we are often interested in learning something about the underlying distribution that generates the data. In this case, it is often difficult to cast these ideas in a supervised learning setting. While the problems are related, it is possible to make good predictions with a *wrong* model. The model might or might not be useful for understanding the underlying science.
+
+Some of these remarks are particular to DNNs, others are shared by all supervised learning methods. This motivates the use of unsupervised methods which in part circumvent these problems.
+
+
diff --git a/doc/src/NeuralNet/chapter6.do.txt~ b/doc/src/NeuralNet/chapter6.do.txt~
new file mode 100644
index 000000000..03fc84106
--- /dev/null
+++ b/doc/src/NeuralNet/chapter6.do.txt~
@@ -0,0 +1,2466 @@
+TITLE: Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning
+AUTHOR: Morten Hjorth-Jensen {copyright, 1999-present|CC BY-NC} at Department of Physics, University of Oslo & Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University
+DATE: today
+
+
+!split
+===== To do list =====
+
+* write code for single perceptron model and make link with linear regression
+* revise initial info and add references
+* Update tensorflow material, with keras
+* think of adding material about pytorch
+* rework pulsar example and breast cancer example
+* add ising model example for both regression and classification
+* make data on gravitational problem, add reference to articles on uncovering physical laws from ML
+* think of genetic data
+
+
+!split
+===== Neural networks =====
+
+Artificial neural networks are computational systems that can learn to
+perform tasks by considering examples, generally without being
+programmed with any task-specific rules. It is supposed to mimic a
+biological system, wherein neurons interact by sending signals in the
+form of mathematical functions between layers. All layers can contain
+an arbitrary number of neurons, and each connection is represented by
+a weight variable.
+
+
+!split
+===== Artificial neurons =====
+
+The field of artificial neural networks has a long history of
+development, and is closely connected with the advancement of computer
+science and computers in general. A model of artificial neurons was
+first developed by McCulloch and Pitts in 1943 to study signal
+processing in the brain and has later been refined by others. The
+general idea is to mimic neural networks in the human brain, which is
+composed of billions of neurons that communicate with each other by
+sending electrical signals. Each neuron accumulates its incoming
+signals, which must exceed an activation threshold to yield an
+output. If the threshold is not overcome, the neuron remains inactive,
+i.e. has zero output.
+
+This behaviour has inspired a simple mathematical model for an artificial neuron.
+
+!bt
+\begin{equation}
+ y = f\left(\sum_{i=1}^n w_ix_i\right) = f(u)
+ label{artificialNeuron}
+\end{equation}
+!et
+Here, the output $y$ of the neuron is the value of its activation function, which have as input
+a weighted sum of signals $x_i, \dots ,x_n$ received by $n$ other neurons.
+
+Conceptually, it is helpful to divide neural networks into four
+categories:
+o general purpose neural networks for supervised learning,
+o neural networks designed specifically for image processing, the most prominent example of this class being Convolutional Neural Networks (CNNs),
+o neural networks for sequential data such as Recurrent Neural Networks (RNNs), and
+o neural networks for unsupervised learning such as Deep Boltzmann Machines.
+
+
+In natural science, DNNs and CNNs have already found numerous
+applications. In statistical physics, they have been applied to detect
+phase transitions in 2D Ising and Potts models, lattice gauge
+theories, and different phases of polymers, or solving the
+Navier-Stokes equation in weather forecasting. Deep learning has also
+found interesting applications in quantum physics. Various quantum
+phase transitions can be detected and studied using DNNs and CNNs,
+topological phases, and even non-equilibrium many-body
+localization. Representing quantum states as DNNs quantum state
+tomography are among some of the impressive achievements to reveal the
+potential of DNNs to facilitate the study of quantum systems.
+
+In quantum information theory, it has been shown that one can perform
+gate decompositions with the help of neural.
+
+The applications are not limited to the natural sciences. There is a
+plethora of applications in essentially all disciplines, from the
+humanities to life science and medicine.
+
+!split
+===== Neural network types =====
+
+An artificial neural network (ANN), is a computational model that
+consists of layers of connected neurons, or nodes or units. We will
+refer to these interchangeably as units or nodes, and sometimes as
+neurons.
+
+It is supposed to mimic a biological nervous system by letting each
+neuron interact with other neurons by sending signals in the form of
+mathematical functions between layers. A wide variety of different
+ANNs have been developed, but most of them consist of an input layer,
+an output layer and eventual layers in-between, called *hidden
+layers*. All layers can contain an arbitrary number of nodes, and each
+connection between two nodes is associated with a weight variable.
+
+Neural networks (also called neural nets) are neural-inspired
+nonlinear models for supervised learning. As we will see, neural nets
+can be viewed as natural, more powerful extensions of supervised
+learning methods such as linear and logistic regression and soft-max
+methods we discussed earlier.
+
+
+!split
+===== Feed-forward neural networks =====
+
+The feed-forward neural network (FFNN) was the first and simplest type
+of ANNs that were devised. In this network, the information moves in
+only one direction: forward through the layers.
+
+Nodes are represented by circles, while the arrows display the
+connections between the nodes, including the direction of information
+flow. Additionally, each arrow corresponds to a weight variable
+(figure to come). We observe that each node in a layer is connected
+to *all* nodes in the subsequent layer, making this a so-called
+*fully-connected* FFNN.
+
+
+
+!split
+===== Convolutional Neural Network =====
+
+A different variant of FFNNs are *convolutional neural networks*
+(CNNs), which have a connectivity pattern inspired by the animal
+visual cortex. Individual neurons in the visual cortex only respond to
+stimuli from small sub-regions of the visual field, called a receptive
+field. This makes the neurons well-suited to exploit the strong
+spatially local correlation present in natural images. The response of
+each neuron can be approximated mathematically as a convolution
+operation. (figure to come)
+
+Convolutional neural networks emulate the behaviour of neurons in the
+visual cortex by enforcing a *local* connectivity pattern between
+nodes of adjacent layers: Each node in a convolutional layer is
+connected only to a subset of the nodes in the previous layer, in
+contrast to the fully-connected FFNN. Often, CNNs consist of several
+convolutional layers that learn local features of the input, with a
+fully-connected layer at the end, which gathers all the local data and
+produces the outputs. They have wide applications in image and video
+recognition.
+
+!split
+===== Recurrent neural networks =====
+
+So far we have only mentioned ANNs where information flows in one
+direction: forward. *Recurrent neural networks* on the other hand,
+have connections between nodes that form directed *cycles*. This
+creates a form of internal memory which are able to capture
+information on what has been calculated before; the output is
+dependent on the previous computations. Recurrent NNs make use of
+sequential information by performing the same task for every element
+in a sequence, where each element depends on previous elements. An
+example of such information is sentences, making recurrent NNs
+especially well-suited for handwriting and speech recognition.
+
+!split
+===== Other types of networks =====
+
+There are many other kinds of ANNs that have been developed. One type
+that is specifically designed for interpolation in multidimensional
+space is the radial basis function (RBF) network. RBFs are typically
+made up of three layers: an input layer, a hidden layer with
+non-linear radial symmetric activation functions and a linear output
+layer (''linear'' here means that each node in the output layer has a
+linear activation function). The layers are normally fully-connected
+and there are no cycles, thus RBFs can be viewed as a type of
+fully-connected FFNN. They are however usually treated as a separate
+type of NN due the unusual activation functions.
+
+!split
+===== Multilayer perceptrons =====
+
+One uses often so-called fully-connected feed-forward neural networks
+with three or more layers (an input layer, one or more hidden layers
+and an output layer) consisting of neurons that have non-linear
+activation functions.
+
+Such networks are often called *multilayer perceptrons* (MLPs).
+
+!split
+===== Why multilayer perceptrons? =====
+
+According to the *Universal approximation theorem*, a feed-forward
+neural network with just a single hidden layer containing a finite
+number of neurons can approximate a continuous multidimensional
+function to arbitrary accuracy, assuming the activation function for
+the hidden layer is a _non-constant, bounded and
+monotonically-increasing continuous function_.
+
+Note that the requirements on the activation function only applies to
+the hidden layer, the output nodes are always assumed to be linear, so
+as to not restrict the range of output values.
+
+
+!split
+===== Mathematical model =====
+
+The output $y$ is produced via the activation function $f$
+!bt
+\[
+ y = f\left(\sum_{i=1}^n w_ix_i + b_i\right) = f(z),
+\]
+!et
+This function receives $x_i$ as inputs.
+Here the activation $z=(\sum_{i=1}^n w_ix_i+b_i)$.
+In an FFNN of such neurons, the *inputs* $x_i$ are the *outputs* of
+the neurons in the preceding layer. Furthermore, an MLP is
+fully-connected, which means that each neuron receives a weighted sum
+of the outputs of *all* neurons in the previous layer.
+
+!split
+===== Mathematical model =====
+
+First, for each node $i$ in the first hidden layer, we calculate a weighted sum $z_i^1$ of the input coordinates $x_j$,
+
+!bt
+\begin{equation} z_i^1 = \sum_{j=1}^{M} w_{ij}^1 x_j + b_i^1
+\end{equation}
+!et
+
+Here $b_i$ is the so-called bias which is normally needed in
+case of zero activation weights or inputs. How to fix the biases and
+the weights will be discussed below. The value of $z_i^1$ is the
+argument to the activation function $f_i$ of each node $i$, The
+variable $M$ stands for all possible inputs to a given node $i$ in the
+first layer. We define the output $y_i^1$ of all neurons in layer 1 as
+
+!bt
+\begin{equation}
+ y_i^1 = f(z_i^1) = f\left(\sum_{j=1}^M w_{ij}^1 x_j + b_i^1\right)
+ label{outputLayer1}
+\end{equation}
+!et
+
+where we assume that all nodes in the same layer have identical
+activation functions, hence the notation $f$. In general, we could assume in the more general case that different layers have different activation functions.
+In this case we would identify these functions with a superscript $l$ for the $l$-th layer,
+
+!bt
+\begin{equation}
+ y_i^l = f^l(u_i^l) = f^l\left(\sum_{j=1}^{N_{l-1}} w_{ij}^l y_j^{l-1} + b_i^l\right)
+ label{generalLayer}
+\end{equation}
+!et
+
+where $N_l$ is the number of nodes in layer $l$. When the output of
+all the nodes in the first hidden layer are computed, the values of
+the subsequent layer can be calculated and so forth until the output
+is obtained.
+
+
+
+!split
+===== Mathematical model =====
+
+The output of neuron $i$ in layer 2 is thus,
+
+!bt
+\begin{align}
+ y_i^2 &= f^2\left(\sum_{j=1}^N w_{ij}^2 y_j^1 + b_i^2\right) \\
+ &= f^2\left[\sum_{j=1}^N w_{ij}^2f^1\left(\sum_{k=1}^M w_{jk}^1 x_k + b_j^1\right) + b_i^2\right]
+ label{outputLayer2}
+\end{align}
+!et
+where we have substituted $y_k^1$ with the inputs $x_k$. Finally, the ANN output reads
+
+!bt
+\begin{align}
+ y_i^3 &= f^3\left(\sum_{j=1}^N w_{ij}^3 y_j^2 + b_i^3\right) \\
+ &= f_3\left[\sum_{j} w_{ij}^3 f^2\left(\sum_{k} w_{jk}^2 f^1\left(\sum_{m} w_{km}^1 x_m + b_k^1\right) + b_j^2\right)
+ + b_1^3\right]
+\end{align}
+!et
+
+!split
+===== Mathematical model =====
+
+We can generalize this expression to an MLP with $l$ hidden
+layers. The complete functional form is,
+
+!bt
+\begin{align}
+&y^{l+1}_i = f^{l+1}\left[\!\sum_{j=1}^{N_l} w_{ij}^3 f^l\left(\sum_{k=1}^{N_{l-1}}w_{jk}^{l-1}\left(\dots f^1\left(\sum_{n=1}^{N_0} w_{mn}^1 x_n+ b_m^1\right)\dots\right)+b_k^2\right)+b_1^3\right] &&
+ label{completeNN}
+\end{align}
+!et
+
+which illustrates a basic property of MLPs: The only independent
+variables are the input values $x_n$.
+
+!split
+===== Mathematical model =====
+
+This confirms that an MLP, despite its quite convoluted mathematical
+form, is nothing more than an analytic function, specifically a
+mapping of real-valued vectors $\hat{x} \in \mathbb{R}^n \rightarrow
+\hat{y} \in \mathbb{R}^m$.
+
+Furthermore, the flexibility and universality of an MLP can be
+illustrated by realizing that the expression is essentially a nested
+sum of scaled activation functions of the form
+
+!bt
+\begin{equation}
+ f(x) = c_1 f(c_2 x + c_3) + c_4
+\end{equation}
+!et
+
+where the parameters $c_i$ are weights and biases. By adjusting these
+parameters, the activation functions can be shifted up and down or
+left and right, change slope or be rescaled which is the key to the
+flexibility of a neural network.
+
+!split
+=== Matrix-vector notation ===
+
+We can introduce a more convenient notation for the activations in an A NN.
+
+Additionally, we can represent the biases and activations
+as layer-wise column vectors $\hat{b}_l$ and $\hat{y}_l$, so that the $i$-th element of each vector
+is the bias $b_i^l$ and activation $y_i^l$ of node $i$ in layer $l$ respectively.
+
+We have that $\mathrm{W}_l$ is an $N_{l-1} \times N_l$ matrix, while $\hat{b}_l$ and $\hat{y}_l$ are $N_l \times 1$ column vectors.
+With this notation, the sum becomes a matrix-vector multiplication, and we can write
+the equation for the activations of hidden layer 2 (assuming three nodes for simplicity) as
+!bt
+\begin{equation}
+ \hat{y}_2 = f_2(\mathrm{W}_2 \hat{y}_{1} + \hat{b}_{2}) =
+ f_2\left(\left[\begin{array}{ccc}
+ w^2_{11} &w^2_{12} &w^2_{13} \\
+ w^2_{21} &w^2_{22} &w^2_{23} \\
+ w^2_{31} &w^2_{32} &w^2_{33} \\
+ \end{array} \right] \cdot
+ \left[\begin{array}{c}
+ y^1_1 \\
+ y^1_2 \\
+ y^1_3 \\
+ \end{array}\right] +
+ \left[\begin{array}{c}
+ b^2_1 \\
+ b^2_2 \\
+ b^2_3 \\
+ \end{array}\right]\right).
+\end{equation}
+!et
+
+!split
+=== Matrix-vector notation and activation ===
+
+The activation of node $i$ in layer 2 is
+
+!bt
+\begin{equation}
+ y^2_i = f_2\Bigr(w^2_{i1}y^1_1 + w^2_{i2}y^1_2 + w^2_{i3}y^1_3 + b^2_i\Bigr) =
+ f_2\left(\sum_{j=1}^3 w^2_{ij} y_j^1 + b^2_i\right).
+\end{equation}
+!et
+
+This is not just a convenient and compact notation, but also a useful
+and intuitive way to think about MLPs: The output is calculated by a
+series of matrix-vector multiplications and vector additions that are
+used as input to the activation functions. For each operation
+$\mathrm{W}_l \hat{y}_{l-1}$ we move forward one layer.
+
+
+!split
+=== Activation functions ===
+
+
+A property that characterizes a neural network, other than its
+connectivity, is the choice of activation function(s). As described
+in, the following restrictions are imposed on an activation function
+for a FFNN to fulfill the universal approximation theorem
+
+ * Non-constant
+
+ * Bounded
+
+ * Monotonically-increasing
+
+ * Continuous
+
+!split
+=== Activation functions, Logistic and Hyperbolic ones ===
+
+The second requirement excludes all linear functions. Furthermore, in
+a MLP with only linear activation functions, each layer simply
+performs a linear transformation of its inputs.
+
+Regardless of the number of layers, the output of the NN will be
+nothing but a linear function of the inputs. Thus we need to introduce
+some kind of non-linearity to the NN to be able to fit non-linear
+functions Typical examples are the logistic *Sigmoid*
+
+!bt
+\[
+ f(x) = \frac{1}{1 + e^{-x}},
+\]
+!et
+and the *hyperbolic tangent* function
+!bt
+\[
+ f(x) = \tanh(x)
+\]
+!et
+
+!split
+=== Relevance ===
+
+The *sigmoid* function are more biologically plausible because the
+output of inactive neurons are zero. Such activation function are
+called *one-sided*. However, it has been shown that the hyperbolic
+tangent performs better than the sigmoid for training MLPs. has
+become the most popular for *deep neural networks*
+
+!bc pycod
+"""The sigmoid function (or the logistic curve) is a
+function that takes any real number, z, and outputs a number (0,1).
+It is useful in neural networks for assigning weights on a relative scale.
+The value z is the weighted sum of parameters involved in the learning algorithm."""
+
+import numpy
+import matplotlib.pyplot as plt
+import math as mt
+
+z = numpy.arange(-5, 5, .1)
+sigma_fn = numpy.vectorize(lambda z: 1/(1+numpy.exp(-z)))
+sigma = sigma_fn(z)
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot(z, sigma)
+ax.set_ylim([-0.1, 1.1])
+ax.set_xlim([-5,5])
+ax.grid(True)
+ax.set_xlabel('z')
+ax.set_title('sigmoid function')
+
+plt.show()
+
+"""Step Function"""
+z = numpy.arange(-5, 5, .02)
+step_fn = numpy.vectorize(lambda z: 1.0 if z >= 0.0 else 0.0)
+step = step_fn(z)
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot(z, step)
+ax.set_ylim([-0.5, 1.5])
+ax.set_xlim([-5,5])
+ax.grid(True)
+ax.set_xlabel('z')
+ax.set_title('step function')
+
+plt.show()
+
+"""Sine Function"""
+z = numpy.arange(-2*mt.pi, 2*mt.pi, 0.1)
+t = numpy.sin(z)
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot(z, t)
+ax.set_ylim([-1.0, 1.0])
+ax.set_xlim([-2*mt.pi,2*mt.pi])
+ax.grid(True)
+ax.set_xlabel('z')
+ax.set_title('sine function')
+
+plt.show()
+
+"""Plots a graph of the squashing function used by a rectified linear
+unit"""
+z = numpy.arange(-2, 2, .1)
+zero = numpy.zeros(len(z))
+y = numpy.max([zero, z], axis=0)
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot(z, y)
+ax.set_ylim([-2.0, 2.0])
+ax.set_xlim([-2.0, 2.0])
+ax.grid(True)
+ax.set_xlabel('z')
+ax.set_title('Rectified linear unit')
+
+plt.show()
+!ec
+
+
+!split
+===== The multilayer perceptron (MLP) =====
+
+The multilayer perceptron is a very popular, and easy to implement approach, to deep learning. It consists of
+o A neural network with one or more layers of nodes between the input and the output nodes.
+o The multilayer network structure, or architecture, or topology, consists of an input layer, one or more hidden layers, and one output layer.
+o The input nodes pass values to the first hidden layer, its nodes pass the information on to the second and so on till we reach the output layer.
+
+As a convention it is normal to call a network with one layer of input units, one layer of hidden
+units and one layer of output units as a two-layer network. A network with two layers of hidden units is called a three-layer network etc etc.
+
+For an MLP network there is no direct connection between the output nodes/neurons/units and the input nodes/neurons/units.
+Hereafter we will call the various entities of a layer for nodes.
+There are also no connections within a single layer.
+
+The number of input nodes does not need to equal the number of output
+nodes. This applies also to the hidden layers. Each layer may have its
+own number of nodes and activation functions.
+
+The hidden layers have their name from the fact that they are not
+linked to observables and as we will see below when we define the
+so-called activation $\hat{z}$, we can think of this as a basis
+expansion of the original inputs $\hat{x}$. The difference however
+between neural networks and say linear regression is that now these
+basis functions (which will correspond to the weights in the network)
+are learned from data. This results in an important difference between
+neural networks and deep learning approaches on one side and methods
+like logistic regression or linear regression and their modifications on the other side.
+
+
+!split
+===== From one to many layers, the universal approximation theorem =====
+
+
+A neural network with only one layer, what we called the simple
+perceptron, is best suited if we have a standard binary model with
+clear (linear) boundaries between the outcomes. As such it could
+equally well be replaced by standard linear regression or logistic
+regression. Networks with one or more hidden layers approximate
+systems with more complex boundaries.
+
+As stated earlier,
+an important theorem in studies of neural networks, restated without
+proof here, is the "universal approximation
+theorem":"http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.441.7873&rep=rep1&type=pdf".
+
+It states that a feed-forward network with a single hidden layer
+containing a finite number of neurons can approximate continuous
+functions on compact subsets of real functions. The theorem thus
+states that simple neural networks can represent a wide variety of
+interesting functions when given appropriate parameters. It is the
+multilayer feedforward architecture itself which gives neural networks
+the potential of being universal approximators.
+
+
+!split
+===== Deriving the back propagation code for a multilayer perceptron model =====
+
+
+_Note: figures will be inserted later!_
+
+As we have seen now in a feed forward network, we can express the final output of our network in terms of basic matrix-vector multiplications.
+The unknowwn quantities are our weights $w_{ij}$ and we need to find an algorithm for changing them so that our errors are as small as possible.
+This leads us to the famous "back propagation algorithm":"https://www.nature.com/articles/323533a0".
+
+The questions we want to ask are how do changes in the biases and the
+weights in our network change the cost function and how can we use the
+final output to modify the weights?
+
+To derive these equations let us start with a plain regression problem
+and define our cost function as
+
+!bt
+\[
+{\cal C}(\hat{W}) = \frac{1}{2}\sum_{i=1}^n\left(y_i - t_i\right)^2,
+\]
+!et
+
+where the $t_i$s are our $n$ targets (the values we want to
+reproduce), while the outputs of the network after having propagated
+all inputs $\hat{x}$ are given by $y_i$. Below we will demonstrate
+how the basic equations arising from the back propagation algorithm
+can be modified in order to study classification problems with $K$
+classes.
+
+!split
+===== Definitions =====
+
+With our definition of the targets $\hat{t}$, the outputs of the
+network $\hat{y}$ and the inputs $\hat{x}$ we
+define now the activation $z_j^l$ of node/neuron/unit $j$ of the
+$l$-th layer as a function of the bias, the weights which add up from
+the previous layer $l-1$ and the forward passes/outputs
+$\hat{a}^{l-1}$ from the previous layer as
+
+
+!bt
+\[
+z_j^l = \sum_{i=1}^{M_{l-1}}w_{ij}^la_i^{l-1}+b_j^l,
+\]
+!et
+
+where $b_k^l$ are the biases from layer $l$. Here $M_{l-1}$
+represents the total number of nodes/neurons/units of layer $l-1$. The
+figure here illustrates this equation. We can rewrite this in a more
+compact form as the matrix-vector products we discussed earlier,
+
+!bt
+\[
+\hat{z}^l = \left(\hat{W}^l\right)^T\hat{a}^{l-1}+\hat{b}^l.
+\]
+!et
+
+With the activation values $\hat{z}^l$ we can in turn define the
+output of layer $l$ as $\hat{a}^l = f(\hat{z}^l)$ where $f$ is our
+activation function. In the examples here we will use the sigmoid
+function discussed in our logistic regression lectures. We will also use the same activation function $f$ for all layers
+and their nodes. It means we have
+
+!bt
+\[
+a_j^l = f(z_j^l) = \frac{1}{1+\exp{-(z_j^l)}}.
+\]
+!et
+
+
+!split
+===== Derivatives and the chain rule =====
+
+From the definition of the activation $z_j^l$ we have
+!bt
+\[
+\frac{\partial z_j^l}{\partial w_{ij}^l} = a_i^{l-1},
+\]
+!et
+and
+!bt
+\[
+\frac{\partial z_j^l}{\partial a_i^{l-1}} = w_{ji}^l.
+\]
+!et
+
+With our definition of the activation function we have that (note that this function depends only on $z_j^l$)
+!bt
+\[
+\frac{\partial a_j^l}{\partial z_j^{l}} = a_j^l(1-a_j^l)=f(z_j^l)(1-f(z_j^l)).
+\]
+!et
+
+
+!split
+===== Derivative of the cost function =====
+
+With these definitions we can now compute the derivative of the cost function in terms of the weights.
+
+Let us specialize to the output layer $l=L$. Our cost function is
+!bt
+\[
+{\cal C}(\hat{W^L}) = \frac{1}{2}\sum_{i=1}^n\left(y_i - t_i\right)^2=\frac{1}{2}\sum_{i=1}^n\left(a_i^L - t_i\right)^2,
+\]
+!et
+The derivative of this function with respect to the weights is
+
+!bt
+\[
+\frac{\partial{\cal C}(\hat{W^L})}{\partial w_{jk}^L} = \left(a_j^L - t_j\right)\frac{\partial a_j^L}{\partial w_{jk}^{L}},
+\]
+!et
+The last partial derivative can easily be computed and reads (by applying the chain rule)
+!bt
+\[
+\frac{\partial a_j^L}{\partial w_{jk}^{L}} = \frac{\partial a_j^L}{\partial z_{j}^{L}}\frac{\partial z_j^L}{\partial w_{jk}^{L}}=a_j^L(1-a_j^L)a_k^{L-1},
+\]
+!et
+
+
+
+!split
+===== Bringing it together, first back propagation equation =====
+
+We have thus
+!bt
+\[
+\frac{\partial{\cal C}(\hat{W^L})}{\partial w_{jk}^L} = \left(a_j^L - t_j\right)a_j^L(1-a_j^L)a_k^{L-1},
+\]
+!et
+
+Defining
+!bt
+\[
+\delta_j^L = a_j^L(1-a_j^L)\left(a_j^L - t_j\right) = f'(z_j^L)\frac{\partial {\cal C}}{\partial (a_j^L)},
+\]
+!et
+and using the Hadamard product of two vectors we can write this as
+!bt
+\[
+\hat{\delta}^L = f'(\hat{z}^L)\circ\frac{\partial {\cal C}}{\partial (\hat{a}^L)}.
+\]
+!et
+
+This is an important expression. The second term on the right handside
+measures how fast the cost function is changing as a function of the $j$th
+output activation. If, for example, the cost function doesn't depend
+much on a particular output node $j$, then $\delta_j^L$ will be small,
+which is what we would expect. The first term on the right, measures
+how fast the activation function $f$ is changing at a given activation
+value $z_j^L$.
+
+Notice that everything in the above equations is easily computed. In
+particular, we compute $z_j^L$ while computing the behaviour of the
+network, and it is only a small additional overhead to compute
+$f'(z^L_j)$. The exact form of the derivative with respect to the
+output depends on the form of the cost function.
+However, provided the cost function is known there should be little
+trouble in calculating
+
+!bt
+\[
+\frac{\partial {\cal C}}{\partial (a_j^L)}
+\]
+!et
+
+With the definition of $\delta_j^L$ we have a more compact definition of the derivative of the cost function in terms of the weights, namely
+!bt
+\[
+\frac{\partial{\cal C}(\hat{W^L})}{\partial w_{jk}^L} = \delta_j^La_k^{L-1}.
+\]
+!et
+
+!split
+===== Derivatives in terms of $z_j^L$ =====
+
+It is also easy to see that our previous equation can be written as
+
+!bt
+\[
+\delta_j^L =\frac{\partial {\cal C}}{\partial z_j^L}= \frac{\partial {\cal C}}{\partial a_j^L}\frac{\partial a_j^L}{\partial z_j^L},
+\]
+!et
+which can also be interpreted as the partial derivative of the cost function with respect to the biases $b_j^L$, namely
+!bt
+\[
+\delta_j^L = \frac{\partial {\cal C}}{\partial b_j^L}\frac{\partial b_j^L}{\partial z_j^L}=\frac{\partial {\cal C}}{\partial b_j^L},
+\]
+!et
+That is, the error $\delta_j^L$ is exactly equal to the rate of change of the cost function as a function of the bias.
+!split
+===== Bringing it together =====
+
+We have now three equations that are essential for the computations of the derivatives of the cost function at the output layer. These equations are needed to start the algorithm and they are
+
+!bblock The starting equations
+
+!bt
+\begin{equation}
+\frac{\partial{\cal C}(\hat{W^L})}{\partial w_{jk}^L} = \delta_j^La_k^{L-1},
+\end{equation}
+!et
+and
+!bt
+\begin{equation}
+\delta_j^L = f'(z_j^L)\frac{\partial {\cal C}}{\partial (a_j^L)},
+\end{equation}
+!et
+and
+
+!bt
+\begin{equation}
+\delta_j^L = \frac{\partial {\cal C}}{\partial b_j^L},
+\end{equation}
+!et
+!eblock
+
+
+An interesting consequence of the above equations is that when the
+activation $a_k^{L-1}$ is small, the gradient term, that is the
+derivative of the cost function with respect to the weights, will also
+tend to be small. We say then that the weight learns slowly, meaning
+that it changes slowly when we minimize the weights via say gradient
+descent. In this case we say the system learns slowly.
+
+Another interesting feature is that is when the activation function,
+represented by the sigmoid function here, is rather flat when we move towards
+its end values $0$ and $1$ (see the above Python codes). In these
+cases, the derivatives of the activation function will also be close
+to zero, meaning again that the gradients will be small and the
+network learns slowly again.
+
+
+
+We need a fourth equation and we are set. We are going to propagate
+backwards in order to the determine the weights and biases. In order
+to do so we need to represent the error in the layer before the final
+one $L-1$ in terms of the errors in the final output layer.
+
+!split
+===== Final back propagating equation =====
+
+We have that (replacing $L$ with a general layer $l$)
+!bt
+\[
+\delta_j^l =\frac{\partial {\cal C}}{\partial z_j^l}.
+\]
+!et
+We want to express this in terms of the equations for layer $l+1$. Using the chain rule and summing over all $k$ entries we have
+
+!bt
+\[
+\delta_j^l =\sum_k \frac{\partial {\cal C}}{\partial z_k^{l+1}}\frac{\partial z_k^{l+1}}{\partial z_j^{l}}=\sum_k \delta_k^{l+1}\frac{\partial z_k^{l+1}}{\partial z_j^{l}},
+\]
+!et
+and recalling that
+!bt
+\[
+z_j^{l+1} = \sum_{i=1}^{M_{l}}w_{ij}^{l+1}a_i^{l}+b_j^{l+1},
+\]
+!et
+with $M_l$ being the number of nodes in layer $l$, we obtain
+!bt
+\[
+\delta_j^l =\sum_k \delta_k^{l+1}w_{kj}^{l+1}f'(z_j^l),
+\]
+!et
+This is our final equation.
+
+We are now ready to set up the algorithm for back propagation and learning the weights and biases.
+
+!split
+===== Setting up the Back propagation algorithm =====
+
+
+
+The four equations provide us with a way of computing the gradient of the cost function. Let us write this out in the form of an algorithm.
+
+!bblock
+First, we set up the input data $\hat{x}$ and the activations
+$\hat{z}_1$ of the input layer and compute the activation function and
+the pertinent outputs $\hat{a}^1$.
+!eblock
+
+!bblock
+Secondly, we perform then the feed forward till we reach the output
+layer and compute all $\hat{z}_l$ of the input layer and compute the
+activation function and the pertinent outputs $\hat{a}^l$ for
+$l=2,3,\dots,L$.
+!eblock
+
+!bblock
+Thereafter we compute the ouput error $\hat{\delta}^L$ by computing all
+!bt
+\[
+\delta_j^L = f'(z_j^L)\frac{\partial {\cal C}}{\partial (a_j^L)}.
+\]
+!et
+!eblock
+
+!bblock
+Then we compute the back propagate error for each $l=L-1,L-2,\dots,2$ as
+!bt
+\[
+\delta_j^l = \sum_k \delta_k^{l+1}w_{kj}^{l+1}f'(z_j^l).
+\]
+!et
+!eblock
+
+!bblock
+Finally, we update the weights and the biases using gradient descent for each $l=L-1,L-2,\dots,2$ and update the weights and biases according to the rules
+!bt
+\[
+w_{jk}^l\leftarrow = w_{jk}^l- \eta \delta_j^la_k^{l-1},
+\]
+!et
+
+!bt
+\[
+b_j^l \leftarrow b_j^l-\eta \frac{\partial {\cal C}}{\partial b_j^l}=b_j^l-\eta \delta_j^l,
+\]
+!et
+!eblock
+
+The parameter $\eta$ is the learning parameter discussed in connection with the gradient descent methods.
+Here it is convenient to use stochastic gradient descent (see the examples below) with mini-batches with an outer loop that steps through multiple epochs of training.
+
+
+!split
+===== Setting up a Multi-layer perceptron model for classification =====
+
+We are now gong to develop an example based on the MNIST data
+base. This is a classification problem and we need to use our
+cross-entropy function we discussed in connection with logistic
+regression. The cross-entropy defines our cost function for the
+classificaton problems with neural networks.
+
+In binary classification with two classes $(0, 1)$ we define the
+logistic/sigmoid function as the probability that a particular input
+is in class $0$ or $1$. This is possible because the logistic
+function takes any input from the real numbers and inputs a number
+between 0 and 1, and can therefore be interpreted as a probability. It
+also has other nice properties, such as a derivative that is simple to
+calculate.
+
+For an input $\boldsymbol{a}$ from the hidden layer, the probability that the input $\boldsymbol{x}$
+is in class 0 or 1 is just. We let $\theta$ represent the unknown weights and biases to be adjusted by our equations). The variable $x$
+represents our activation values $z$. We have
+!bt
+\[
+P(y = 0 \mid \hat{x}, \hat{\theta}) = \frac{1}{1 + \exp{(- \hat{x}})} ,
+\]
+!et
+and
+!bt
+\[
+P(y = 1 \mid \hat{x}, \hat{\theta}) = 1 - P(y = 0 \mid \hat{x}, \hat{\theta}) ,
+\]
+!et
+
+where $y \in \{0, 1\}$ and $\hat{\theta}$ represents the weights and biases
+of our network.
+
+
+!split
+===== Defining the cost function =====
+
+Our cost function is given as (see the Logistic regression lectures)
+!bt
+\[
+\mathcal{C}(\hat{\theta}) = - \ln P(\mathcal{D} \mid \hat{\theta}) = - \sum_{i=1}^n
+y_i \ln[P(y_i = 0)] + (1 - y_i) \ln [1 - P(y_i = 0)] = \sum_{i=1}^n \mathcal{L}_i(\hat{\theta}) .
+\]
+!et
+
+This last equality means that we can interpret our *cost* function as a sum over the *loss* function
+for each point in the dataset $\mathcal{L}_i(\hat{\theta})$.
+The negative sign is just so that we can think about our algorithm as minimizing a positive number, rather
+than maximizing a negative number.
+
+In *multiclass* classification it is common to treat each integer label as a so called *one-hot* vector:
+
+$y = 5 \quad \rightarrow \quad \hat{y} = (0, 0, 0, 0, 0, 1, 0, 0, 0, 0) ,$ and
+
+
+$y = 1 \quad \rightarrow \quad \hat{y} = (0, 1, 0, 0, 0, 0, 0, 0, 0, 0) ,$
+
+
+i.e. a binary bit string of length $C$, where $C = 10$ is the number of classes in the MNIST dataset (numbers from $0$ to $9$)..
+
+If $\hat{x}_i$ is the $i$-th input (image), $y_{ic}$ refers to the $c$-th component of the $i$-th
+output vector $\hat{y}_i$.
+The probability of $\hat{x}_i$ being in class $c$ will be given by the softmax function:
+
+!bt
+\[
+P(y_{ic} = 1 \mid \hat{x}_i, \hat{\theta}) = \frac{\exp{((\hat{a}_i^{hidden})^T \hat{w}_c)}}
+{\sum_{c'=0}^{C-1} \exp{((\hat{a}_i^{hidden})^T \hat{w}_{c'})}} ,
+\]
+!et
+
+which reduces to the logistic function in the binary case.
+The likelihood of this $C$-class classifier
+is now given as:
+
+!bt
+\[
+P(\mathcal{D} \mid \hat{\theta}) = \prod_{i=1}^n \prod_{c=0}^{C-1} [P(y_{ic} = 1)]^{y_{ic}} .
+\]
+!et
+Again we take the negative log-likelihood to define our cost function:
+
+!bt
+\[
+\mathcal{C}(\hat{\theta}) = - \log{P(\mathcal{D} \mid \hat{\theta})}.
+\]
+!et
+See the logistic regression lectures for a full definition of the cost function.
+
+The back propagation equations need now only a small change, namely the definition of a new cost function. We are thus ready to use the same equations as before!
+
+!split
+===== Example: binary classification problem =====
+
+As an example of the above, relevant for project 2 as well, let us consider a binary class. As discussed in our logistic regression lectures, we defined a cost function in terms of the parameters $\beta$ as
+!bt
+\[
+\mathcal{C}(\hat{\beta}) = - \sum_{i=1}^n \left(y_i\log{p(y_i \vert x_i,\hat{\beta})}+(1-y_i)\log{1-p(y_i \vert x_i,\hat{\beta})}\right),
+\]
+!et
+where we had defined the logistic (sigmoid) function
+!bt
+\[
+p(y_i =1\vert x_i,\hat{\beta})=\frac{\exp{(\beta_0+\beta_1 x_i)}}{1+\exp{(\beta_0+\beta_1 x_i)}},
+\]
+!et
+and
+!bt
+\[
+p(y_i =0\vert x_i,\hat{\beta})=1-p(y_i =1\vert x_i,\hat{\beta}).
+\]
+!et
+The parameters $\hat{\beta}$ were defined using a minimization method like gradient descent or Newton-Raphson's method.
+
+Now we replace $x_i$ with the activation $z_i^l$ for a given layer $l$ and the outputs as $y_i=a_i^l=f(z_i^l)$, with $z_i^l$ now being a function of the weights $w_{ij}^l$ and biases $b_i^l$.
+We have then
+!bt
+\[
+a_i^l = y_i = \frac{\exp{(z_i^l)}}{1+\exp{(z_i^l)}},
+\]
+!et
+with
+!bt
+\[
+z_i^l = \sum_{j}w_{ij}^l a_j^{l-1}+b_i^l,
+\]
+!et
+where the superscript $l-1$ indicates that these are the outputs from layer $l-1$.
+Our cost function at the final layer $l=L$ is now
+!bt
+\[
+\mathcal{C}(\hat{W}) = - \sum_{i=1}^n \left(t_i\log{a_i^L}+(1-t_i)\log{(1-a_i^L)}\right),
+\]
+!et
+where we have defined the targets $t_i$. The derivatives of the cost function with respect to the output $a_i^L$ are then easily calculated and we get
+!bt
+\[
+\frac{\partial \mathcal{C}(\hat{W})}{\partial a_i^L} = \frac{a_i^L-t_i}{a_i^L(1-a_i^L)}.
+\]
+!et
+In case we use another activation function than the logistic one, we need to evaluate other derivatives.
+
+
+!split
+===== The Softmax function =====
+In case we employ the more general case given by the Softmax equation, we need to evaluate the derivative of the activation function with respect to the activation $z_i^l$, that is we need
+!bt
+\[
+\frac{\partial f(z_i^l)}{\partial w_{jk}^l} =
+\frac{\partial f(z_i^l)}{\partial z_j^l} \frac{\partial z_j^l}{\partial w_{jk}^l}= \frac{\partial f(z_i^l)}{\partial z_j^l}a_k^{l-1}.
+\]
+!et
+For the Softmax function we have
+!bt
+\[
+f(z_i^l) = \frac{\exp{(z_i^l)}}{\sum_{m=1}^K\exp{(z_m^l)}}.
+\]
+!et
+Its derivative with respect to $z_j^l$ gives
+!bt
+\[
+\frac{\partial f(z_i^l)}{\partial z_j^l}= f(z_i^l)\left(\delta_{ij}-f(z_j^l)\right),
+\]
+!et
+which in case of the simply binary model reduces to having $i=j$.
+
+!split
+===== Developing a code for doing neural networks with back propagation =====
+
+
+One can identify a set of key steps when using neural networks to solve supervised learning problems:
+
+o Collect and pre-process data
+o Define model and architecture
+o Choose cost function and optimizer
+o Train the model
+o Evaluate model performance on test data
+o Adjust hyperparameters (if necessary, network architecture)
+
+!split
+===== Collect and pre-process data =====
+
+Here we will be using the MNIST dataset, which is readily available through the _scikit-learn_
+package. You may also find it for example "here":"http://yann.lecun.com/exdb/mnist/".
+The *MNIST* (Modified National Institute of Standards and Technology) database is a large database
+of handwritten digits that is commonly used for training various image processing systems.
+The MNIST dataset consists of 70 000 images of size $28\times 28$ pixels, each labeled from 0 to 9.
+The scikit-learn dataset we will use consists of a selection of 1797 images of size $8\times 8$ collected and processed from this database.
+
+To feed data into a feed-forward neural network we need to represent
+the inputs as a design/feature matrix $X = (n_{inputs}, n_{features})$. Each
+row represents an *input*, in this case a handwritten digit, and
+each column represents a *feature*, in this case a pixel. The
+correct answers, also known as *labels* or *targets* are
+represented as a 1D array of integers
+$Y = (n_{inputs}) = (5, 3, 1, 8,...)$.
+
+As an example, say we want to build a neural network using supervised learning to predict Body-Mass Index (BMI) from
+measurements of height (in m)
+and weight (in kg). If we have measurements of 5 people the design/feature matrix could be for example:
+
+$$ X = \begin{bmatrix}
+1.85 & 81\\
+1.71 & 65\\
+1.95 & 103\\
+1.55 & 42\\
+1.63 & 56
+\end{bmatrix} ,$$
+
+and the targets would be:
+
+$$ Y = (23.7, 22.2, 27.1, 17.5, 21.1) $$
+
+Since each input image is a 2D matrix, we need to flatten the image
+(i.e. "unravel" the 2D matrix into a 1D array) to turn the data into a
+design/feature matrix. This means we lose all spatial information in the
+image, such as locality and translational invariance. More complicated
+architectures such as Convolutional Neural Networks can take advantage
+of such information, and are most commonly applied when analyzing
+images.
+
+
+!bc pycod
+# import necessary packages
+import numpy as np
+import matplotlib.pyplot as plt
+from sklearn import datasets
+
+
+# ensure the same random numbers appear every time
+np.random.seed(0)
+
+# display images in notebook
+%matplotlib inline
+plt.rcParams['figure.figsize'] = (12,12)
+
+
+# download MNIST dataset
+digits = datasets.load_digits()
+
+# define inputs and labels
+inputs = digits.images
+labels = digits.target
+
+print("inputs = (n_inputs, pixel_width, pixel_height) = " + str(inputs.shape))
+print("labels = (n_inputs) = " + str(labels.shape))
+
+
+# flatten the image
+# the value -1 means dimension is inferred from the remaining dimensions: 8x8 = 64
+n_inputs = len(inputs)
+inputs = inputs.reshape(n_inputs, -1)
+print("X = (n_inputs, n_features) = " + str(inputs.shape))
+
+
+# choose some random images to display
+indices = np.arange(n_inputs)
+random_indices = np.random.choice(indices, size=5)
+
+for i, image in enumerate(digits.images[random_indices]):
+ plt.subplot(1, 5, i+1)
+ plt.axis('off')
+ plt.imshow(image, cmap=plt.cm.gray_r, interpolation='nearest')
+ plt.title("Label: %d" % digits.target[random_indices[i]])
+plt.show()
+!ec
+
+!split
+===== Train and test datasets =====
+
+Performing analysis before partitioning the dataset is a major error, that can lead to incorrect conclusions.
+
+We will reserve $80 \%$ of our dataset for training and $20 \%$ for testing.
+
+It is important that the train and test datasets are drawn randomly from our dataset, to ensure
+no bias in the sampling.
+Say you are taking measurements of weather data to predict the weather in the coming 5 days.
+You don't want to train your model on measurements taken from the hours 00.00 to 12.00, and then test it on data
+collected from 12.00 to 24.00.
+
+
+!bc pycod
+from sklearn.model_selection import train_test_split
+
+# one-liner from scikit-learn library
+train_size = 0.8
+test_size = 1 - train_size
+X_train, X_test, Y_train, Y_test = train_test_split(inputs, labels, train_size=train_size,
+ test_size=test_size)
+
+# equivalently in numpy
+def train_test_split_numpy(inputs, labels, train_size, test_size):
+ n_inputs = len(inputs)
+ inputs_shuffled = inputs.copy()
+ labels_shuffled = labels.copy()
+
+ np.random.shuffle(inputs_shuffled)
+ np.random.shuffle(labels_shuffled)
+
+ train_end = int(n_inputs*train_size)
+ X_train, X_test = inputs_shuffled[:train_end], inputs_shuffled[train_end:]
+ Y_train, Y_test = labels_shuffled[:train_end], labels_shuffled[train_end:]
+
+ return X_train, X_test, Y_train, Y_test
+
+#X_train, X_test, Y_train, Y_test = train_test_split_numpy(inputs, labels, train_size, test_size)
+
+print("Number of training images: " + str(len(X_train)))
+print("Number of test images: " + str(len(X_test)))
+!ec
+
+!split
+===== Define model and architecture =====
+
+Our simple feed-forward neural network will consist of an *input* layer, a single *hidden* layer and an *output* layer. The activation $y$ of each neuron is a weighted sum of inputs, passed through an activation function. In case of the simple perceptron model we have
+
+$$ z = \sum_{i=1}^n w_i a_i ,$$
+
+$$ y = f(z) ,$$
+
+where $f$ is the activation function, $a_i$ represents input from neuron $i$ in the preceding layer
+and $w_i$ is the weight to input $i$.
+The activation of the neurons in the input layer is just the features (e.g. a pixel value).
+
+The simplest activation function for a neuron is the *Heaviside* function:
+
+$$ f(z) =
+\begin{cases}
+1, & z > 0\\
+0, & \text{otherwise}
+\end{cases}
+$$
+
+A feed-forward neural network with this activation is known as a *perceptron*.
+For a binary classifier (i.e. two classes, 0 or 1, dog or not-dog) we can also use this in our output layer.
+This activation can be generalized to $k$ classes (using e.g. the *one-against-all* strategy),
+and we call these architectures *multiclass perceptrons*.
+
+However, it is now common to use the terms Single Layer Perceptron (SLP) (1 hidden layer) and
+Multilayer Perceptron (MLP) (2 or more hidden layers) to refer to feed-forward neural networks with any activation function.
+
+Typical choices for activation functions include the sigmoid function, hyperbolic tangent, and Rectified Linear Unit (ReLU).
+We will be using the sigmoid function $\sigma(x)$:
+
+$$ f(x) = \sigma(x) = \frac{1}{1 + e^{-x}} ,$$
+
+which is inspired by probability theory (see logistic regression) and was most commonly used until about 2011. See the discussion below concerning other activation functions.
+
+!split
+===== Layers =====
+
+* Input
+Since each input image has 8x8 = 64 pixels or features, we have an input layer of 64 neurons.
+
+* Hidden layer
+We will use 50 neurons in the hidden layer receiving input from the neurons in the input layer.
+Since each neuron in the hidden layer is connected to the 64 inputs we have 64x50 = 3200 weights to the hidden layer.
+
+* Output
+If we were building a binary classifier, it would be sufficient with a single neuron in the output layer,
+which could output 0 or 1 according to the Heaviside function. This would be an example of a *hard* classifier, meaning it outputs the class of the input directly. However, if we are dealing with noisy data it is often beneficial to use a *soft* classifier, which outputs the probability of being in class 0 or 1.
+
+For a soft binary classifier, we could use a single neuron and interpret the output as either being the probability of being in class 0 or the probability of being in class 1. Alternatively we could use 2 neurons, and interpret each neuron as the probability of being in each class.
+
+Since we are doing multiclass classification, with 10 categories, it is natural to use 10 neurons in the output layer. We number the neurons $j = 0,1,...,9$. The activation of each output neuron $j$ will be according to the *softmax* function:
+
+$$ P(\text{class $j$} \mid \text{input $\hat{a}$}) = \frac{\exp{(\hat{a}^T \hat{w}_j)}}
+{\sum_{c=0}^{9} \exp{(\hat{a}^T \hat{w}_c)}} ,$$
+
+i.e. each neuron $j$ outputs the probability of being in class $j$ given an input from the hidden layer $\hat{a}$, with $\hat{w}_j$ the weights of neuron $j$ to the inputs.
+The denominator is a normalization factor to ensure the outputs (probabilities) sum up to 1.
+The exponent is just the weighted sum of inputs as before:
+
+$$ z_j = \sum_{i=1}^n w_ {ij} a_i+b_j.$$
+
+Since each neuron in the output layer is connected to the 50 inputs from the hidden layer we have 50x10 = 500
+weights to the output layer.
+
+!split
+===== Weights and biases =====
+
+Typically weights are initialized with small values distributed around zero, drawn from a uniform
+or normal distribution. Setting all weights to zero means all neurons give the same output, making the network useless.
+
+Adding a bias value to the weighted sum of inputs allows the neural network to represent a greater range
+of values. Without it, any input with the value 0 will be mapped to zero (before being passed through the activation). The bias unit has an output of 1, and a weight to each neuron $j$, $b_j$:
+
+$$ z_j = \sum_{i=1}^n w_ {ij} a_i + b_j.$$
+
+The bias weights $\hat{b}$ are often initialized to zero, but a small value like $0.01$ ensures all neurons have some output which can be backpropagated in the first training cycle.
+!bc pycod
+# building our neural network
+
+n_inputs, n_features = X_train.shape
+n_hidden_neurons = 50
+n_categories = 10
+
+# we make the weights normally distributed using numpy.random.randn
+
+# weights and bias in the hidden layer
+hidden_weights = np.random.randn(n_features, n_hidden_neurons)
+hidden_bias = np.zeros(n_hidden_neurons) + 0.01
+
+# weights and bias in the output layer
+output_weights = np.random.randn(n_hidden_neurons, n_categories)
+output_bias = np.zeros(n_categories) + 0.01
+!ec
+
+!split
+===== Feed-forward pass =====
+
+Denote $F$ the number of features, $H$ the number of hidden neurons and $C$ the number of categories.
+For each input image we calculate a weighted sum of input features (pixel values) to each neuron $j$ in the hidden layer $l$:
+
+$$ z_{j}^{l} = \sum_{i=1}^{F} w_{ij}^{l} x_i + b_{j}^{l},$$
+
+this is then passed through our activation function
+
+$$ a_{j}^{l} = f(z_{j}^{l}) .$$
+
+We calculate a weighted sum of inputs (activations in the hidden layer) to each neuron $j$ in the output layer:
+
+$$ z_{j}^{L} = \sum_{i=1}^{H} w_{ij}^{L} a_{i}^{l} + b_{j}^{L}.$$
+
+Finally we calculate the output of neuron $j$ in the output layer using the softmax function:
+
+$$ a_{j}^{L} = \frac{\exp{(z_j^{L})}}
+{\sum_{c=0}^{C-1} \exp{(z_c^{L})}} .$$
+
+!split
+===== Matrix multiplications =====
+
+Since our data has the dimensions $X = (n_{inputs}, n_{features})$ and our weights to the hidden
+layer have the dimensions
+$W_{hidden} = (n_{features}, n_{hidden})$,
+we can easily feed the network all our training data in one go by taking the matrix product
+
+$$ X W^{h} = (n_{inputs}, n_{hidden}),$$
+
+and obtain a matrix that holds the weighted sum of inputs to the hidden layer
+for each input image and each hidden neuron.
+We also add the bias to obtain a matrix of weighted sums to the hidden layer $Z^{h}$:
+
+$$ \hat{z}^{l} = \hat{X} \hat{W}^{l} + \hat{b}^{l} ,$$
+
+meaning the same bias (1D array with size equal number of hidden neurons) is added to each input image.
+This is then passed through the activation:
+
+$$ \hat{a}^{l} = f(\hat{z}^l) .$$
+
+This is fed to the output layer:
+
+$$ \hat{z}^{L} = \hat{a}^{L} \hat{W}^{L} + \hat{b}^{L} .$$
+
+Finally we receive our output values for each image and each category by passing it through the softmax function:
+
+$$ output = softmax (\hat{z}^{L}) = (n_{inputs}, n_{categories}) .$$
+
+
+!bc pycod
+# setup the feed-forward pass, subscript h = hidden layer
+
+def sigmoid(x):
+ return 1/(1 + np.exp(-x))
+
+def feed_forward(X):
+ # weighted sum of inputs to the hidden layer
+ z_h = np.matmul(X, hidden_weights) + hidden_bias
+ # activation in the hidden layer
+ a_h = sigmoid(z_h)
+
+ # weighted sum of inputs to the output layer
+ z_o = np.matmul(a_h, output_weights) + output_bias
+ # softmax output
+ # axis 0 holds each input and axis 1 the probabilities of each category
+ exp_term = np.exp(z_o)
+ probabilities = exp_term / np.sum(exp_term, axis=1, keepdims=True)
+
+ return probabilities
+
+probabilities = feed_forward(X_train)
+print("probabilities = (n_inputs, n_categories) = " + str(probabilities.shape))
+print("probability that image 0 is in category 0,1,2,...,9 = \n" + str(probabilities[0]))
+print("probabilities sum up to: " + str(probabilities[0].sum()))
+print()
+
+# we obtain a prediction by taking the class with the highest likelihood
+def predict(X):
+ probabilities = feed_forward(X)
+ return np.argmax(probabilities, axis=1)
+
+predictions = predict(X_train)
+print("predictions = (n_inputs) = " + str(predictions.shape))
+print("prediction for image 0: " + str(predictions[0]))
+print("correct label for image 0: " + str(Y_train[0]))
+!ec
+
+!split
+===== Choose cost function and optimizer =====
+
+To measure how well our neural network is doing we need to introduce a cost function.
+We will call the function that gives the error of a single sample output the *loss* function, and the function
+that gives the total error of our network across all samples the *cost* function.
+A typical choice for multiclass classification is the *cross-entropy* loss, also known as the negative log likelihood.
+
+In *multiclass* classification it is common to treat each integer label as a so called *one-hot* vector:
+
+$$ y = 5 \quad \rightarrow \quad \hat{y} = (0, 0, 0, 0, 0, 1, 0, 0, 0, 0) ,$$
+
+
+$$ y = 1 \quad \rightarrow \quad \hat{y} = (0, 1, 0, 0, 0, 0, 0, 0, 0, 0) ,$$
+
+
+i.e. a binary bit string of length $C$, where $C = 10$ is the number of classes in the MNIST dataset.
+
+Let $y_{ic}$ denote the $c$-th component of the $i$-th one-hot vector.
+We define the cost function $\mathcal{C}$ as a sum over the cross-entropy loss for each point $\hat{x}_i$ in the dataset.
+
+In the one-hot representation only one of the terms in the loss function is non-zero, namely the
+probability of the correct category $c'$
+(i.e. the category $c'$ such that $y_{ic'} = 1$). This means that the cross entropy loss only punishes you for how wrong
+you got the correct label. The probability of category $c$ is given by the softmax function. The vector $\hat{\theta}$ represents the parameters of our network, i.e. all the weights and biases.
+
+
+!split
+===== Optimizing the cost function =====
+
+The network is trained by finding the weights and biases that minimize the cost function. One of the most widely used classes of methods is *gradient descent* and its generalizations. The idea behind gradient descent
+is simply to adjust the weights in the direction where the gradient of the cost function is large and negative. This ensures we flow toward a *local* minimum of the cost function.
+Each parameter $\theta$ is iteratively adjusted according to the rule
+
+$$ \theta_{i+1} = \theta_i - \eta \nabla \mathcal{C}(\theta_i) ,$$
+
+where $\eta$ is known as the *learning rate*, which controls how big a step we take towards the minimum.
+This update can be repeated for any number of iterations, or until we are satisfied with the result.
+
+A simple and effective improvement is a variant called *Batch Gradient Descent*.
+Instead of calculating the gradient on the whole dataset, we calculate an approximation of the gradient
+on a subset of the data called a *minibatch*.
+If there are $N$ data points and we have a minibatch size of $M$, the total number of batches
+is $N/M$.
+We denote each minibatch $B_k$, with $k = 1, 2,...,N/M$. The gradient then becomes:
+
+$$ \nabla \mathcal{C}(\theta) = \frac{1}{N} \sum_{i=1}^N \nabla \mathcal{L}_i(\theta) \quad \rightarrow \quad
+\frac{1}{M} \sum_{i \in B_k} \nabla \mathcal{L}_i(\theta) ,$$
+
+i.e. instead of averaging the loss over the entire dataset, we average over a minibatch.
+
+This has two important benefits:
+o Introducing stochasticity decreases the chance that the algorithm becomes stuck in a local minima.
+o It significantly speeds up the calculation, since we do not have to use the entire dataset to calculate the gradient.
+
+The various optmization methods, with codes and algorithms, are discussed in our lectures on "Gradient descent approaches":"https://compphysics.github.io/MachineLearning/doc/pub/Splines/html/Splines-bs.html".
+
+!split
+===== Regularization =====
+
+It is common to add an extra term to the cost function, proportional
+to the size of the weights. This is equivalent to constraining the
+size of the weights, so that they do not grow out of control.
+Constraining the size of the weights means that the weights cannot
+grow arbitrarily large to fit the training data, and in this way
+reduces *overfitting*.
+
+We will measure the size of the weights using the so called *L2-norm*, meaning our cost function becomes:
+
+$$ \mathcal{C}(\theta) = \frac{1}{N} \sum_{i=1}^N \mathcal{L}_i(\theta) \quad \rightarrow \quad
+\frac{1}{N} \sum_{i=1}^N \mathcal{L}_i(\theta) + \lambda \lvert \lvert \hat{w} \rvert \rvert_2^2
+= \frac{1}{N} \sum_{i=1}^N \mathcal{L}(\theta) + \lambda \sum_{ij} w_{ij}^2,$$
+
+i.e. we sum up all the weights squared. The factor $\lambda$ is known as a regularization parameter.
+
+
+In order to train the model, we need to calculate the derivative of
+the cost function with respect to every bias and weight in the
+network. In total our network has $(64 + 1)\times 50=3250$ weights in
+the hidden layer and $(50 + 1)\times 10=510$ weights to the output
+layer ($+1$ for the bias), and the gradient must be calculated for
+every parameter. We use the *backpropagation* algorithm discussed
+above. This is a clever use of the chain rule that allows us to
+calculate the gradient efficently.
+
+
+!split
+===== Matrix multiplication =====
+
+To more efficently train our network these equations are implemented using matrix operations.
+The error in the output layer is calculated simply as, with $\hat{t}$ being our targets,
+
+$$ \delta_L = \hat{t} - \hat{y} = (n_{inputs}, n_{categories}) .$$
+
+The gradient for the output weights is calculated as
+
+$$ \nabla W_{L} = \hat{a}^T \delta_L = (n_{hidden}, n_{categories}) ,$$
+
+where $\hat{a} = (n_{inputs}, n_{hidden})$. This simply means that we are summing up the gradients for each input.
+Since we are going backwards we have to transpose the activation matrix.
+
+The gradient with respect to the output bias is then
+
+$$ \nabla \hat{b}_{L} = \sum_{i=1}^{n_{inputs}} \delta_L = (n_{categories}) .$$
+
+The error in the hidden layer is
+
+$$ \Delta_h = \delta_L W_{L}^T \circ f'(z_{h}) = \delta_L W_{L}^T \circ a_{h} \circ (1 - a_{h}) = (n_{inputs}, n_{hidden}) ,$$
+
+where $f'(a_{h})$ is the derivative of the activation in the hidden layer. The matrix products mean
+that we are summing up the products for each neuron in the output layer. The symbol $\circ$ denotes
+the *Hadamard product*, meaning element-wise multiplication.
+
+This again gives us the gradients in the hidden layer:
+
+$$ \nabla W_{h} = X^T \delta_h = (n_{features}, n_{hidden}) ,$$
+
+$$ \nabla b_{h} = \sum_{i=1}^{n_{inputs}} \delta_h = (n_{hidden}) .$$
+
+
+!bc pycod
+# to categorical turns our integer vector into a onehot representation
+from sklearn.metrics import accuracy_score
+
+# one-hot in numpy
+def to_categorical_numpy(integer_vector):
+ n_inputs = len(integer_vector)
+ n_categories = np.max(integer_vector) + 1
+ onehot_vector = np.zeros((n_inputs, n_categories))
+ onehot_vector[range(n_inputs), integer_vector] = 1
+
+ return onehot_vector
+
+#Y_train_onehot, Y_test_onehot = to_categorical(Y_train), to_categorical(Y_test)
+Y_train_onehot, Y_test_onehot = to_categorical_numpy(Y_train), to_categorical_numpy(Y_test)
+
+def feed_forward_train(X):
+ # weighted sum of inputs to the hidden layer
+ z_h = np.matmul(X, hidden_weights) + hidden_bias
+ # activation in the hidden layer
+ a_h = sigmoid(z_h)
+
+ # weighted sum of inputs to the output layer
+ z_o = np.matmul(a_h, output_weights) + output_bias
+ # softmax output
+ # axis 0 holds each input and axis 1 the probabilities of each category
+ exp_term = np.exp(z_o)
+ probabilities = exp_term / np.sum(exp_term, axis=1, keepdims=True)
+
+ # for backpropagation need activations in hidden and output layers
+ return a_h, probabilities
+
+def backpropagation(X, Y):
+ a_h, probabilities = feed_forward_train(X)
+
+ # error in the output layer
+ error_output = probabilities - Y
+ # error in the hidden layer
+ error_hidden = np.matmul(error_output, output_weights.T) * a_h * (1 - a_h)
+
+ # gradients for the output layer
+ output_weights_gradient = np.matmul(a_h.T, error_output)
+ output_bias_gradient = np.sum(error_output, axis=0)
+
+ # gradient for the hidden layer
+ hidden_weights_gradient = np.matmul(X.T, error_hidden)
+ hidden_bias_gradient = np.sum(error_hidden, axis=0)
+
+ return output_weights_gradient, output_bias_gradient, hidden_weights_gradient, hidden_bias_gradient
+
+print("Old accuracy on training data: " + str(accuracy_score(predict(X_train), Y_train)))
+
+eta = 0.01
+lmbd = 0.01
+for i in range(1000):
+ # calculate gradients
+ dWo, dBo, dWh, dBh = backpropagation(X_train, Y_train_onehot)
+
+ # regularization term gradients
+ dWo += lmbd * output_weights
+ dWh += lmbd * hidden_weights
+
+ # update weights and biases
+ output_weights -= eta * dWo
+ output_bias -= eta * dBo
+ hidden_weights -= eta * dWh
+ hidden_bias -= eta * dBh
+
+print("New accuracy on training data: " + str(accuracy_score(predict(X_train), Y_train)))
+!ec
+
+!split
+===== Improving performance =====
+
+As we can see the network does not seem to be learning at all. It seems to be just guessing the label for each image.
+In order to obtain a network that does something useful, we will have to do a bit more work.
+
+The choice of *hyperparameters* such as learning rate and regularization parameter is hugely influential for the performance of the network. Typically a *grid-search* is performed, wherein we test different hyperparameters separated by orders of magnitude. For example we could test the learning rates $\eta = 10^{-6}, 10^{-5},...,10^{-1}$ with different regularization parameters $\lambda = 10^{-6},...,10^{-0}$.
+
+Next, we haven't implemented minibatching yet, which introduces stochasticity and is though to act as an important regularizer on the weights. We call a feed-forward + backward pass with a minibatch an *iteration*, and a full training period
+going through the entire dataset ($n/M$ batches) an *epoch*.
+
+If this does not improve network performance, you may want to consider altering the network architecture, adding more neurons or hidden layers.
+Andrew Ng goes through some of these considerations in this "video":"https://youtu.be/F1ka6a13S9I". You can find a summary of the video "here":"https://kevinzakka.github.io/2016/09/26/applying-deep-learning/".
+
+!split
+===== Full object-oriented implementation =====
+
+It is very natural to think of the network as an object, with specific instances of the network
+being realizations of this object with different hyperparameters. An implementation using Python classes provides a clean structure and interface, and the full implementation of our neural network is given below.
+
+
+!bc pycod
+class NeuralNetwork:
+ def __init__(
+ self,
+ X_data,
+ Y_data,
+ n_hidden_neurons=50,
+ n_categories=10,
+ epochs=10,
+ batch_size=100,
+ eta=0.1,
+ lmbd=0.0):
+
+ self.X_data_full = X_data
+ self.Y_data_full = Y_data
+
+ self.n_inputs = X_data.shape[0]
+ self.n_features = X_data.shape[1]
+ self.n_hidden_neurons = n_hidden_neurons
+ self.n_categories = n_categories
+
+ self.epochs = epochs
+ self.batch_size = batch_size
+ self.iterations = self.n_inputs // self.batch_size
+ self.eta = eta
+ self.lmbd = lmbd
+
+ self.create_biases_and_weights()
+
+ def create_biases_and_weights(self):
+ self.hidden_weights = np.random.randn(self.n_features, self.n_hidden_neurons)
+ self.hidden_bias = np.zeros(self.n_hidden_neurons) + 0.01
+
+ self.output_weights = np.random.randn(self.n_hidden_neurons, self.n_categories)
+ self.output_bias = np.zeros(self.n_categories) + 0.01
+
+ def feed_forward(self):
+ # feed-forward for training
+ self.z_h = np.matmul(self.X_data, self.hidden_weights) + self.hidden_bias
+ self.a_h = sigmoid(self.z_h)
+
+ self.z_o = np.matmul(self.a_h, self.output_weights) + self.output_bias
+
+ exp_term = np.exp(self.z_o)
+ self.probabilities = exp_term / np.sum(exp_term, axis=1, keepdims=True)
+
+ def feed_forward_out(self, X):
+ # feed-forward for output
+ z_h = np.matmul(X, self.hidden_weights) + self.hidden_bias
+ a_h = sigmoid(z_h)
+
+ z_o = np.matmul(a_h, self.output_weights) + self.output_bias
+
+ exp_term = np.exp(z_o)
+ probabilities = exp_term / np.sum(exp_term, axis=1, keepdims=True)
+ return probabilities
+
+ def backpropagation(self):
+ error_output = self.probabilities - self.Y_data
+ error_hidden = np.matmul(error_output, self.output_weights.T) * self.a_h * (1 - self.a_h)
+
+ self.output_weights_gradient = np.matmul(self.a_h.T, error_output)
+ self.output_bias_gradient = np.sum(error_output, axis=0)
+
+ self.hidden_weights_gradient = np.matmul(self.X_data.T, error_hidden)
+ self.hidden_bias_gradient = np.sum(error_hidden, axis=0)
+
+ if self.lmbd > 0.0:
+ self.output_weights_gradient += self.lmbd * self.output_weights
+ self.hidden_weights_gradient += self.lmbd * self.hidden_weights
+
+ self.output_weights -= self.eta * self.output_weights_gradient
+ self.output_bias -= self.eta * self.output_bias_gradient
+ self.hidden_weights -= self.eta * self.hidden_weights_gradient
+ self.hidden_bias -= self.eta * self.hidden_bias_gradient
+
+ def predict(self, X):
+ probabilities = self.feed_forward_out(X)
+ return np.argmax(probabilities, axis=1)
+
+ def predict_probabilities(self, X):
+ probabilities = self.feed_forward_out(X)
+ return probabilities
+
+ def train(self):
+ data_indices = np.arange(self.n_inputs)
+
+ for i in range(self.epochs):
+ for j in range(self.iterations):
+ # pick datapoints with replacement
+ chosen_datapoints = np.random.choice(
+ data_indices, size=self.batch_size, replace=False
+ )
+
+ # minibatch training data
+ self.X_data = self.X_data_full[chosen_datapoints]
+ self.Y_data = self.Y_data_full[chosen_datapoints]
+
+ self.feed_forward()
+ self.backpropagation()
+!ec
+
+!split
+===== Evaluate model performance on test data =====
+
+To measure the performance of our network we evaluate how well it does it data it has never seen before, i.e. the test data.
+We measure the performance of the network using the *accuracy* score.
+The accuracy is as you would expect just the number of images correctly labeled divided by the total number of images. A perfect classifier will have an accuracy score of $1$.
+
+$$ \text{Accuracy} = \frac{\sum_{i=1}^n I(\hat{y}_i = y_i)}{n} ,$$
+
+where $I$ is the indicator function, $1$ if $\hat{y}_i = y_i$ and $0$ otherwise.
+
+
+!bc pycod
+epochs = 100
+batch_size = 100
+
+dnn = NeuralNetwork(X_train, Y_train_onehot, eta=eta, lmbd=lmbd, epochs=epochs, batch_size=batch_size,
+ n_hidden_neurons=n_hidden_neurons, n_categories=n_categories)
+dnn.train()
+test_predict = dnn.predict(X_test)
+
+# accuracy score from scikit library
+print("Accuracy score on test set: ", accuracy_score(Y_test, test_predict))
+
+# equivalent in numpy
+def accuracy_score_numpy(Y_test, Y_pred):
+ return np.sum(Y_test == Y_pred) / len(Y_test)
+
+#print("Accuracy score on test set: ", accuracy_score_numpy(Y_test, test_predict))
+!ec
+
+!split
+===== Adjust hyperparameters =====
+
+We now perform a grid search to find the optimal hyperparameters for the network.
+Note that we are only using 1 layer with 50 neurons, and human performance is estimated to be around $98\%$ ($2\%$ error rate).
+
+!bc pycod
+eta_vals = np.logspace(-5, 1, 7)
+lmbd_vals = np.logspace(-5, 1, 7)
+# store the models for later use
+DNN_numpy = np.zeros((len(eta_vals), len(lmbd_vals)), dtype=object)
+
+# grid search
+for i, eta in enumerate(eta_vals):
+ for j, lmbd in enumerate(lmbd_vals):
+ dnn = NeuralNetwork(X_train, Y_train_onehot, eta=eta, lmbd=lmbd, epochs=epochs, batch_size=batch_size,
+ n_hidden_neurons=n_hidden_neurons, n_categories=n_categories)
+ dnn.train()
+
+ DNN_numpy[i][j] = dnn
+
+ test_predict = dnn.predict(X_test)
+
+ print("Learning rate = ", eta)
+ print("Lambda = ", lmbd)
+ print("Accuracy score on test set: ", accuracy_score(Y_test, test_predict))
+ print()
+!ec
+
+!split
+===== Visualization =====
+
+!bc pycod
+# visual representation of grid search
+# uses seaborn heatmap, you can also do this with matplotlib imshow
+import seaborn as sns
+
+sns.set()
+
+train_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+test_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+
+for i in range(len(eta_vals)):
+ for j in range(len(lmbd_vals)):
+ dnn = DNN_numpy[i][j]
+
+ train_pred = dnn.predict(X_train)
+ test_pred = dnn.predict(X_test)
+
+ train_accuracy[i][j] = accuracy_score(Y_train, train_pred)
+ test_accuracy[i][j] = accuracy_score(Y_test, test_pred)
+
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(train_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Training Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(test_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Test Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+!ec
+
+!split
+===== scikit-learn implementation =====
+
+_scikit-learn_ focuses more
+on traditional machine learning methods, such as regression,
+clustering, decision trees, etc. As such, it has only two types of
+neural networks: Multi Layer Perceptron outputting continuous values,
+*MPLRegressor*, and Multi Layer Perceptron outputting labels,
+*MLPClassifier*. We will see how simple it is to use these classes.
+
+_scikit-learn_ implements a few improvements from our neural network,
+such as early stopping, a varying learning rate, different
+optimization methods, etc. We would therefore expect a better
+performance overall.
+
+!bc pycod
+from sklearn.neural_network import MLPClassifier
+# store models for later use
+DNN_scikit = np.zeros((len(eta_vals), len(lmbd_vals)), dtype=object)
+
+for i, eta in enumerate(eta_vals):
+ for j, lmbd in enumerate(lmbd_vals):
+ dnn = MLPClassifier(hidden_layer_sizes=(n_hidden_neurons), activation='logistic',
+ alpha=lmbd, learning_rate_init=eta, max_iter=epochs)
+ dnn.fit(X_train, Y_train)
+
+ DNN_scikit[i][j] = dnn
+
+ print("Learning rate = ", eta)
+ print("Lambda = ", lmbd)
+ print("Accuracy score on test set: ", dnn.score(X_test, Y_test))
+ print()
+!ec
+
+
+!split
+===== Visualization =====
+!bc pycod
+# optional
+# visual representation of grid search
+# uses seaborn heatmap, could probably do this in matplotlib
+import seaborn as sns
+
+sns.set()
+
+train_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+test_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+
+for i in range(len(eta_vals)):
+ for j in range(len(lmbd_vals)):
+ dnn = DNN_scikit[i][j]
+
+ train_pred = dnn.predict(X_train)
+ test_pred = dnn.predict(X_test)
+
+ train_accuracy[i][j] = accuracy_score(Y_train, train_pred)
+ test_accuracy[i][j] = accuracy_score(Y_test, test_pred)
+
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(train_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Training Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(test_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Test Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+!ec
+
+
+!split
+===== Building neural networks in Tensorflow and Keras =====
+
+Now we want to build on the experience gained from our neural network implementation in NumPy and scikit-learn
+and use it to construct a neural network in Tensorflow. Once we have constructed a neural network in NumPy
+and Tensorflow, building one in Keras is really quite trivial, though the performance may suffer.
+
+In our previous example we used only one hidden layer, and in this we will use two. From this it should be quite
+clear how to build one using an arbitrary number of hidden layers, using data structures such as Python lists or
+NumPy arrays.
+
+!split
+===== Tensorflow =====
+
+Tensorflow is an open source library machine learning library
+developed by the Google Brain team for internal use. It was released
+under the Apache 2.0 open source license in November 9, 2015.
+
+Tensorflow is a computational framework that allows you to construct
+machine learning models at different levels of abstraction, from
+high-level, object-oriented APIs like Keras, down to the C++ kernels
+that Tensorflow is built upon. The higher levels of abstraction are
+simpler to use, but less flexible, and our choice of implementation
+should reflect the problems we are trying to solve.
+
+"Tensorflow uses":"https://www.tensorflow.org/guide/graphs" so-called graphs to represent your computation
+in terms of the dependencies between individual operations, such that you first build a Tensorflow *graph*
+to represent your model, and then create a Tensorflow *session* to run the graph.
+
+In this guide we will analyze the same data as we did in our NumPy and
+scikit-learn tutorial, gathered from the MNIST database of images. We
+will give an introduction to the lower level Python Application
+Program Interfaces (APIs), and see how we use them to build our graph.
+Then we will build (effectively) the same graph in Keras, to see just
+how simple solving a machine learning problem can be.
+
+To install tensorflow on Unix/Linux systems, use pip as
+!bc pycod
+pip3 install tensorflow
+!ec
+and/or if you use _anaconda_, just write (or install from the graphical user interface)
+!bc pycod
+conda install tensorflow
+!ec
+
+!split
+===== Collect and pre-process data =====
+
+!bc pycod
+# import necessary packages
+import numpy as np
+import matplotlib.pyplot as plt
+from sklearn import datasets
+
+
+# ensure the same random numbers appear every time
+np.random.seed(0)
+
+# display images in notebook
+%matplotlib inline
+plt.rcParams['figure.figsize'] = (12,12)
+
+
+# download MNIST dataset
+digits = datasets.load_digits()
+
+# define inputs and labels
+inputs = digits.images
+labels = digits.target
+
+print("inputs = (n_inputs, pixel_width, pixel_height) = " + str(inputs.shape))
+print("labels = (n_inputs) = " + str(labels.shape))
+
+
+# flatten the image
+# the value -1 means dimension is inferred from the remaining dimensions: 8x8 = 64
+n_inputs = len(inputs)
+inputs = inputs.reshape(n_inputs, -1)
+print("X = (n_inputs, n_features) = " + str(inputs.shape))
+
+
+# choose some random images to display
+indices = np.arange(n_inputs)
+random_indices = np.random.choice(indices, size=5)
+
+for i, image in enumerate(digits.images[random_indices]):
+ plt.subplot(1, 5, i+1)
+ plt.axis('off')
+ plt.imshow(image, cmap=plt.cm.gray_r, interpolation='nearest')
+ plt.title("Label: %d" % digits.target[random_indices[i]])
+plt.show()
+!ec
+
+!bc pycod
+from keras.utils import to_categorical
+from sklearn.model_selection import train_test_split
+
+# one-hot representation of labels
+labels = to_categorical(labels)
+
+# split into train and test data
+train_size = 0.8
+test_size = 1 - train_size
+X_train, X_test, Y_train, Y_test = train_test_split(inputs, labels, train_size=train_size,
+ test_size=test_size)
+!ec
+
+!split
+===== Using TensorFlow backend =====
+
+o Define model and architecture
+o Choose cost function and optimizer
+
+!bc pycod
+import tensorflow as tf
+
+class NeuralNetworkTensorflow:
+ def __init__(
+ self,
+ X_train,
+ Y_train,
+ X_test,
+ Y_test,
+ n_neurons_layer1=100,
+ n_neurons_layer2=50,
+ n_categories=2,
+ epochs=10,
+ batch_size=100,
+ eta=0.1,
+ lmbd=0.0):
+
+ # keep track of number of steps
+ self.global_step = tf.Variable(0, dtype=tf.int32, trainable=False, name='global_step')
+
+ self.X_train = X_train
+ self.Y_train = Y_train
+ self.X_test = X_test
+ self.Y_test = Y_test
+
+ self.n_inputs = X_train.shape[0]
+ self.n_features = X_train.shape[1]
+ self.n_neurons_layer1 = n_neurons_layer1
+ self.n_neurons_layer2 = n_neurons_layer2
+ self.n_categories = n_categories
+
+ self.epochs = epochs
+ self.batch_size = batch_size
+ self.iterations = self.n_inputs // self.batch_size
+ self.eta = eta
+ self.lmbd = lmbd
+
+ # build network piece by piece
+ # name scopes (with) are used to enforce creation of new variables
+ # https://www.tensorflow.org/guide/variables
+ self.create_placeholders()
+ self.create_DNN()
+ self.create_loss()
+ self.create_optimiser()
+ self.create_accuracy()
+
+ def create_placeholders(self):
+ # placeholders are fine here, but "Datasets" are the preferred method
+ # of streaming data into a model
+ with tf.name_scope('data'):
+ self.X = tf.placeholder(tf.float32, shape=(None, self.n_features), name='X_data')
+ self.Y = tf.placeholder(tf.float32, shape=(None, self.n_categories), name='Y_data')
+
+ def create_DNN(self):
+ with tf.name_scope('DNN'):
+ # the weights are stored to calculate regularization loss later
+
+ # Fully connected layer 1
+ self.W_fc1 = self.weight_variable([self.n_features, self.n_neurons_layer1], name='fc1', dtype=tf.float32)
+ b_fc1 = self.bias_variable([self.n_neurons_layer1], name='fc1', dtype=tf.float32)
+ a_fc1 = tf.nn.sigmoid(tf.matmul(self.X, self.W_fc1) + b_fc1)
+
+ # Fully connected layer 2
+ self.W_fc2 = self.weight_variable([self.n_neurons_layer1, self.n_neurons_layer2], name='fc2', dtype=tf.float32)
+ b_fc2 = self.bias_variable([self.n_neurons_layer2], name='fc2', dtype=tf.float32)
+ a_fc2 = tf.nn.sigmoid(tf.matmul(a_fc1, self.W_fc2) + b_fc2)
+
+ # Output layer
+ self.W_out = self.weight_variable([self.n_neurons_layer2, self.n_categories], name='out', dtype=tf.float32)
+ b_out = self.bias_variable([self.n_categories], name='out', dtype=tf.float32)
+ self.z_out = tf.matmul(a_fc2, self.W_out) + b_out
+
+ def create_loss(self):
+ with tf.name_scope('loss'):
+ softmax_loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits_v2(labels=self.Y, logits=self.z_out))
+
+ regularizer_loss_fc1 = tf.nn.l2_loss(self.W_fc1)
+ regularizer_loss_fc2 = tf.nn.l2_loss(self.W_fc2)
+ regularizer_loss_out = tf.nn.l2_loss(self.W_out)
+ regularizer_loss = self.lmbd*(regularizer_loss_fc1 + regularizer_loss_fc2 + regularizer_loss_out)
+
+ self.loss = softmax_loss + regularizer_loss
+
+ def create_accuracy(self):
+ with tf.name_scope('accuracy'):
+ probabilities = tf.nn.softmax(self.z_out)
+ predictions = tf.argmax(probabilities, axis=1)
+ labels = tf.argmax(self.Y, axis=1)
+
+ correct_predictions = tf.equal(predictions, labels)
+ correct_predictions = tf.cast(correct_predictions, tf.float32)
+ self.accuracy = tf.reduce_mean(correct_predictions)
+
+ def create_optimiser(self):
+ with tf.name_scope('optimizer'):
+ self.optimizer = tf.train.GradientDescentOptimizer(learning_rate=self.eta).minimize(self.loss, global_step=self.global_step)
+
+ def weight_variable(self, shape, name='', dtype=tf.float32):
+ initial = tf.truncated_normal(shape, stddev=0.1)
+ return tf.Variable(initial, name=name, dtype=dtype)
+
+ def bias_variable(self, shape, name='', dtype=tf.float32):
+ initial = tf.constant(0.1, shape=shape)
+ return tf.Variable(initial, name=name, dtype=dtype)
+
+ def fit(self):
+ data_indices = np.arange(self.n_inputs)
+
+ with tf.Session() as sess:
+ sess.run(tf.global_variables_initializer())
+ for i in range(self.epochs):
+ for j in range(self.iterations):
+ chosen_datapoints = np.random.choice(data_indices, size=self.batch_size, replace=False)
+ batch_X, batch_Y = self.X_train[chosen_datapoints], self.Y_train[chosen_datapoints]
+
+ sess.run([DNN.loss, DNN.optimizer],
+ feed_dict={DNN.X: batch_X,
+ DNN.Y: batch_Y})
+ accuracy = sess.run(DNN.accuracy,
+ feed_dict={DNN.X: batch_X,
+ DNN.Y: batch_Y})
+ step = sess.run(DNN.global_step)
+
+ self.train_loss, self.train_accuracy = sess.run([DNN.loss, DNN.accuracy],
+ feed_dict={DNN.X: self.X_train,
+ DNN.Y: self.Y_train})
+
+ self.test_loss, self.test_accuracy = sess.run([DNN.loss, DNN.accuracy],
+ feed_dict={DNN.X: self.X_test,
+ DNN.Y: self.Y_test})
+!ec
+
+
+!split
+===== Optimizing and using gradient descent =====
+
+!bc pycod
+epochs = 100
+batch_size = 100
+n_neurons_layer1 = 100
+n_neurons_layer2 = 50
+n_categories = 10
+eta_vals = np.logspace(-5, 1, 7)
+lmbd_vals = np.logspace(-5, 1, 7)
+!ec
+
+
+!bc pycod
+DNN_tf = np.zeros((len(eta_vals), len(lmbd_vals)), dtype=object)
+
+for i, eta in enumerate(eta_vals):
+ for j, lmbd in enumerate(lmbd_vals):
+ DNN = NeuralNetworkTensorflow(X_train, Y_train, X_test, Y_test,
+ n_neurons_layer1, n_neurons_layer2, n_categories,
+ epochs=epochs, batch_size=batch_size, eta=eta, lmbd=lmbd)
+ DNN.fit()
+
+ DNN_tf[i][j] = DNN
+
+ print("Learning rate = ", eta)
+ print("Lambda = ", lmbd)
+ print("Test accuracy: %.3f" % DNN.test_accuracy)
+ print()
+!ec
+
+!bc pycod
+# optional
+# visual representation of grid search
+# uses seaborn heatmap, could probably do this in matplotlib
+import seaborn as sns
+
+sns.set()
+
+train_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+test_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+
+for i in range(len(eta_vals)):
+ for j in range(len(lmbd_vals)):
+ DNN = DNN_tf[i][j]
+
+ train_accuracy[i][j] = DNN.train_accuracy
+ test_accuracy[i][j] = DNN.test_accuracy
+
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(train_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Training Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(test_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Test Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+!ec
+
+!bc pycod
+# optional
+# we can use log files to visualize our graph in Tensorboard
+writer = tf.summary.FileWriter('logs/')
+writer.add_graph(tf.get_default_graph())
+!ec
+
+
+!split
+===== Using Keras =====
+
+Keras is a high level "neural network":"https://en.wikipedia.org/wiki/Application_programming_interface"
+that supports Tensorflow, CTNK and Theano as backends.
+If you have Tensorflow installed Keras is available through the *tf.keras* module.
+If you have Anaconda installed you may run the following command
+!bc pycod
+conda install keras
+!ec
+
+Alternatively, if you have Tensorflow or one of the other supported backends install you may use the pip package manager:
+
+!bc pycod
+pip3 install keras
+!ec
+or look up the "instructions here":"https://keras.io/".
+
+!bc pycod
+from keras.models import Sequential
+from keras.layers import Dense
+from keras.regularizers import l2
+from keras.optimizers import SGD
+
+def create_neural_network_keras(n_neurons_layer1, n_neurons_layer2, n_categories, eta, lmbd):
+ model = Sequential()
+ model.add(Dense(n_neurons_layer1, activation='sigmoid', kernel_regularizer=l2(lmbd)))
+ model.add(Dense(n_neurons_layer2, activation='sigmoid', kernel_regularizer=l2(lmbd)))
+ model.add(Dense(n_categories, activation='softmax'))
+
+ sgd = SGD(lr=eta)
+ model.compile(loss='categorical_crossentropy', optimizer=sgd, metrics=['accuracy'])
+
+ return model
+!ec
+
+!bc pycod
+DNN_keras = np.zeros((len(eta_vals), len(lmbd_vals)), dtype=object)
+
+for i, eta in enumerate(eta_vals):
+ for j, lmbd in enumerate(lmbd_vals):
+ DNN = create_neural_network_keras(n_neurons_layer1, n_neurons_layer2, n_categories,
+ eta=eta, lmbd=lmbd)
+ DNN.fit(X_train, Y_train, epochs=epochs, batch_size=batch_size, verbose=0)
+ scores = DNN.evaluate(X_test, Y_test)
+
+ DNN_keras[i][j] = DNN
+
+ print("Learning rate = ", eta)
+ print("Lambda = ", lmbd)
+ print("Test accuracy: %.3f" % scores[1])
+ print()
+!ec
+
+!bc pycod
+# optional
+# visual representation of grid search
+# uses seaborn heatmap, could probably do this in matplotlib
+import seaborn as sns
+
+sns.set()
+
+train_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+test_accuracy = np.zeros((len(eta_vals), len(lmbd_vals)))
+
+for i in range(len(eta_vals)):
+ for j in range(len(lmbd_vals)):
+ DNN = DNN_keras[i][j]
+
+ train_accuracy[i][j] = DNN.evaluate(X_train, Y_train)[1]
+ test_accuracy[i][j] = DNN.evaluate(X_test, Y_test)[1]
+
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(train_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Training Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+
+fig, ax = plt.subplots(figsize = (10, 10))
+sns.heatmap(test_accuracy, annot=True, ax=ax, cmap="viridis")
+ax.set_title("Test Accuracy")
+ax.set_ylabel("$\eta$")
+ax.set_xlabel("$\lambda$")
+plt.show()
+!ec
+
+
+
+
+!split
+===== Which activation function should I use? =====
+
+The Back propagation algorithm we derived above works by going from
+the output layer to the input layer, propagating the error gradient on
+the way. Once the algorithm has computed the gradient of the cost
+function with regards to each parameter in the network, it uses these
+gradients to update each parameter with a Gradient Descent (GD) step.
+
+
+Unfortunately for us, the gradients often get smaller and smaller as the
+algorithm progresses down to the first hidden layers. As a result, the
+GD update leaves the lower layer connection weights
+virtually unchanged, and training never converges to a good
+solution. This is known in the literature as
+_the vanishing gradients problem_.
+
+In other cases, the opposite can happen, namely the the gradients can grow bigger and
+bigger. The result is that many of the layers get large updates of the
+weights the
+algorithm diverges. This is the _exploding gradients problem_, which is
+mostly encountered in recurrent neural networks. More generally, deep
+neural networks suffer from unstable gradients, different layers may
+learn at widely different speeds
+
+!split
+===== Is the Logistic activation function (Sigmoid) our choice? =====
+
+Although this unfortunate behavior has been empirically observed for
+quite a while (it was one of the reasons why deep neural networks were
+mostly abandoned for a long time), it is only around 2010 that
+significant progress was made in understanding it.
+
+A paper titled "Understanding the Difficulty of Training Deep
+Feedforward Neural Networks by Xavier Glorot and Yoshua Bengio":"http://proceedings.mlr.press/v9/glorot10a.html" found that
+the problems with the popular logistic
+sigmoid activation function and the weight initialization technique
+that was most popular at the time, namely random initialization using
+a normal distribution with a mean of 0 and a standard deviation of
+1.
+
+They showed that with this activation function and this
+initialization scheme, the variance of the outputs of each layer is
+much greater than the variance of its inputs. Going forward in the
+network, the variance keeps increasing after each layer until the
+activation function saturates at the top layers. This is actually made
+worse by the fact that the logistic function has a mean of 0.5, not 0
+(the hyperbolic tangent function has a mean of 0 and behaves slightly
+better than the logistic function in deep networks).
+
+
+!split
+===== The derivative of the Logistic funtion =====
+
+Looking at the logistic activation function, when inputs become large
+(negative or positive), the function saturates at 0 or 1, with a
+derivative extremely close to 0. Thus when backpropagation kicks in,
+it has virtually no gradient to propagate back through the network,
+and what little gradient exists keeps getting diluted as
+backpropagation progresses down through the top layers, so there is
+really nothing left for the lower layers.
+
+In their paper, Glorot and Bengio propose a way to significantly
+alleviate this problem. We need the signal to flow properly in both
+directions: in the forward direction when making predictions, and in
+the reverse direction when backpropagating gradients. We don’t want
+the signal to die out, nor do we want it to explode and saturate. For
+the signal to flow properly, the authors argue that we need the
+variance of the outputs of each layer to be equal to the variance of
+its inputs, and we also need the gradients to have equal variance
+before and after flowing through a layer in the reverse direction.
+
+
+
+One of the insights in the 2010 paper by Glorot and Bengio was that
+the vanishing/exploding gradients problems were in part due to a poor
+choice of activation function. Until then most people had assumed that
+if Nature had chosen to use roughly sigmoid activation functions in
+biological neurons, they must be an excellent choice. But it turns out
+that other activation functions behave much better in deep neural
+networks, in particular the ReLU activation function, mostly because
+it does not saturate for positive values (and also because it is quite
+fast to compute).
+
+
+!split
+===== The RELU function family =====
+
+The ReLU activation function suffers from a problem known as the dying
+ReLUs: during training, some neurons effectively die, meaning they
+stop outputting anything other than 0.
+
+In some cases, you may find that half of your network’s neurons are
+dead, especially if you used a large learning rate. During training,
+if a neuron’s weights get updated such that the weighted sum of the
+neuron’s inputs is negative, it will start outputting 0. When this
+happen, the neuron is unlikely to come back to life since the gradient
+of the ReLU function is 0 when its input is negative.
+
+To solve this problem, nowadays practitioners use a variant of the ReLU
+function, such as the leaky ReLU discussed above or the so-called
+exponential linear unit (ELU) function
+
+
+!bt
+\[
+ELU(z) = \left\{\begin{array}{cc} \alpha\left( \exp{(z)}-1\right) & z < 0,\\ z & z \ge 0.\end{array}\right.
+\]
+!et
+
+!split
+===== Which activation function should we use? =====
+
+In general it seems that the ELU activation function is better than
+the leaky ReLU function (and its variants), which is better than
+ReLU. ReLU performs better than $\tanh$ which in turn performs better
+than the logistic function.
+
+If runtime
+performance is an issue, then you may opt for the leaky ReLU function over the
+ELU function If you don’t
+want to tweak yet another hyperparameter, you may just use the default
+$\alpha$ of $0.01$ for the leaky ReLU, and $1$ for ELU. If you have
+spare time and computing power, you can use cross-validation or
+bootstrap to evaluate other activation functions.
+
+
+!split
+===== A top-down perspective on Neural networks =====
+
+
+The first thing we would like to do is divide the data into two or three
+parts. A training set, a validation or dev (development) set, and a
+test set. The test set is the data on which we want to make
+predictions. The dev set is a subset of the training data we use to
+check how well we are doing out-of-sample, after training the model on
+the training dataset. We use the validation error as a proxy for the
+test error in order to make tweaks to our model. It is crucial that we
+do not use any of the test data to train the algorithm. This is a
+cardinal sin in ML. Then:
+
+
+* Estimate optimal error rate
+
+* Minimize underfitting (bias) on training data set.
+
+* Make sure you are not overfitting.
+
+If the validation and test sets are drawn from the same distributions,
+then a good performance on the validation set should lead to similarly
+good performance on the test set.
+
+However, sometimes
+the training data and test data differ in subtle ways because, for
+example, they are collected using slightly different methods, or
+because it is cheaper to collect data in one way versus another. In
+this case, there can be a mismatch between the training and test
+data. This can lead to the neural network overfitting these small
+differences between the test and training sets, and a poor performance
+on the test set despite having a good performance on the validation
+set. To rectify this, Andrew Ng suggests making two validation or dev
+sets, one constructed from the training data and one constructed from
+the test data. The difference between the performance of the algorithm
+on these two validation sets quantifies the train-test mismatch. This
+can serve as another important diagnostic when using DNNs for
+supervised learning.
+
+!split
+===== Limitations of supervised learning with deep networks =====
+
+Like all statistical methods, supervised learning using neural
+networks has important limitations. This is especially important when
+one seeks to apply these methods, especially to physics problems. Like
+all tools, DNNs are not a universal solution. Often, the same or
+better performance on a task can be achieved by using a few
+hand-engineered features (or even a collection of random
+features).
+
+Here we list some of the important limitations of supervised neural network based models.
+
+
+
+* _Need labeled data_. All supervised learning methods, DNNs for supervised learning require labeled data. Often, labeled data is harder to acquire than unlabeled data (e.g. one must pay for human experts to label images).
+* _Supervised neural networks are extremely data intensive._ DNNs are data hungry. They perform best when data is plentiful. This is doubly so for supervised methods where the data must also be labeled. The utility of DNNs is extremely limited if data is hard to acquire or the datasets are small (hundreds to a few thousand samples). In this case, the performance of other methods that utilize hand-engineered features can exceed that of DNNs.
+* _Homogeneous data._ Almost all DNNs deal with homogeneous data of one type. It is very hard to design architectures that mix and match data types (i.e.~some continuous variables, some discrete variables, some time series). In applications beyond images, video, and language, this is often what is required. In contrast, ensemble models like random forests or gradient-boosted trees have no difficulty handling mixed data types.
+* _Many problems are not about prediction._ In natural science we are often interested in learning something about the underlying distribution that generates the data. In this case, it is often difficult to cast these ideas in a supervised learning setting. While the problems are related, it is possible to make good predictions with a *wrong* model. The model might or might not be useful for understanding the underlying science.
+
+Some of these remarks are particular to DNNs, others are shared by all supervised learning methods. This motivates the use of unsupervised methods which in part circumvent these problems.
+
+
diff --git a/doc/src/Regression/chapter4.dlog b/doc/src/Regression/chapter4.dlog
new file mode 100644
index 000000000..722f26133
--- /dev/null
+++ b/doc/src/Regression/chapter4.dlog
@@ -0,0 +1,73 @@
+translating doconce text in chapter4.do.txt to ipynb
+*** replacing \bm{...} by \boldsymbol{...} (\bm is not supported by MathJax)
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{eqnarray*} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+Failed to remove ans_at_end environment
+Failed to remove sol_at_end environment
+output in chapter4.ipynb
diff --git a/doc/src/Regression/chapter4.do.txt b/doc/src/Regression/chapter4.do.txt
new file mode 100644
index 000000000..3642021c9
--- /dev/null
+++ b/doc/src/Regression/chapter4.do.txt
@@ -0,0 +1,3825 @@
+======= Linear Regression and more Advanced Regression Analysis =======
+
+
+!split
+===== Why Linear Regression (aka Ordinary Least Squares and family) =====
+
+Fitting a continuous function with linear parameterization in terms of the parameters $\bm{\beta}$.
+* Method of choice for fitting a continuous function!
+* Gives an excellent introduction to central Machine Learning features with _understandable pedagogical_ links to other methods like _Neural Networks_, _Support Vector Machines_ etc
+* Analytical expression for the fitting parameters $\bm{\beta}$
+* Analytical expressions for statistical propertiers like mean values, variances, confidence intervals and more
+* Analytical relation with probabilistic interpretations
+* Easy to introduce basic concepts like bias-variance tradeoff, cross-validation, resampling and regularization techniques and many other ML topics
+* Easy to code! And links well with classification problems and logistic regression and neural networks
+* Allows for _easy_ hands-on understanding of gradient descent methods
+* and many more features
+
+For more discussions of Ridge and Lasso regression, "Wessel van Wieringen's":"https://arxiv.org/abs/1509.09169" article is highly recommended.
+Similarly, "Mehta et al's article":"https://arxiv.org/abs/1803.08823" is also recommended.
+
+
+!split
+===== Regression analysis, overarching aims =====
+!bblock
+
+Regression modeling deals with the description of the sampling distribution of a given random variable $y$ and how it varies as function of another variable or a set of such variables $\bm{x} =[x_0, x_1,\dots, x_{n-1}]^T$.
+The first variable is called the _dependent_, the _outcome_ or the _response_ variable while the set of variables $\bm{x}$ is called the independent variable, or the predictor variable or the explanatory variable.
+
+A regression model aims at finding a likelihood function $p(\bm{y}\vert \bm{x})$, that is the conditional distribution for $\bm{y}$ with a given $\bm{x}$. The estimation of $p(\bm{y}\vert \bm{x})$ is made using a data set with
+* $n$ cases $i = 0, 1, 2, \dots, n-1$
+* Response (target, dependent or outcome) variable $y_i$ with $i = 0, 1, 2, \dots, n-1$
+* $p$ so-called explanatory (independent or predictor) variables $\bm{x}_i=[x_{i0}, x_{i1}, \dots, x_{ip-1}]$ with $i = 0, 1, 2, \dots, n-1$ and explanatory variables running from $0$ to $p-1$. See below for more explicit examples.
+ The goal of the regression analysis is to extract/exploit relationship between $\bm{y}$ and $\bm{x}$ in or to infer causal dependencies, approximations to the likelihood functions, functional relationships and to make predictions, making fits and many other things.
+!eblock
+
+!split
+===== Regression analysis, overarching aims II =====
+!bblock
+
+
+Consider an experiment in which $p$ characteristics of $n$ samples are
+measured. The data from this experiment, for various explanatory variables $p$ are normally represented by a matrix
+$\mathbf{X}$.
+
+The matrix $\mathbf{X}$ is called the *design
+matrix*. Additional information of the samples is available in the
+form of $\bm{y}$ (also as above). The variable $\bm{y}$ is
+generally referred to as the *response variable*. The aim of
+regression analysis is to explain $\bm{y}$ in terms of
+$\bm{X}$ through a functional relationship like $y_i =
+f(\mathbf{X}_{i,\ast})$. When no prior knowledge on the form of
+$f(\cdot)$ is available, it is common to assume a linear relationship
+between $\bm{X}$ and $\bm{y}$. This assumption gives rise to
+the *linear regression model* where $\bm{\beta} = [\beta_0, \ldots,
+\beta_{p-1}]^{T}$ are the *regression parameters*.
+
+Linear regression gives us a set of analytical equations for the parameters $\beta_j$.
+
+!eblock
+
+
+
+!split
+===== Examples =====
+!bblock
+In order to understand the relation among the predictors $p$, the set of data $n$ and the target (outcome, output etc) $\bm{y}$,
+consider the model we discussed for describing nuclear binding energies.
+
+There we assumed that we could parametrize the data using a polynomial approximation based on the liquid drop model.
+Assuming
+!bt
+\[
+BE(A) = a_0+a_1A+a_2A^{2/3}+a_3A^{-1/3}+a_4A^{-1},
+\]
+!et
+we have five predictors, that is the intercept, the $A$ dependent term, the $A^{2/3}$ term and the $A^{-1/3}$ and $A^{-1}$ terms.
+This gives $p=0,1,2,3,4$. Furthermore we have $n$ entries for each predictor. It means that our design matrix is a
+$p\times n$ matrix $\bm{X}$.
+
+Here the predictors are based on a model we have made. A popular data set which is widely encountered in ML applications is the
+so-called "credit card default data from Taiwan":"https://www.sciencedirect.com/science/article/pii/S0957417407006719?via%3Dihub". The data set contains data on $n=30000$ credit card holders with predictors like gender, marital status, age, profession, education, etc. In total there are $24$ such predictors or attributes leading to a design matrix of dimensionality $24 \times 30000$. This is however a classification problem and we will come back to it when we discuss Logistic Regression.
+
+!eblock
+
+
+
+
+
+!split
+===== General linear models =====
+!bblock
+Before we proceed let us study a case from linear algebra where we aim at fitting a set of data $\bm{y}=[y_0,y_1,\dots,y_{n-1}]$. We could think of these data as a result of an experiment or a complicated numerical experiment. These data are functions of a series of variables $\bm{x}=[x_0,x_1,\dots,x_{n-1}]$, that is $y_i = y(x_i)$ with $i=0,1,2,\dots,n-1$. The variables $x_i$ could represent physical quantities like time, temperature, position etc. We assume that $y(x)$ is a smooth function.
+
+Since obtaining these data points may not be trivial, we want to use these data to fit a function which can allow us to make predictions for values of $y$ which are not in the present set. The perhaps simplest approach is to assume we can parametrize our function in terms of a polynomial of degree $n-1$ with $n$ points, that is
+!bt
+\[
+y=y(x) \rightarrow y(x_i)=\tilde{y}_i+\epsilon_i=\sum_{j=0}^{n-1} \beta_j x_i^j+\epsilon_i,
+\]
+!et
+where $\epsilon_i$ is the error in our approximation.
+
+!eblock
+
+
+!split
+===== Rewriting the fitting procedure as a linear algebra problem =====
+!bblock
+For every set of values $y_i,x_i$ we have thus the corresponding set of equations
+!bt
+\begin{align*}
+y_0&=\beta_0+\beta_1x_0^1+\beta_2x_0^2+\dots+\beta_{n-1}x_0^{n-1}+\epsilon_0\\
+y_1&=\beta_0+\beta_1x_1^1+\beta_2x_1^2+\dots+\beta_{n-1}x_1^{n-1}+\epsilon_1\\
+y_2&=\beta_0+\beta_1x_2^1+\beta_2x_2^2+\dots+\beta_{n-1}x_2^{n-1}+\epsilon_2\\
+\dots & \dots \\
+y_{n-1}&=\beta_0+\beta_1x_{n-1}^1+\beta_2x_{n-1}^2+\dots+\beta_{n-1}x_{n-1}^{n-1}+\epsilon_{n-1}.\\
+\end{align*}
+!et
+!eblock
+
+
+!split
+===== Rewriting the fitting procedure as a linear algebra problem, more details =====
+!bblock
+Defining the vectors
+!bt
+\[
+\bm{y} = [y_0,y_1, y_2,\dots, y_{n-1}]^T,
+\]
+!et
+and
+!bt
+\[
+\bm{\beta} = [\beta_0,\beta_1, \beta_2,\dots, \beta_{n-1}]^T,
+\]
+!et
+and
+!bt
+\[
+\bm{\epsilon} = [\epsilon_0,\epsilon_1, \epsilon_2,\dots, \epsilon_{n-1}]^T,
+\]
+!et
+and the design matrix
+!bt
+\[
+\bm{X}=
+\begin{bmatrix}
+1& x_{0}^1 &x_{0}^2& \dots & \dots &x_{0}^{n-1}\\
+1& x_{1}^1 &x_{1}^2& \dots & \dots &x_{1}^{n-1}\\
+1& x_{2}^1 &x_{2}^2& \dots & \dots &x_{2}^{n-1}\\
+\dots& \dots &\dots& \dots & \dots &\dots\\
+1& x_{n-1}^1 &x_{n-1}^2& \dots & \dots &x_{n-1}^{n-1}\\
+\end{bmatrix}
+\]
+!et
+we can rewrite our equations as
+!bt
+\[
+\bm{y} = \bm{X}\bm{\beta}+\bm{\epsilon}.
+\]
+!et
+The above design matrix is called a "Vandermonde matrix":"https://en.wikipedia.org/wiki/Vandermonde_matrix".
+!eblock
+
+
+!split
+===== Generalizing the fitting procedure as a linear algebra problem =====
+!bblock
+
+We are obviously not limited to the above polynomial expansions. We
+could replace the various powers of $x$ with elements of Fourier
+series or instead of $x_i^j$ we could have $\cos{(j x_i)}$ or $\sin{(j
+x_i)}$, or time series or other orthogonal functions. For every set
+of values $y_i,x_i$ we can then generalize the equations to
+
+!bt
+\begin{align*}
+y_0&=\beta_0x_{00}+\beta_1x_{01}+\beta_2x_{02}+\dots+\beta_{n-1}x_{0n-1}+\epsilon_0\\
+y_1&=\beta_0x_{10}+\beta_1x_{11}+\beta_2x_{12}+\dots+\beta_{n-1}x_{1n-1}+\epsilon_1\\
+y_2&=\beta_0x_{20}+\beta_1x_{21}+\beta_2x_{22}+\dots+\beta_{n-1}x_{2n-1}+\epsilon_2\\
+\dots & \dots \\
+y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsilon_i\\
+\dots & \dots \\
+y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_{n-1}x_{n-1,n-1}+\epsilon_{n-1}.\\
+\end{align*}
+!et
+
+_Note that we have $p=n$ here. The matrix is symmetric. This is generally not the case!_
+!eblock
+
+
+!split
+===== Generalizing the fitting procedure as a linear algebra problem =====
+!bblock
+We redefine in turn the matrix $\bm{X}$ as
+!bt
+\[
+\bm{X}=
+\begin{bmatrix}
+x_{00}& x_{01} &x_{02}& \dots & \dots &x_{0,n-1}\\
+x_{10}& x_{11} &x_{12}& \dots & \dots &x_{1,n-1}\\
+x_{20}& x_{21} &x_{22}& \dots & \dots &x_{2,n-1}\\
+\dots& \dots &\dots& \dots & \dots &\dots\\
+x_{n-1,0}& x_{n-1,1} &x_{n-1,2}& \dots & \dots &x_{n-1,n-1}\\
+\end{bmatrix}
+\]
+!et
+and without loss of generality we rewrite again our equations as
+!bt
+\[
+\bm{y} = \bm{X}\bm{\beta}+\bm{\epsilon}.
+\]
+!et
+The left-hand side of this equation is kwown. Our error vector $\bm{\epsilon}$ and the parameter vector $\bm{\beta}$ are our unknow quantities. How can we obtain the optimal set of $\beta_i$ values?
+!eblock
+
+
+!split
+===== Optimizing our parameters =====
+!bblock
+We have defined the matrix $\bm{X}$ via the equations
+!bt
+\begin{align*}
+y_0&=\beta_0x_{00}+\beta_1x_{01}+\beta_2x_{02}+\dots+\beta_{n-1}x_{0n-1}+\epsilon_0\\
+y_1&=\beta_0x_{10}+\beta_1x_{11}+\beta_2x_{12}+\dots+\beta_{n-1}x_{1n-1}+\epsilon_1\\
+y_2&=\beta_0x_{20}+\beta_1x_{21}+\beta_2x_{22}+\dots+\beta_{n-1}x_{2n-1}+\epsilon_1\\
+\dots & \dots \\
+y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsilon_1\\
+\dots & \dots \\
+y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_{n-1}x_{n-1,n-1}+\epsilon_{n-1}.\\
+\end{align*}
+!et
+
+As we noted above, we stayed with a system with the design matrix
+ $\bm{X}\in {\mathbb{R}}^{n\times n}$, that is we have $p=n$. For reasons to come later (algorithmic arguments) we will hereafter define
+our matrix as $\bm{X}\in {\mathbb{R}}^{n\times p}$, with the predictors refering to the column numbers and the entries $n$ being the row elements.
+
+!eblock
+
+
+!split
+===== Our model for the nuclear binding energies =====
+
+In our "introductory notes":"https://compphysics.github.io/MachineLearning/doc/pub/How2ReadData/html/How2ReadData.html" we looked at the so-called "liquid drop model":"https://en.wikipedia.org/wiki/Semi-empirical_mass_formula". Let us remind ourselves about what we did by looking at the code.
+
+We restate the parts of the code we are most interested in.
+!bc pycod
+# Common imports
+import numpy as np
+import pandas as pd
+import matplotlib.pyplot as plt
+from IPython.display import display
+import os
+
+# Where to save the figures and data files
+PROJECT_ROOT_DIR = "Results"
+FIGURE_ID = "Results/FigureFiles"
+DATA_ID = "DataFiles/"
+
+if not os.path.exists(PROJECT_ROOT_DIR):
+ os.mkdir(PROJECT_ROOT_DIR)
+
+if not os.path.exists(FIGURE_ID):
+ os.makedirs(FIGURE_ID)
+
+if not os.path.exists(DATA_ID):
+ os.makedirs(DATA_ID)
+
+def image_path(fig_id):
+ return os.path.join(FIGURE_ID, fig_id)
+
+def data_path(dat_id):
+ return os.path.join(DATA_ID, dat_id)
+
+def save_fig(fig_id):
+ plt.savefig(image_path(fig_id) + ".png", format='png')
+
+infile = open(data_path("MassEval2016.dat"),'r')
+
+
+# Read the experimental data with Pandas
+Masses = pd.read_fwf(infile, usecols=(2,3,4,6,11),
+ names=('N', 'Z', 'A', 'Element', 'Ebinding'),
+ widths=(1,3,5,5,5,1,3,4,1,13,11,11,9,1,2,11,9,1,3,1,12,11,1),
+ header=39,
+ index_col=False)
+
+# Extrapolated values are indicated by '#' in place of the decimal place, so
+# the Ebinding column won't be numeric. Coerce to float and drop these entries.
+Masses['Ebinding'] = pd.to_numeric(Masses['Ebinding'], errors='coerce')
+Masses = Masses.dropna()
+# Convert from keV to MeV.
+Masses['Ebinding'] /= 1000
+
+# Group the DataFrame by nucleon number, A.
+Masses = Masses.groupby('A')
+# Find the rows of the grouped DataFrame with the maximum binding energy.
+Masses = Masses.apply(lambda t: t[t.Ebinding==t.Ebinding.max()])
+A = Masses['A']
+Z = Masses['Z']
+N = Masses['N']
+Element = Masses['Element']
+Energies = Masses['Ebinding']
+
+# Now we set up the design matrix X
+X = np.zeros((len(A),5))
+X[:,0] = 1
+X[:,1] = A
+X[:,2] = A**(2.0/3.0)
+X[:,3] = A**(-1.0/3.0)
+X[:,4] = A**(-1.0)
+# Then nice printout using pandas
+DesignMatrix = pd.DataFrame(X)
+DesignMatrix.index = A
+DesignMatrix.columns = ['1', 'A', 'A^(2/3)', 'A^(-1/3)', '1/A']
+display(DesignMatrix)
+!ec
+
+With $\bm{\beta}\in {\mathbb{R}}^{p\times 1}$, it means that we will hereafter write our equations for the approximation as
+!bt
+\[
+\bm{\tilde{y}}= \bm{X}\bm{\beta},
+\]
+!et
+throughout these lectures.
+
+
+!split
+===== Optimizing our parameters, more details =====
+!bblock
+With the above we use the design matrix to define the approximation $\bm{\tilde{y}}$ via the unknown quantity $\bm{\beta}$ as
+!bt
+\[
+\bm{\tilde{y}}= \bm{X}\bm{\beta},
+\]
+!et
+and in order to find the optimal parameters $\beta_i$ instead of solving the above linear algebra problem, we define a function which gives a measure of the spread between the values $y_i$ (which represent hopefully the exact values) and the parameterized values $\tilde{y}_i$, namely
+!bt
+\[
+C(\bm{\beta})=\frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2=\frac{1}{n}\left\{\left(\bm{y}-\bm{\tilde{y}}\right)^T\left(\bm{y}-\bm{\tilde{y}}\right)\right\},
+\]
+!et
+or using the matrix $\bm{X}$ and in a more compact matrix-vector notation as
+!bt
+\[
+C(\bm{\beta})=\frac{1}{n}\left\{\left(\bm{y}-\bm{X}\bm{\beta}\right)^T\left(\bm{y}-\bm{X}\bm{\beta}\right)\right\}.
+\]
+!et
+This function is one possible way to define the so-called cost function.
+
+
+
+It is also common to define
+the function $C$ as
+
+!bt
+\[
+C(\bm{\beta})=\frac{1}{2n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2,
+\]
+!et
+since when taking the first derivative with respect to the unknown parameters $\beta$, the factor of $2$ cancels out.
+!eblock
+
+
+!split
+===== Interpretations and optimizing our parameters =====
+!bblock
+
+The function
+!bt
+\[
+C(\bm{\beta})=\frac{1}{n}\left\{\left(\bm{y}-\bm{X}\bm{\beta}\right)^T\left(\bm{y}-\bm{X}\bm{\beta}\right)\right\},
+\]
+!et
+can be linked to the variance of the quantity $y_i$ if we interpret the latter as the mean value.
+When linking (see the discussion below) with the maximum likelihood approach below, we will indeed interpret $y_i$ as a mean value
+!bt
+\[
+y_{i}=\langle y_i \rangle = \beta_0x_{i,0}+\beta_1x_{i,1}+\beta_2x_{i,2}+\dots+\beta_{n-1}x_{i,n-1}+\epsilon_i,
+\]
+!et
+
+where $\langle y_i \rangle$ is the mean value. Keep in mind also that
+till now we have treated $y_i$ as the exact value. Normally, the
+response (dependent or outcome) variable $y_i$ the outcome of a
+numerical experiment or another type of experiment and is thus only an
+approximation to the true value. It is then always accompanied by an
+error estimate, often limited to a statistical error estimate given by
+the standard deviation discussed earlier. In the discussion here we
+will treat $y_i$ as our exact value for the response variable.
+
+In order to find the parameters $\beta_i$ we will then minimize the spread of $C(\bm{\beta})$, that is we are going to solve the problem
+!bt
+\[
+{\displaystyle \min_{\bm{\beta}\in
+{\mathbb{R}}^{p}}}\frac{1}{n}\left\{\left(\bm{y}-\bm{X}\bm{\beta}\right)^T\left(\bm{y}-\bm{X}\bm{\beta}\right)\right\}.
+\]
+!et
+In practical terms it means we will require
+!bt
+\[
+\frac{\partial C(\bm{\beta})}{\partial \beta_j} = \frac{\partial }{\partial \beta_j}\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}\right)^2\right]=0,
+\]
+!et
+which results in
+!bt
+\[
+\frac{\partial C(\bm{\beta})}{\partial \beta_j} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}x_{ij}\left(y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}\right)\right]=0,
+\]
+!et
+or in a matrix-vector form as
+!bt
+\[
+\frac{\partial C(\bm{\beta})}{\partial \bm{\beta}} = 0 = \bm{X}^T\left( \bm{y}-\bm{X}\bm{\beta}\right).
+\]
+!et
+
+
+!eblock
+
+
+!split
+===== Interpretations and optimizing our parameters =====
+!bblock
+We can rewrite
+!bt
+\[
+\frac{\partial C(\bm{\beta})}{\partial \bm{\beta}} = 0 = \bm{X}^T\left( \bm{y}-\bm{X}\bm{\beta}\right),
+\]
+!et
+as
+!bt
+\[
+\bm{X}^T\bm{y} = \bm{X}^T\bm{X}\bm{\beta},
+\]
+!et
+and if the matrix $\bm{X}^T\bm{X}$ is invertible we have the solution
+!bt
+\[
+\bm{\beta} =\left(\bm{X}^T\bm{X}\right)^{-1}\bm{X}^T\bm{y}.
+\]
+!et
+
+We note also that since our design matrix is defined as $\bm{X}\in
+{\mathbb{R}}^{n\times p}$, the product $\bm{X}^T\bm{X} \in
+{\mathbb{R}}^{p\times p}$. In the above case we have that $p \ll n$,
+in our case $p=5$ meaning that we end up with inverting a small
+$5\times 5$ matrix. This is a rather common situation, in many cases we end up with low-dimensional
+matrices to invert. The methods discussed here and for many other
+supervised learning algorithms like classification with logistic
+regression or support vector machines, exhibit dimensionalities which
+allow for the usage of direct linear algebra methods such as _LU_ decomposition or _Singular Value Decomposition_ (SVD) for finding the inverse of the matrix
+$\bm{X}^T\bm{X}$.
+!eblock
+
+!bblock
+_Small question_: Do you think the example we have at hand here (the nuclear binding energies) can lead to problems in inverting the matrix $\bm{X}^T\bm{X}$? What kind of problems can we expect?
+!eblock
+
+!split
+===== Some useful matrix and vector expressions =====
+
+The following matrix and vector relation will be useful here and for the rest of the course. Vectors are always written as boldfaced lower case letters and
+matrices as upper case boldfaced letters.
+
+!bt
+\[
+\frac{\partial (\bm{b}^T\bm{a})}{\partial \bm{a}} = \bm{b},
+\]
+!et
+!bt
+\[
+\frac{\partial (\bm{a}^T\bm{A}\bm{a})}{\partial \bm{a}} = (\bm{A}+\bm{A}^T)\bm{a},
+\]
+!et
+!bt
+\[
+\frac{\partial tr(\bm{B}\bm{A})}{\partial \bm{A}} = \bm{B}^T,
+\]
+!et
+!bt
+\[
+\frac{\partial \log{\vert\bm{A}\vert}}{\partial \bm{A}} = (\bm{A}^{-1})^T.
+\]
+!et
+!split
+===== Interpretations and optimizing our parameters =====
+!bblock
+The residuals $\bm{\epsilon}$ are in turn given by
+!bt
+\[
+\bm{\epsilon} = \bm{y}-\bm{\tilde{y}} = \bm{y}-\bm{X}\bm{\beta},
+\]
+!et
+and with
+!bt
+\[
+\bm{X}^T\left( \bm{y}-\bm{X}\bm{\beta}\right)= 0,
+\]
+!et
+we have
+!bt
+\[
+\bm{X}^T\bm{\epsilon}=\bm{X}^T\left( \bm{y}-\bm{X}\bm{\beta}\right)= 0,
+\]
+!et
+meaning that the solution for $\bm{\beta}$ is the one which minimizes the residuals. Later we will link this with the maximum likelihood approach.
+
+!eblock
+
+
+Let us now return to our nuclear binding energies and simply code the above equations.
+
+!split
+===== Own code for Ordinary Least Squares =====
+
+It is rather straightforward to implement the matrix inversion and obtain the parameters $\bm{\beta}$. After having defined the matrix $\bm{X}$ we simply need to
+write
+!bc pycod
+# matrix inversion to find beta
+beta = np.linalg.inv(X.T.dot(X)).dot(X.T).dot(Energies)
+# and then make the prediction
+ytilde = X @ beta
+!ec
+Alternatively, you can use the least squares functionality in _Numpy_ as
+!bc pycod
+fit = np.linalg.lstsq(X, Energies, rcond =None)[0]
+ytildenp = np.dot(fit,X.T)
+!ec
+
+And finally we plot our fit with and compare with data
+!bc pycod
+Masses['Eapprox'] = ytilde
+# Generate a plot comparing the experimental with the fitted values values.
+fig, ax = plt.subplots()
+ax.set_xlabel(r'$A = N + Z$')
+ax.set_ylabel(r'$E_\mathrm{bind}\,/\mathrm{MeV}$')
+ax.plot(Masses['A'], Masses['Ebinding'], alpha=0.7, lw=2,
+ label='Ame2016')
+ax.plot(Masses['A'], Masses['Eapprox'], alpha=0.7, lw=2, c='m',
+ label='Fit')
+ax.legend()
+save_fig("Masses2016OLS")
+plt.show()
+!ec
+
+!split
+===== Adding error analysis and training set up =====
+
+We can easily test our fit by computing the $R2$ score that we discussed in connection with the functionality of _Scikit-Learn_ in the introductory slides.
+Since we are not using _Scikit-Learn_ here we can define our own $R2$ function as
+!bc pycod
+def R2(y_data, y_model):
+ return 1 - np.sum((y_data - y_model) ** 2) / np.sum((y_data - np.mean(y_data)) ** 2)
+!ec
+and we would be using it as
+!bc pycod
+print(R2(Energies,ytilde))
+!ec
+
+We can easily add our _MSE_ score as
+!bc pycod
+def MSE(y_data,y_model):
+ n = np.size(y_model)
+ return np.sum((y_data-y_model)**2)/n
+
+print(MSE(Energies,ytilde))
+!ec
+and finally the relative error as
+!bc pycod
+def RelativeError(y_data,y_model):
+ return abs((y_data-y_model)/y_data)
+print(RelativeError(Energies, ytilde))
+!ec
+
+
+
+!split
+===== The $\chi^2$ function =====
+!bblock
+
+Normally, the response (dependent or outcome) variable $y_i$ is the
+outcome of a numerical experiment or another type of experiment and is
+thus only an approximation to the true value. It is then always
+accompanied by an error estimate, often limited to a statistical error
+estimate given by the standard deviation discussed earlier. In the
+discussion here we will treat $y_i$ as our exact value for the
+response variable.
+
+Introducing the standard deviation $\sigma_i$ for each measurement
+$y_i$, we define now the $\chi^2$ function (omitting the $1/n$ term)
+as
+
+!bt
+\[
+\chi^2(\bm{\beta})=\frac{1}{n}\sum_{i=0}^{n-1}\frac{\left(y_i-\tilde{y}_i\right)^2}{\sigma_i^2}=\frac{1}{n}\left\{\left(\bm{y}-\bm{\tilde{y}}\right)^T\frac{1}{\bm{\Sigma^2}}\left(\bm{y}-\bm{\tilde{y}}\right)\right\},
+\]
+!et
+where the matrix $\bm{\Sigma}$ is a diagonal matrix with $\sigma_i$ as matrix elements.
+
+!eblock
+
+!split
+===== The $\chi^2$ function =====
+!bblock
+
+In order to find the parameters $\beta_i$ we will then minimize the spread of $\chi^2(\bm{\beta})$ by requiring
+!bt
+\[
+\frac{\partial \chi^2(\bm{\beta})}{\partial \beta_j} = \frac{\partial }{\partial \beta_j}\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(\frac{y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}}{\sigma_i}\right)^2\right]=0,
+\]
+!et
+which results in
+!bt
+\[
+\frac{\partial \chi^2(\bm{\beta})}{\partial \beta_j} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}\frac{x_{ij}}{\sigma_i}\left(\frac{y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}}{\sigma_i}\right)\right]=0,
+\]
+!et
+or in a matrix-vector form as
+!bt
+\[
+\frac{\partial \chi^2(\bm{\beta})}{\partial \bm{\beta}} = 0 = \bm{A}^T\left( \bm{b}-\bm{A}\bm{\beta}\right).
+\]
+!et
+where we have defined the matrix $\bm{A} =\bm{X}/\bm{\Sigma}$ with matrix elements $a_{ij} = x_{ij}/\sigma_i$ and the vector $\bm{b}$ with elements $b_i = y_i/\sigma_i$.
+!eblock
+
+!split
+===== The $\chi^2$ function =====
+!bblock
+
+We can rewrite
+!bt
+\[
+\frac{\partial \chi^2(\bm{\beta})}{\partial \bm{\beta}} = 0 = \bm{A}^T\left( \bm{b}-\bm{A}\bm{\beta}\right),
+\]
+!et
+as
+!bt
+\[
+\bm{A}^T\bm{b} = \bm{A}^T\bm{A}\bm{\beta},
+\]
+!et
+and if the matrix $\bm{A}^T\bm{A}$ is invertible we have the solution
+!bt
+\[
+\bm{\beta} =\left(\bm{A}^T\bm{A}\right)^{-1}\bm{A}^T\bm{b}.
+\]
+!et
+!eblock
+
+!split
+===== The $\chi^2$ function =====
+!bblock
+
+If we then introduce the matrix
+!bt
+\[
+\bm{H} = \left(\bm{A}^T\bm{A}\right)^{-1},
+\]
+!et
+we have then the following expression for the parameters $\beta_j$ (the matrix elements of $\bm{H}$ are $h_{ij}$)
+!bt
+\[
+\beta_j = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}\frac{y_i}{\sigma_i}\frac{x_{ik}}{\sigma_i} = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}b_ia_{ik}
+\]
+!et
+We state without proof the expression for the uncertainty in the parameters $\beta_j$ as (we leave this as an exercise)
+!bt
+\[
+\sigma^2(\beta_j) = \sum_{i=0}^{n-1}\sigma_i^2\left( \frac{\partial \beta_j}{\partial y_i}\right)^2,
+\]
+!et
+resulting in
+!bt
+\[
+\sigma^2(\beta_j) = \left(\sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}a_{ik}\right)\left(\sum_{l=0}^{p-1}h_{jl}\sum_{m=0}^{n-1}a_{ml}\right) = h_{jj}!
+\]
+!et
+!eblock
+
+!split
+===== The $\chi^2$ function =====
+!bblock
+The first step here is to approximate the function $y$ with a first-order polynomial, that is we write
+!bt
+\[
+y=y(x) \rightarrow y(x_i) \approx \beta_0+\beta_1 x_i.
+\]
+!et
+By computing the derivatives of $\chi^2$ with respect to $\beta_0$ and $\beta_1$ show that these are given by
+!bt
+\[
+\frac{\partial \chi^2(\bm{\beta})}{\partial \beta_0} = -2\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(\frac{y_i-\beta_0-\beta_1x_{i}}{\sigma_i^2}\right)\right]=0,
+\]
+!et
+and
+!bt
+\[
+\frac{\partial \chi^2(\bm{\beta})}{\partial \beta_1} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}x_i\left(\frac{y_i-\beta_0-\beta_1x_{i}}{\sigma_i^2}\right)\right]=0.
+\]
+!et
+!eblock
+
+!split
+===== The $\chi^2$ function =====
+!bblock
+
+For a linear fit (a first-order polynomial) we don't need to invert a matrix!!
+Defining
+!bt
+\[
+\gamma = \sum_{i=0}^{n-1}\frac{1}{\sigma_i^2},
+\]
+!et
+
+!bt
+\[
+\gamma_x = \sum_{i=0}^{n-1}\frac{x_{i}}{\sigma_i^2},
+\]
+!et
+
+!bt
+\[
+\gamma_y = \sum_{i=0}^{n-1}\left(\frac{y_i}{\sigma_i^2}\right),
+\]
+!et
+
+!bt
+\[
+\gamma_{xx} = \sum_{i=0}^{n-1}\frac{x_ix_{i}}{\sigma_i^2},
+\]
+!et
+
+!bt
+\[
+\gamma_{xy} = \sum_{i=0}^{n-1}\frac{y_ix_{i}}{\sigma_i^2},
+\]
+!et
+
+we obtain
+
+!bt
+\[
+\beta_0 = \frac{\gamma_{xx}\gamma_y-\gamma_x\gamma_y}{\gamma\gamma_{xx}-\gamma_x^2},
+\]
+!et
+
+!bt
+\[
+\beta_1 = \frac{\gamma_{xy}\gamma-\gamma_x\gamma_y}{\gamma\gamma_{xx}-\gamma_x^2}.
+\]
+!et
+
+This approach (different linear and non-linear regression) suffers
+often from both being underdetermined and overdetermined in the
+unknown coefficients $\beta_i$. A better approach is to use the
+Singular Value Decomposition (SVD) method discussed below. Or using
+Lasso and Ridge regression. See below.
+
+!eblock
+
+
+!split
+===== Fitting an Equation of State for Dense Nuclear Matter =====
+
+Before we continue, let us introduce yet another example. We are going to fit the
+nuclear equation of state using results from many-body calculations.
+The equation of state we have made available here, as function of
+density, has been derived using modern nucleon-nucleon potentials with
+"the addition of three-body
+forces":"https://www.sciencedirect.com/science/article/pii/S0370157399001106". This
+time the file is presented as a standard _csv_ file.
+
+The beginning of the Python code here is similar to what you have seen
+before, with the same initializations and declarations. We use also
+_pandas_ again, rather extensively in order to organize our data.
+
+The difference now is that we use _Scikit-Learn's_ regression tools
+instead of our own matrix inversion implementation. Furthermore, we
+sneak in _Ridge_ regression (to be discussed below) which includes a
+hyperparameter $\lambda$, also to be explained below.
+
+!split
+===== The code =====
+
+!bc pycod
+# Common imports
+import os
+import numpy as np
+import pandas as pd
+import matplotlib.pyplot as plt
+import matplotlib.pyplot as plt
+import sklearn.linear_model as skl
+from sklearn.metrics import mean_squared_error, r2_score, mean_absolute_error
+
+# Where to save the figures and data files
+PROJECT_ROOT_DIR = "Results"
+FIGURE_ID = "Results/FigureFiles"
+DATA_ID = "DataFiles/"
+
+if not os.path.exists(PROJECT_ROOT_DIR):
+ os.mkdir(PROJECT_ROOT_DIR)
+
+if not os.path.exists(FIGURE_ID):
+ os.makedirs(FIGURE_ID)
+
+if not os.path.exists(DATA_ID):
+ os.makedirs(DATA_ID)
+
+def image_path(fig_id):
+ return os.path.join(FIGURE_ID, fig_id)
+
+def data_path(dat_id):
+ return os.path.join(DATA_ID, dat_id)
+
+def save_fig(fig_id):
+ plt.savefig(image_path(fig_id) + ".png", format='png')
+
+infile = open(data_path("EoS.csv"),'r')
+
+# Read the EoS data as csv file and organize the data into two arrays with density and energies
+EoS = pd.read_csv(infile, names=('Density', 'Energy'))
+EoS['Energy'] = pd.to_numeric(EoS['Energy'], errors='coerce')
+EoS = EoS.dropna()
+Energies = EoS['Energy']
+Density = EoS['Density']
+# The design matrix now as function of various polytrops
+X = np.zeros((len(Density),4))
+X[:,3] = Density**(4.0/3.0)
+X[:,2] = Density
+X[:,1] = Density**(2.0/3.0)
+X[:,0] = 1
+
+# We use now Scikit-Learn's linear regressor and ridge regressor
+# OLS part
+clf = skl.LinearRegression().fit(X, Energies)
+ytilde = clf.predict(X)
+EoS['Eols'] = ytilde
+# The mean squared error
+print("Mean squared error: %.2f" % mean_squared_error(Energies, ytilde))
+# Explained variance score: 1 is perfect prediction
+print('Variance score: %.2f' % r2_score(Energies, ytilde))
+# Mean absolute error
+print('Mean absolute error: %.2f' % mean_absolute_error(Energies, ytilde))
+print(clf.coef_, clf.intercept_)
+
+# The Ridge regression with a hyperparameter lambda = 0.1
+_lambda = 0.1
+clf_ridge = skl.Ridge(alpha=_lambda).fit(X, Energies)
+yridge = clf_ridge.predict(X)
+EoS['Eridge'] = yridge
+# The mean squared error
+print("Mean squared error: %.2f" % mean_squared_error(Energies, yridge))
+# Explained variance score: 1 is perfect prediction
+print('Variance score: %.2f' % r2_score(Energies, yridge))
+# Mean absolute error
+print('Mean absolute error: %.2f' % mean_absolute_error(Energies, yridge))
+print(clf_ridge.coef_, clf_ridge.intercept_)
+
+fig, ax = plt.subplots()
+ax.set_xlabel(r'$\rho[\mathrm{fm}^{-3}]$')
+ax.set_ylabel(r'Energy per particle')
+ax.plot(EoS['Density'], EoS['Energy'], alpha=0.7, lw=2,
+ label='Theoretical data')
+ax.plot(EoS['Density'], EoS['Eols'], alpha=0.7, lw=2, c='m',
+ label='OLS')
+ax.plot(EoS['Density'], EoS['Eridge'], alpha=0.7, lw=2, c='g',
+ label='Ridge $\lambda = 0.1$')
+ax.legend()
+save_fig("EoSfitting")
+plt.show()
+!ec
+
+The above simple polynomial in density $\rho$ gives an excellent fit
+to the data.
+
+We note also that there is a small deviation between the
+standard OLS and the Ridge regression at higher densities. We discuss this in more detail
+below.
+
+
+!split
+===== Splitting our Data in Training and Test data =====
+
+It is normal in essentially all Machine Learning studies to split the
+data in a training set and a test set (sometimes also an additional
+validation set). _Scikit-Learn_ has an own function for this. There
+is no explicit recipe for how much data should be included as training
+data and say test data. An accepted rule of thumb is to use
+approximately $2/3$ to $4/5$ of the data as training data. We will
+postpone a discussion of this splitting to the end of these notes and
+our discussion of the so-called _bias-variance_ tradeoff. Here we
+limit ourselves to repeat the above equation of state fitting example
+but now splitting the data into a training set and a test set.
+
+!bc pycod
+import os
+import numpy as np
+import pandas as pd
+import matplotlib.pyplot as plt
+from sklearn.model_selection import train_test_split
+# Where to save the figures and data files
+PROJECT_ROOT_DIR = "Results"
+FIGURE_ID = "Results/FigureFiles"
+DATA_ID = "DataFiles/"
+
+if not os.path.exists(PROJECT_ROOT_DIR):
+ os.mkdir(PROJECT_ROOT_DIR)
+
+if not os.path.exists(FIGURE_ID):
+ os.makedirs(FIGURE_ID)
+
+if not os.path.exists(DATA_ID):
+ os.makedirs(DATA_ID)
+
+def image_path(fig_id):
+ return os.path.join(FIGURE_ID, fig_id)
+
+def data_path(dat_id):
+ return os.path.join(DATA_ID, dat_id)
+
+def save_fig(fig_id):
+ plt.savefig(image_path(fig_id) + ".png", format='png')
+
+def R2(y_data, y_model):
+ return 1 - np.sum((y_data - y_model) ** 2) / np.sum((y_data - np.mean(y_data)) ** 2)
+def MSE(y_data,y_model):
+ n = np.size(y_model)
+ return np.sum((y_data-y_model)**2)/n
+
+infile = open(data_path("EoS.csv"),'r')
+
+# Read the EoS data as csv file and organized into two arrays with density and energies
+EoS = pd.read_csv(infile, names=('Density', 'Energy'))
+EoS['Energy'] = pd.to_numeric(EoS['Energy'], errors='coerce')
+EoS = EoS.dropna()
+Energies = EoS['Energy']
+Density = EoS['Density']
+# The design matrix now as function of various polytrops
+X = np.zeros((len(Density),5))
+X[:,0] = 1
+X[:,1] = Density**(2.0/3.0)
+X[:,2] = Density
+X[:,3] = Density**(4.0/3.0)
+X[:,4] = Density**(5.0/3.0)
+# We split the data in test and training data
+X_train, X_test, y_train, y_test = train_test_split(X, Energies, test_size=0.2)
+# matrix inversion to find beta
+beta = np.linalg.inv(X_train.T.dot(X_train)).dot(X_train.T).dot(y_train)
+# and then make the prediction
+ytilde = X_train @ beta
+print("Training R2")
+print(R2(y_train,ytilde))
+print("Training MSE")
+print(MSE(y_train,ytilde))
+ypredict = X_test @ beta
+print("Test R2")
+print(R2(y_test,ypredict))
+print("Test MSE")
+print(MSE(y_test,ypredict))
+!ec
+
+
+!split
+===== The Boston housing data example =====
+
+The Boston housing
+data set was originally a part of UCI Machine Learning Repository
+and has been removed now. The data set is now included in _Scikit-Learn_'s
+library. There are 506 samples and 13 feature (predictor) variables
+in this data set. The objective is to predict the value of prices of
+the house using the features (predictors) listed here.
+
+The features/predictors are
+ o CRIM: Per capita crime rate by town
+ o ZN: Proportion of residential land zoned for lots over 25000 square feet
+ o INDUS: Proportion of non-retail business acres per town
+ o CHAS: Charles River dummy variable (= 1 if tract bounds river; 0 otherwise)
+ o NOX: Nitric oxide concentration (parts per 10 million)
+ o RM: Average number of rooms per dwelling
+ o AGE: Proportion of owner-occupied units built prior to 1940
+ o DIS: Weighted distances to five Boston employment centers
+ o RAD: Index of accessibility to radial highways
+ o TAX: Full-value property tax rate per USD10000
+ o B: $1000(Bk - 0.63)^2$, where $Bk$ is the proportion of [people of African American descent] by town
+ o LSTAT: Percentage of lower status of the population
+ o MEDV: Median value of owner-occupied homes in USD 1000s
+
+!split
+===== Housing data, the code =====
+We start by importing the libraries
+!bc pycod
+import numpy as np
+import matplotlib.pyplot as plt
+
+import pandas as pd
+import seaborn as sns
+!ec
+and load the Boston Housing DataSet from _Scikit-Learn_
+
+
+!bc pycod
+from sklearn.datasets import load_boston
+
+boston_dataset = load_boston()
+
+# boston_dataset is a dictionary
+# let's check what it contains
+boston_dataset.keys()
+!ec
+Then we invoke Pandas
+!bc pycod
+boston = pd.DataFrame(boston_dataset.data, columns=boston_dataset.feature_names)
+boston.head()
+boston['MEDV'] = boston_dataset.target
+!ec
+and preprocess the data
+!bc pycod
+# check for missing values in all the columns
+boston.isnull().sum()
+!ec
+We can then visualize the data
+!bc pycod
+# set the size of the figure
+sns.set(rc={'figure.figsize':(11.7,8.27)})
+
+# plot a histogram showing the distribution of the target values
+sns.distplot(boston['MEDV'], bins=30)
+plt.show()
+!ec
+
+It is now useful to look at the correlation matrix
+!bc pycod
+# compute the pair wise correlation for all columns
+correlation_matrix = boston.corr().round(2)
+# use the heatmap function from seaborn to plot the correlation matrix
+# annot = True to print the values inside the square
+sns.heatmap(data=correlation_matrix, annot=True)
+!ec
+From the above coorelation plot we can see that _MEDV_ is strongly correlated to _LSTAT_ and _RM_. We see also that _RAD_ and _TAX_ are stronly correlated, but we don't include this in our features together to avoid multi-colinearity
+
+!bc pycod
+plt.figure(figsize=(20, 5))
+
+features = ['LSTAT', 'RM']
+target = boston['MEDV']
+
+for i, col in enumerate(features):
+ plt.subplot(1, len(features) , i+1)
+ x = boston[col]
+ y = target
+ plt.scatter(x, y, marker='o')
+ plt.title(col)
+ plt.xlabel(col)
+ plt.ylabel('MEDV')
+!ec
+Now we start training our model
+!bc pycod
+X = pd.DataFrame(np.c_[boston['LSTAT'], boston['RM']], columns = ['LSTAT','RM'])
+Y = boston['MEDV']
+!ec
+We split the data into training and test sets
+
+!bc pycod
+from sklearn.model_selection import train_test_split
+
+# splits the training and test data set in 80% : 20%
+# assign random_state to any value.This ensures consistency.
+X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = 0.2, random_state=5)
+print(X_train.shape)
+print(X_test.shape)
+print(Y_train.shape)
+print(Y_test.shape)
+!ec
+Then we use the linear regression functionality from _Scikit-Learn_
+!bc pycod
+from sklearn.linear_model import LinearRegression
+from sklearn.metrics import mean_squared_error, r2_score
+
+lin_model = LinearRegression()
+lin_model.fit(X_train, Y_train)
+
+# model evaluation for training set
+
+y_train_predict = lin_model.predict(X_train)
+rmse = (np.sqrt(mean_squared_error(Y_train, y_train_predict)))
+r2 = r2_score(Y_train, y_train_predict)
+
+print("The model performance for training set")
+print("--------------------------------------")
+print('RMSE is {}'.format(rmse))
+print('R2 score is {}'.format(r2))
+print("\n")
+
+# model evaluation for testing set
+
+y_test_predict = lin_model.predict(X_test)
+# root mean square error of the model
+rmse = (np.sqrt(mean_squared_error(Y_test, y_test_predict)))
+
+# r-squared score of the model
+r2 = r2_score(Y_test, y_test_predict)
+
+print("The model performance for testing set")
+print("--------------------------------------")
+print('RMSE is {}'.format(rmse))
+print('R2 score is {}'.format(r2))
+!ec
+
+!bc pycod
+# plotting the y_test vs y_pred
+# ideally should have been a straight line
+plt.scatter(Y_test, y_test_predict)
+plt.show()
+!ec
+
+
+!split
+===== Reducing the number of degrees of freedom, overarching view =====
+!bblock
+
+Many Machine Learning problems involve thousands or even millions of
+features for each training instance. Not only does this make training
+extremely slow, it can also make it much harder to find a good
+solution, as we will see. This problem is often referred to as the
+curse of dimensionality. Fortunately, in real-world problems, it is
+often possible to reduce the number of features considerably, turning
+an intractable problem into a tractable one.
+
+Later we will discuss some of the most popular dimensionality reduction
+techniques: the principal component analysis (PCA), Kernel PCA, and
+Locally Linear Embedding (LLE).
+
+
+Principal component analysis and its various variants deal with the
+problem of fitting a low-dimensional "affine
+subspace":"https://en.wikipedia.org/wiki/Affine_space" to a set of of
+data points in a high-dimensional space. With its family of methods it
+is one of the most used tools in data modeling, compression and
+visualization.
+
+!eblock
+
+
+!split
+===== Preprocessing our data =====
+!bblock
+
+Before we proceed however, we will discuss how to preprocess our
+data. Till now and in connection with our previous examples we have
+not met so many cases where we are too sensitive to the scaling of our
+data. Normally the data may need a rescaling and/or may be sensitive
+to extreme values. Scaling the data renders our inputs much more
+suitable for the algorithms we want to employ.
+
+_Scikit-Learn_ has several functions which allow us to rescale the
+data, normally resulting in much better results in terms of various
+accuracy scores. The _StandardScaler_ function in _Scikit-Learn_
+ensures that for each feature/predictor we study the mean value is
+zero and the variance is one (every column in the design/feature
+matrix). This scaling has the drawback that it does not ensure that
+we have a particular maximum or minimum in our data set. Another
+function included in _Scikit-Learn_ is the _MinMaxScaler_ which
+ensures that all features are exactly between $0$ and $1$. The
+
+!split
+===== More preprocessing =====
+
+
+The _Normalizer_ scales each data
+point such that the feature vector has a euclidean length of one. In other words, it
+projects a data point on the circle (or sphere in the case of higher dimensions) with a
+radius of 1. This means every data point is scaled by a different number (by the
+inverse of it’s length).
+This normalization is often used when only the direction (or angle) of the data matters,
+not the length of the feature vector.
+
+The _RobustScaler_ works similarly to the StandardScaler in that it
+ensures statistical properties for each feature that guarantee that
+they are on the same scale. However, the RobustScaler uses the median
+and quartiles, instead of mean and variance. This makes the
+RobustScaler ignore data points that are very different from the rest
+(like measurement errors). These odd data points are also called
+outliers, and might often lead to trouble for other scaling
+techniques.
+
+!eblock
+
+!split
+===== Simple preprocessing examples, Franke function and regression =====
+
+!bc pycod
+# Common imports
+import os
+import numpy as np
+import pandas as pd
+import matplotlib.pyplot as plt
+import sklearn.linear_model as skl
+from sklearn.metrics import mean_squared_error
+from sklearn.model_selection import train_test_split
+from sklearn.preprocessing import MinMaxScaler, StandardScaler, Normalizer
+
+# Where to save the figures and data files
+PROJECT_ROOT_DIR = "Results"
+FIGURE_ID = "Results/FigureFiles"
+DATA_ID = "DataFiles/"
+
+if not os.path.exists(PROJECT_ROOT_DIR):
+ os.mkdir(PROJECT_ROOT_DIR)
+
+if not os.path.exists(FIGURE_ID):
+ os.makedirs(FIGURE_ID)
+
+if not os.path.exists(DATA_ID):
+ os.makedirs(DATA_ID)
+
+def image_path(fig_id):
+ return os.path.join(FIGURE_ID, fig_id)
+
+def data_path(dat_id):
+ return os.path.join(DATA_ID, dat_id)
+
+def save_fig(fig_id):
+ plt.savefig(image_path(fig_id) + ".png", format='png')
+
+
+def FrankeFunction(x,y):
+ term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))
+ term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))
+ term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))
+ term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)
+ return term1 + term2 + term3 + term4
+
+
+def create_X(x, y, n ):
+ if len(x.shape) > 1:
+ x = np.ravel(x)
+ y = np.ravel(y)
+
+ N = len(x)
+ l = int((n+1)*(n+2)/2) # Number of elements in beta
+ X = np.ones((N,l))
+
+ for i in range(1,n+1):
+ q = int((i)*(i+1)/2)
+ for k in range(i+1):
+ X[:,q+k] = (x**(i-k))*(y**k)
+
+ return X
+
+
+# Making meshgrid of datapoints and compute Franke's function
+n = 5
+N = 1000
+x = np.sort(np.random.uniform(0, 1, N))
+y = np.sort(np.random.uniform(0, 1, N))
+z = FrankeFunction(x, y)
+X = create_X(x, y, n=n)
+# split in training and test data
+X_train, X_test, y_train, y_test = train_test_split(X,z,test_size=0.2)
+
+
+clf = skl.LinearRegression().fit(X_train, y_train)
+
+# The mean squared error and R2 score
+print("MSE before scaling: {:.2f}".format(mean_squared_error(clf.predict(X_test), y_test)))
+print("R2 score before scaling {:.2f}".format(clf.score(X_test,y_test)))
+
+scaler = StandardScaler()
+scaler.fit(X_train)
+X_train_scaled = scaler.transform(X_train)
+X_test_scaled = scaler.transform(X_test)
+
+print("Feature min values before scaling:\n {}".format(X_train.min(axis=0)))
+print("Feature max values before scaling:\n {}".format(X_train.max(axis=0)))
+
+print("Feature min values after scaling:\n {}".format(X_train_scaled.min(axis=0)))
+print("Feature max values after scaling:\n {}".format(X_train_scaled.max(axis=0)))
+
+clf = skl.LinearRegression().fit(X_train_scaled, y_train)
+
+
+print("MSE after scaling: {:.2f}".format(mean_squared_error(clf.predict(X_test_scaled), y_test)))
+print("R2 score for scaled data: {:.2f}".format(clf.score(X_test_scaled,y_test)))
+
+!ec
+
+
+
+
+
+
+
+!split
+===== The singular value decomposition =====
+
+!bblock
+
+The examples we have looked at so far are cases where we normally can
+invert the matrix $\bm{X}^T\bm{X}$. Using a polynomial expansion as we
+did both for the masses and the fitting of the equation of state,
+leads to row vectors of the design matrix which are essentially
+orthogonal due to the polynomial character of our model. Obtaining the inverse of the design matrix is then often done via a so-called LU, QR or Cholesky decomposition.
+
+
+
+This may
+however not the be case in general and a standard matrix inversion
+algorithm based on say LU, QR or Cholesky decomposition may lead to singularities. We will see examples of this below.
+
+There is however a way to partially circumvent this problem and also gain some insights about the ordinary least squares approach, and later shrinkage methods like Ridge and Lasso regressions.
+
+This is given by the _Singular Value Decomposition_ algorithm, perhaps
+the most powerful linear algebra algorithm. Let us look at a
+different example where we may have problems with the standard matrix
+inversion algorithm. Thereafter we dive into the math of the SVD.
+
+!eblock
+
+
+
+!split
+===== Linear Regression Problems =====
+
+One of the typical problems we encounter with linear regression, in particular
+when the matrix $\bm{X}$ (our so-called design matrix) is high-dimensional,
+are problems with near singular or singular matrices. The column vectors of $\bm{X}$
+may be linearly dependent, normally referred to as super-collinearity.
+This means that the matrix may be rank deficient and it is basically impossible to
+to model the data using linear regression. As an example, consider the matrix
+!bt
+\begin{align*}
+\mathbf{X} & = \left[
+\begin{array}{rrr}
+1 & -1 & 2
+\\
+1 & 0 & 1
+\\
+1 & 2 & -1
+\\
+1 & 1 & 0
+\end{array} \right]
+\end{align*}
+!et
+
+The columns of $\bm{X}$ are linearly dependent. We see this easily since the
+the first column is the row-wise sum of the other two columns. The rank (more correct,
+the column rank) of a matrix is the dimension of the space spanned by the
+column vectors. Hence, the rank of $\mathbf{X}$ is equal to the number
+of linearly independent columns. In this particular case the matrix has rank 2.
+
+Super-collinearity of an $(n \times p)$-dimensional design matrix $\mathbf{X}$ implies
+that the inverse of the matrix $\bm{X}^T\bm{X}$ (the matrix we need to invert to solve the linear regression equations) is non-invertible. If we have a square matrix that does not have an inverse, we say this matrix singular. The example here demonstrates this
+!bt
+\begin{align*}
+\bm{X} & = \left[
+\begin{array}{rr}
+1 & -1
+\\
+1 & -1
+\end{array} \right].
+\end{align*}
+!et
+We see easily that $\mbox{det}(\bm{X}) = x_{11} x_{22} - x_{12} x_{21} = 1 \times (-1) - 1 \times (-1) = 0$. Hence, $\mathbf{X}$ is singular and its inverse is undefined.
+This is equivalent to saying that the matrix $\bm{X}$ has at least an eigenvalue which is zero.
+
+
+!split
+===== Fixing the singularity =====
+
+If our design matrix $\bm{X}$ which enters the linear regression problem
+!bt
+\begin{align}
+\bm{\beta} & = (\bm{X}^{T} \bm{X})^{-1} \bm{X}^{T} \bm{y},
+\end{align}
+!et
+has linearly dependent column vectors, we will not be able to compute the inverse
+of $\bm{X}^T\bm{X}$ and we cannot find the parameters (estimators) $\beta_i$.
+The estimators are only well-defined if $(\bm{X}^{T}\bm{X})^{-1}$ exits.
+This is more likely to happen when the matrix $\bm{X}$ is high-dimensional. In this case it is likely to encounter a situation where
+the regression parameters $\beta_i$ cannot be estimated.
+
+A cheap *ad hoc* approach is simply to add a small diagonal component to the matrix to invert, that is we change
+!bt
+\[
+\bm{X}^{T} \bm{X} \rightarrow \bm{X}^{T} \bm{X}+\lambda \bm{I},
+\]
+!et
+where $\bm{I}$ is the identity matrix. When we discuss _Ridge_ regression this is actually what we end up evaluating. The parameter $\lambda$ is called a hyperparameter. More about this later.
+
+
+
+!split
+===== Basic math of the SVD =====
+
+
+From standard linear algebra we know that a square matrix $\bm{X}$ can be diagonalized if and only it is
+a so-called "normal matrix":"https://en.wikipedia.org/wiki/Normal_matrix", that is if $\bm{X}\in {\mathbb{R}}^{n\times n}$
+we have $\bm{X}\bm{X}^T=\bm{X}^T\bm{X}$ or if $\bm{X}\in {\mathbb{C}}^{n\times n}$ we have $\bm{X}\bm{X}^{\dagger}=\bm{X}^{\dagger}\bm{X}$.
+The matrix has then a set of eigenpairs
+
+!bt
+\[
+(\lambda_1,\bm{u}_1),\dots, (\lambda_n,\bm{u}_n),
+!et
+and the eigenvalues are given by the diagonal matrix
+!bt
+\[
+\bm{\Sigma}=\mathrm{Diag}(\lambda_1, \dots,\lambda_n).
+\]
+!et
+The matrix $\bm{X}$ can be written in terms of an orthogonal/unitary transformation $\bm{U}$
+!bt
+\[
+\bm{X} = \bm{U}\bm{\Sigma}\bm{V}^T,
+\]
+!et
+with $\bm{U}\bm{U}^T=\bm{I}$ or $\bm{U}\bm{U}^{\dagger}=\bm{I}$.
+
+Not all square matrices are diagonalizable. A matrix like the one discussed above
+!bt
+\[
+\bm{X} = \begin{bmatrix}
+1& -1 \\
+1& -1\\
+\end{bmatrix}
+\]
+!et
+is not diagonalizable, it is a so-called "defective matrix":"https://en.wikipedia.org/wiki/Defective_matrix". It is easy to see that the condition
+$\bm{X}\bm{X}^T=\bm{X}^T\bm{X}$ is not fulfilled.
+
+
+!split
+===== The SVD, a Fantastic Algorithm =====
+
+
+However, and this is the strength of the SVD algorithm, any general
+matrix $\bm{X}$ can be decomposed in terms of a diagonal matrix and
+two orthogonal/unitary matrices. The "Singular Value Decompostion
+(SVD) theorem":"https://en.wikipedia.org/wiki/Singular_value_decomposition"
+states that a general $m\times n$ matrix $\bm{X}$ can be written in
+terms of a diagonal matrix $\bm{\Sigma}$ of dimensionality $m\times n$
+and two orthognal matrices $\bm{U}$ and $\bm{V}$, where the first has
+dimensionality $m \times m$ and the last dimensionality $n\times n$.
+We have then
+
+!bt
+\[
+\bm{X} = \bm{U}\bm{\Sigma}\bm{V}^T
+\]
+!et
+
+As an example, the above defective matrix can be decomposed as
+
+!bt
+\[
+\bm{X} = \frac{1}{\sqrt{2}}\begin{bmatrix} 1& 1 \\ 1& -1\\ \end{bmatrix} \begin{bmatrix} 2& 0 \\ 0& 0\\ \end{bmatrix} \frac{1}{\sqrt{2}}\begin{bmatrix} 1& -1 \\ 1& 1\\ \end{bmatrix}=\bm{U}\bm{\Sigma}\bm{V}^T,
+\]
+!et
+
+with eigenvalues $\sigma_1=2$ and $\sigma_2=0$.
+The SVD exits always!
+
+The SVD
+decomposition (singular values) gives eigenvalues
+$\sigma_i\geq\sigma_{i+1}$ for all $i$ and for dimensions larger than $i=p$, the
+eigenvalues (singular values) are zero.
+
+In the general case, where our design matrix $\bm{X}$ has dimension
+$n\times p$, the matrix is thus decomposed into an $n\times n$
+orthogonal matrix $\bm{U}$, a $p\times p$ orthogonal matrix $\bm{V}$
+and a diagonal matrix $\bm{\Sigma}$ with $r=\mathrm{min}(n,p)$
+singular values $\sigma_i\geq 0$ on the main diagonal and zeros filling
+the rest of the matrix. There are at most $p$ singular values
+assuming that $n > p$. In our regression examples for the nuclear
+masses and the equation of state this is indeed the case, while for
+the Ising model we have $p > n$. These are often cases that lead to
+near singular or singular matrices.
+
+The columns of $\bm{U}$ are called the left singular vectors while the columns of $\bm{V}$ are the right singular vectors.
+
+!split
+===== Economy-size SVD =====
+
+If we assume that $n > p$, then our matrix $\bm{U}$ has dimension $n
+\times n$. The last $n-p$ columns of $\bm{U}$ become however
+irrelevant in our calculations since they are multiplied with the
+zeros in $\bm{\Sigma}$.
+
+The economy-size decomposition removes extra rows or columns of zeros
+from the diagonal matrix of singular values, $\bm{\Sigma}$, along with the columns
+in either $\bm{U}$ or $\bm{V}$ that multiply those zeros in the expression.
+Removing these zeros and columns can improve execution time
+and reduce storage requirements without compromising the accuracy of
+the decomposition.
+
+If $n > p$, we keep only the first $p$ columns of $\bm{U}$ and $\bm{\Sigma}$ has dimension $p\times p$.
+If $p > n$, then only the first $n$ columns of $\bm{V}$ are computed and $\bm{\Sigma}$ has dimension $n\times n$.
+The $n=p$ case is obvious, we retain the full SVD.
+In general the economy-size SVD leads to less FLOPS and still conserving the desired accuracy.
+
+!split
+===== Codes for the SVD =====
+
+!bc pycod
+import numpy as np
+# SVD inversion
+def SVDinv(A):
+ ''' Takes as input a numpy matrix A and returns inv(A) based on singular value decomposition (SVD).
+ SVD is numerically more stable than the inversion algorithms provided by
+ numpy and scipy.linalg at the cost of being slower.
+ '''
+ U, s, VT = np.linalg.svd(A)
+# print('test U')
+# print( (np.transpose(U) @ U - U @np.transpose(U)))
+# print('test VT')
+# print( (np.transpose(VT) @ VT - VT @np.transpose(VT)))
+ print(U)
+ print(s)
+ print(VT)
+
+ D = np.zeros((len(U),len(VT)))
+ for i in range(0,len(VT)):
+ D[i,i]=s[i]
+ UT = np.transpose(U); V = np.transpose(VT); invD = np.linalg.inv(D)
+ return np.matmul(V,np.matmul(invD,UT))
+
+
+X = np.array([ [1.0, -1.0, 2.0], [1.0, 0.0, 1.0], [1.0, 2.0, -1.0], [1.0, 1.0, 0.0] ])
+print(X)
+A = np.transpose(X) @ X
+print(A)
+# Brute force inversion of super-collinear matrix
+#B = np.linalg.inv(A)
+#print(B)
+C = SVDinv(A)
+print(C)
+
+!ec
+
+The matrix $\bm{X}$ has columns that are linearly dependent. The first
+column is the row-wise sum of the other two columns. The rank of a
+matrix (the column rank) is the dimension of space spanned by the
+column vectors. The rank of the matrix is the number of linearly
+independent columns, in this case just $2$. We see this from the
+singular values when running the above code. Running the standard
+inversion algorithm for matrix inversion with $\bm{X}^T\bm{X}$ results
+in the program terminating due to a singular matrix.
+
+
+
+!split
+===== Mathematical Properties =====
+
+There are several interesting mathematical properties which will be
+relevant when we are going to discuss the differences between say
+ordinary least squares (OLS) and _Ridge_ regression.
+
+We have from OLS that the parameters of the linear approximation are given by
+!bt
+\[
+\bm{\tilde{y}} = \bm{X}\bm{\beta} = \bm{X}\left(\bm{X}^T\bm{X}\right)^{-1}\bm{X}^T\bm{y}.
+\]
+!et
+
+The matrix to invert can be rewritten in terms of our SVD decomposition as
+
+!bt
+\[
+\bm{X}^T\bm{X} = \bm{V}\bm{\Sigma}^T\bm{U}^T\bm{U}\bm{\Sigma}\bm{V}^T.
+\]
+!et
+Using the orthogonality properties of $\bm{U}$ we have
+
+!bt
+\[
+\bm{X}^T\bm{X} = \bm{V}\bm{\Sigma}^T\bm{\Sigma}\bm{V}^T = \bm{V}\bm{D}\bm{V}^T,
+\]
+!et
+with $\bm{D}$ being a diagonal matrix with values along the diagonal given by the singular values squared.
+
+This means that
+!bt
+\[
+(\bm{X}^T\bm{X})\bm{V} = \bm{V}\bm{D},
+\]
+!et
+that is the eigenvectors of $(\bm{X}^T\bm{X})$ are given by the columns of the right singular matrix of $\bm{X}$ and the eigenvalues are the squared singular values. It is easy to show (show this) that
+!bt
+\[
+(\bm{X}\bm{X}^T)\bm{U} = \bm{U}\bm{D},
+\]
+!et
+that is, the eigenvectors of $(\bm{X}\bm{X})^T$ are the columns of the left singular matrix and the eigenvalues are the same.
+
+Going back to our OLS equation we have
+!bt
+\[
+\bm{X}\bm{\beta} = \bm{X}\left(\bm{V}\bm{D}\bm{V}^T \right)^{-1}\bm{X}^T\bm{y}=\bm{U\Sigma V^T}\left(\bm{V}\bm{D}\bm{V}^T \right)^{-1}(\bm{U\Sigma V^T})^T\bm{y}=\bm{U}\bm{U}^T\bm{y}.
+\]
+!et
+We will come back to this expression when we discuss Ridge regression.
+
+
+$$ \tilde{y}^{OLS}=\bm{X}\hat{\beta}^{OLS}=\sum_{j=1}^p \bm{u}_j\bm{u}_j^T\bm{y}$$ and for Ridge we have
+
+$$ \tilde{y}^{Ridge}=\bm{X}\hat{\beta}^{Ridge}=\sum_{j=1}^p \bm{u}_j\frac{\sigma_j^2}{\sigma_j^2+\lambda}\bm{u}_j^T\bm{y}$$ .
+
+It is indeed the economy-sized SVD, note the summation runs up tp $$p$$ only and not $$n$$.
+
+Here we have that $$\bm{X} = \bm{U}\bm{\Sigma}\bm{V}^T$$, with $$\Sigma$$ being an $$ n\times p$$ matrix and $$\bm{V}$$ being a $$ p\times p$$ matrix. We also have assumed here that $$ n > p$$.
+
+
+!split
+===== Ridge and LASSO Regression =====
+
+Let us remind ourselves about the expression for the standard Mean Squared Error (MSE) which we used to define our cost function and the equations for the ordinary least squares (OLS) method, that is
+our optimization problem is
+!bt
+\[
+{\displaystyle \min_{\bm{\beta}\in {\mathbb{R}}^{p}}}\frac{1}{n}\left\{\left(\bm{y}-\bm{X}\bm{\beta}\right)^T\left(\bm{y}-\bm{X}\bm{\beta}\right)\right\}.
+\]
+!et
+or we can state it as
+!bt
+\[
+{\displaystyle \min_{\bm{\beta}\in
+{\mathbb{R}}^{p}}}\frac{1}{n}\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2=\frac{1}{n}\vert\vert \bm{y}-\bm{X}\bm{\beta}\vert\vert_2^2,
+\]
+!et
+where we have used the definition of a norm-2 vector, that is
+!bt
+\[
+\vert\vert \bm{x}\vert\vert_2 = \sqrt{\sum_i x_i^2}.
+\]
+!et
+
+By minimizing the above equation with respect to the parameters
+$\bm{\beta}$ we could then obtain an analytical expression for the
+parameters $\bm{\beta}$. We can add a regularization parameter $\lambda$ by
+defining a new cost function to be optimized, that is
+
+!bt
+\[
+{\displaystyle \min_{\bm{\beta}\in
+{\mathbb{R}}^{p}}}\frac{1}{n}\vert\vert \bm{y}-\bm{X}\bm{\beta}\vert\vert_2^2+\lambda\vert\vert \bm{\beta}\vert\vert_2^2
+\]
+!et
+
+which leads to the Ridge regression minimization problem where we
+require that $\vert\vert \bm{\beta}\vert\vert_2^2\le t$, where $t$ is
+a finite number larger than zero. By defining
+
+!bt
+\[
+C(\bm{X},\bm{\beta})=\frac{1}{n}\vert\vert \bm{y}-\bm{X}\bm{\beta}\vert\vert_2^2+\lambda\vert\vert \bm{\beta}\vert\vert_1,
+\]
+!et
+
+we have a new optimization equation
+!bt
+\[
+{\displaystyle \min_{\bm{\beta}\in
+{\mathbb{R}}^{p}}}\frac{1}{n}\vert\vert \bm{y}-\bm{X}\bm{\beta}\vert\vert_2^2+\lambda\vert\vert \bm{\beta}\vert\vert_1
+\]
+!et
+which leads to Lasso regression. Lasso stands for least absolute shrinkage and selection operator.
+
+Here we have defined the norm-1 as
+!bt
+\[
+\vert\vert \bm{x}\vert\vert_1 = \sum_i \vert x_i\vert.
+\]
+!et
+
+
+!split
+===== More on Ridge Regression =====
+
+Using the matrix-vector expression for Ridge regression,
+
+!bt
+\[
+C(\bm{X},\bm{\beta})=\frac{1}{n}\left\{(\bm{y}-\bm{X}\bm{\beta})^T(\bm{y}-\bm{X}\bm{\beta})\right\}+\lambda\bm{\beta}^T\bm{\beta},
+\]
+!et
+
+by taking the derivatives with respect to $\bm{\beta}$ we obtain then
+a slightly modified matrix inversion problem which for finite values
+of $\lambda$ does not suffer from singularity problems. We obtain
+
+!bt
+\[
+\bm{\beta}^{\mathrm{Ridge}} = \left(\bm{X}^T\bm{X}+\lambda\bm{I}\right)^{-1}\bm{X}^T\bm{y},
+\]
+!et
+
+with $\bm{I}$ being a $p\times p$ identity matrix with the constraint that
+
+!bt
+\[
+\sum_{i=0}^{p-1} \beta_i^2 \leq t,
+\]
+!et
+
+with $t$ a finite positive number.
+
+We see that Ridge regression is nothing but the standard
+OLS with a modified diagonal term added to $\bm{X}^T\bm{X}$. The
+consequences, in particular for our discussion of the bias-variance tradeoff
+are rather interesting.
+
+Furthermore, if we use the result above in terms of the SVD decomposition (our analysis was done for the OLS method), we had
+!bt
+\[
+(\bm{X}\bm{X}^T)\bm{U} = \bm{U}\bm{D}.
+\]
+!et
+
+We can analyse the OLS solutions in terms of the eigenvectors (the columns) of the right singular value matrix $\bm{U}$ as
+!bt
+\[
+\bm{X}\bm{\beta} = \bm{X}\left(\bm{V}\bm{D}\bm{V}^T \right)^{-1}\bm{X}^T\bm{y}=\bm{U\Sigma V^T}\left(\bm{V}\bm{D}\bm{V}^T \right)^{-1}(\bm{U\Sigma V^T})^T\bm{y}=\bm{U}\bm{U}^T\bm{y}
+\]
+!et
+
+
+For Ridge regression this becomes
+
+!bt
+\[
+\bm{X}\bm{\beta}^{\mathrm{Ridge}} = \bm{U\Sigma V^T}\left(\bm{V}\bm{D}\bm{V}^T+\lambda\bm{I} \right)^{-1}(\bm{U\Sigma V^T})^T\bm{y}=\sum_{j=0}^{p-1}\bm{u}_j\bm{u}_j^T\frac{\sigma_j^2}{\sigma_j^2+\lambda}\bm{y},
+\]
+!et
+
+with the vectors $\bm{u}_j$ being the columns of $\bm{U}$.
+
+!split
+===== Interpreting the Ridge results =====
+
+Since $\lambda \geq 0$, it means that compared to OLS, we have
+
+!bt
+\[
+\frac{\sigma_j^2}{\sigma_j^2+\lambda} \leq 1.
+\]
+!et
+
+Ridge regression finds the coordinates of $\bm{y}$ with respect to the
+orthonormal basis $\bm{U}$, it then shrinks the coordinates by
+$\frac{\sigma_j^2}{\sigma_j^2+\lambda}$. Recall that the SVD has
+eigenvalues ordered in a descending way, that is $\sigma_i \geq
+\sigma_{i+1}$.
+
+For small eigenvalues $\sigma_i$ it means that their contributions become less important, a fact which can be used to reduce the number of degrees of freedom.
+Actually, calculating the variance of $\bm{X}\bm{v}_j$ shows that this quantity is equal to $\sigma_j^2/n$.
+With a parameter $\lambda$ we can thus shrink the role of specific parameters.
+
+
+!split
+===== More interpretations =====
+
+For the sake of simplicity, let us assume that the design matrix is orthonormal, that is
+
+!bt
+\[
+\bm{X}^T\bm{X}=(\bm{X}^T\bm{X})^{-1} =\bm{I}.
+\]
+!et
+
+In this case the standard OLS results in
+!bt
+\[
+\bm{\beta}^{\mathrm{OLS}} = \bm{X}^T\bm{y}=\sum_{i=0}^{p-1}\bm{u}_j\bm{u}_j^T\bm{y},
+\]
+!et
+
+and
+
+!bt
+\[
+\bm{\beta}^{\mathrm{Ridge}} = \left(\bm{I}+\lambda\bm{I}\right)^{-1}\bm{X}^T\bm{y}=\left(1+\lambda\right)^{-1}\bm{\beta}^{\mathrm{OLS}},
+\]
+!et
+
+that is the Ridge estimator scales the OLS estimator by the inverse of a factor $1+\lambda$, and
+the Ridge estimator converges to zero when the hyperparameter goes to
+infinity.
+
+We will come back to more interpreations after we have gone through some of the statistical analysis part.
+
+For more discussions of Ridge and Lasso regression, "Wessel van Wieringen's":"https://arxiv.org/abs/1509.09169" article is highly recommended.
+Similarly, "Mehta et al's article":"https://arxiv.org/abs/1803.08823" is also recommended.
+
+
+!split
+===== A better understanding of regularization =====
+
+The parameter $\lambda$ that we have introduced in the Ridge (and
+Lasso as well) regression is often called a regularization parameter
+or shrinkage parameter. It is common to call it a hyperparameter. What does it mean mathemtically?
+
+Here we will first look at how to analyze the difference between the
+standard OLS equations and the Ridge expressions in terms of a linear
+algebra analysis using the SVD algorithm. Thereafter, we will link
+(see the material on the bias-variance tradeoff below) these
+observation to the statisical analysis of the results. In particular
+we consider how the variance of the parameters $\bm{\beta}$ is
+affected by changing the parameter $\lambda$.
+
+!split
+===== Decomposing the OLS and Ridge expressions =====
+
+We have our design matrix
+ $\bm{X}\in {\mathbb{R}}^{n\times p}$. With the SVD we decompose it as
+
+!bt
+\[
+\bm{X} = \bm{U\Sigma V^T},
+\]
+!et
+
+with $\bm{U}\in {\mathbb{R}}^{n\times n}$, $\bm{\Sigma}\in {\mathbb{R}}^{n\times p}$
+and $\bm{V}\in {\mathbb{R}}^{p\times p}$.
+
+The matrices $\bm{U}$ and $\bm{V}$ are unitary/orthonormal matrices, that is in case the matrices are real we have $\bm{U}^T\bm{U}=\bm{U}\bm{U}^T=\bm{I}$ and $\bm{V}^T\bm{V}=\bm{V}\bm{V}^T=\bm{I}$.
+
+
+
+!split
+===== Introducing the Covariance and Correlation functions =====
+
+Before we discuss the link between for example Ridge regression and the singular value decomposition, we need to remind ourselves about
+the definition of the covariance and the correlation function. These are quantities
+
+Suppose we have defined two vectors
+$\hat{x}$ and $\hat{y}$ with $n$ elements each. The covariance matrix $\bm{C}$ is defined as
+!bt
+\[
+\bm{C}[\bm{x},\bm{y}] = \begin{bmatrix} \mathrm{cov}[\bm{x},\bm{x}] & \mathrm{cov}[\bm{x},\bm{y}] \\
+ \mathrm{cov}[\bm{y},\bm{x}] & \mathrm{cov}[\bm{y},\bm{y}] \\
+ \end{bmatrix},
+\]
+!et
+where for example
+!bt
+\[
+\mathrm{cov}[\bm{x},\bm{y}] =\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})(y_i- \overline{y}).
+\]
+!et
+With this definition and recalling that the variance is defined as
+!bt
+\[
+\mathrm{var}[\bm{x}]=\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})^2,
+\]
+!et
+we can rewrite the covariance matrix as
+!bt
+\[
+\bm{C}[\bm{x},\bm{y}] = \begin{bmatrix} \mathrm{var}[\bm{x}] & \mathrm{cov}[\bm{x},\bm{y}] \\
+ \mathrm{cov}[\bm{x},\bm{y}] & \mathrm{var}[\bm{y}] \\
+ \end{bmatrix}.
+\]
+!et
+
+The covariance takes values between zero and infinity and may thus
+lead to problems with loss of numerical precision for particularly
+large values. It is common to scale the covariance matrix by
+introducing instead the correlation matrix defined via the so-called
+correlation function
+
+!bt
+\[
+\mathrm{corr}[\bm{x},\bm{y}]=\frac{\mathrm{cov}[\bm{x},\bm{y}]}{\sqrt{\mathrm{var}[\bm{x}] \mathrm{var}[\bm{y}]}}.
+\]
+!et
+
+The correlation function is then given by values $\mathrm{corr}[\bm{x},\bm{y}]
+\in [-1,1]$. This avoids eventual problems with too large values. We
+can then define the correlation matrix for the two vectors $\bm{x}$
+and $\bm{y}$ as
+
+!bt
+\[
+\bm{K}[\bm{x},\bm{y}] = \begin{bmatrix} 1 & \mathrm{corr}[\bm{x},\bm{y}] \\
+ \mathrm{corr}[\bm{y},\bm{x}] & 1 \\
+ \end{bmatrix},
+\]
+!et
+
+In the above example this is the function we constructed using _pandas_.
+
+!split
+===== Correlation Function and Design/Feature Matrix =====
+
+In our derivation of the various regression algorithms like _Ordinary Least Squares_ or _Ridge regression_
+we defined the design/feature matrix $\bm{X}$ as
+
+!bt
+\[
+\bm{X}=\begin{bmatrix}
+x_{0,0} & x_{0,1} & x_{0,2}& \dots & \dots x_{0,p-1}\\
+x_{1,0} & x_{1,1} & x_{1,2}& \dots & \dots x_{1,p-1}\\
+x_{2,0} & x_{2,1} & x_{2,2}& \dots & \dots x_{2,p-1}\\
+\dots & \dots & \dots & \dots \dots & \dots \\
+x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \dots & \dots x_{n-2,p-1}\\
+x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \dots & \dots x_{n-1,p-1}\\
+\end{bmatrix},
+\]
+!et
+with $\bm{X}\in {\mathbb{R}}^{n\times p}$, with the predictors/features $p$ refering to the column numbers and the
+entries $n$ being the row elements.
+We can rewrite the design/feature matrix in terms of its column vectors as
+!bt
+\[
+\bm{X}=\begin{bmatrix} \bm{x}_0 & \bm{x}_1 & \bm{x}_2 & \dots & \dots & \bm{x}_{p-1}\end{bmatrix},
+\]
+!et
+with a given vector
+!bt
+\[
+\bm{x}_i^T = \begin{bmatrix}x_{0,i} & x_{1,i} & x_{2,i}& \dots & \dots x_{n-1,i}\end{bmatrix}.
+\]
+!et
+
+With these definitions, we can now rewrite our $2\times 2$
+correaltion/covariance matrix in terms of a moe general design/feature
+matrix $\bm{X}\in {\mathbb{R}}^{n\times p}$. This leads to a $p\times p$
+covariance matrix for the vectors $\bm{x}_i$ with $i=0,1,\dots,p-1$
+
+!bt
+\[
+\bm{C}[\bm{x}] = \begin{bmatrix}
+\mathrm{var}[\bm{x}_0] & \mathrm{cov}[\bm{x}_0,\bm{x}_1] & \mathrm{cov}[\bm{x}_0,\bm{x}_2] & \dots & \dots & \mathrm{cov}[\bm{x}_0,\bm{x}_{p-1}]\\
+\mathrm{cov}[\bm{x}_1,\bm{x}_0] & \mathrm{var}[\bm{x}_1] & \mathrm{cov}[\bm{x}_1,\bm{x}_2] & \dots & \dots & \mathrm{cov}[\bm{x}_1,\bm{x}_{p-1}]\\
+\mathrm{cov}[\bm{x}_2,\bm{x}_0] & \mathrm{cov}[\bm{x}_2,\bm{x}_1] & \mathrm{var}[\bm{x}_2] & \dots & \dots & \mathrm{cov}[\bm{x}_2,\bm{x}_{p-1}]\\
+\dots & \dots & \dots & \dots & \dots & \dots \\
+\dots & \dots & \dots & \dots & \dots & \dots \\
+\mathrm{cov}[\bm{x}_{p-1},\bm{x}_0] & \mathrm{cov}[\bm{x}_{p-1},\bm{x}_1] & \mathrm{cov}[\bm{x}_{p-1},\bm{x}_{2}] & \dots & \dots & \mathrm{var}[\bm{x}_{p-1}]\\
+\end{bmatrix},
+\]
+!et
+and the correlation matrix
+!bt
+\[
+\bm{K}[\bm{x}] = \begin{bmatrix}
+1 & \mathrm{corr}[\bm{x}_0,\bm{x}_1] & \mathrm{corr}[\bm{x}_0,\bm{x}_2] & \dots & \dots & \mathrm{corr}[\bm{x}_0,\bm{x}_{p-1}]\\
+\mathrm{corr}[\bm{x}_1,\bm{x}_0] & 1 & \mathrm{corr}[\bm{x}_1,\bm{x}_2] & \dots & \dots & \mathrm{corr}[\bm{x}_1,\bm{x}_{p-1}]\\
+\mathrm{corr}[\bm{x}_2,\bm{x}_0] & \mathrm{corr}[\bm{x}_2,\bm{x}_1] & 1 & \dots & \dots & \mathrm{corr}[\bm{x}_2,\bm{x}_{p-1}]\\
+\dots & \dots & \dots & \dots & \dots & \dots \\
+\dots & \dots & \dots & \dots & \dots & \dots \\
+\mathrm{corr}[\bm{x}_{p-1},\bm{x}_0] & \mathrm{corr}[\bm{x}_{p-1},\bm{x}_1] & \mathrm{corr}[\bm{x}_{p-1},\bm{x}_{2}] & \dots & \dots & 1\\
+\end{bmatrix},
+\]
+!et
+
+
+!split
+===== Covariance Matrix Examples =====
+
+
+The Numpy function _np.cov_ calculates the covariance elements using
+the factor $1/(n-1)$ instead of $1/n$ since it assumes we do not have
+the exact mean values. The following simple function uses the
+_np.vstack_ function which takes each vector of dimension $1\times n$
+and produces a $2\times n$ matrix $\bm{W}$
+
+
+!bt
+\[
+\bm{W} = \begin{bmatrix} x_0 & y_0 \\
+ x_1 & y_1 \\
+ x_2 & y_2\\
+ \dots & \dots \\
+ x_{n-2} & y_{n-2}\\
+ x_{n-1} & y_{n-1} &
+ \end{bmatrix},
+\]
+!et
+
+which in turn is converted into into the $2\times 2$ covariance matrix
+$\bm{C}$ via the Numpy function _np.cov()_. We note that we can also calculate
+the mean value of each set of samples $\bm{x}$ etc using the Numpy
+function _np.mean(x)_. We can also extract the eigenvalues of the
+covariance matrix through the _np.linalg.eig()_ function.
+
+!bc pycod
+# Importing various packages
+import numpy as np
+n = 100
+x = np.random.normal(size=n)
+print(np.mean(x))
+y = 4+3*x+np.random.normal(size=n)
+print(np.mean(y))
+W = np.vstack((x, y))
+C = np.cov(W)
+print(C)
+!ec
+
+!split
+===== Correlation Matrix =====
+
+The previous example can be converted into the correlation matrix by
+simply scaling the matrix elements with the variances. We should also
+subtract the mean values for each column. This leads to the following
+code which sets up the correlations matrix for the previous example in
+a more brute force way. Here we scale the mean values for each column of the design matrix, calculate the relevant mean values and variances and then finally set up the $2\times 2$ correlation matrix (since we have only two vectors).
+
+!bc pycod
+import numpy as np
+n = 100
+# define two vectors
+x = np.random.random(size=n)
+y = 4+3*x+np.random.normal(size=n)
+#scaling the x and y vectors
+x = x - np.mean(x)
+y = y - np.mean(y)
+variance_x = np.sum(x@x)/n
+variance_y = np.sum(y@y)/n
+print(variance_x)
+print(variance_y)
+cov_xy = np.sum(x@y)/n
+cov_xx = np.sum(x@x)/n
+cov_yy = np.sum(y@y)/n
+C = np.zeros((2,2))
+C[0,0]= cov_xx/variance_x
+C[1,1]= cov_yy/variance_y
+C[0,1]= cov_xy/np.sqrt(variance_y*variance_x)
+C[1,0]= C[0,1]
+print(C)
+!ec
+
+We see that the matrix elements along the diagonal are one as they
+should be and that the matrix is symmetric. Furthermore, diagonalizing
+this matrix we easily see that it is a positive definite matrix.
+
+The above procedure with _numpy_ can be made more compact if we use _pandas_.
+
+!split
+===== Correlation Matrix with Pandas =====
+
+We whow here how we can set up the correlation matrix using _pandas_, as done in this simple code
+!bc pycod
+import numpy as np
+import pandas as pd
+n = 10
+x = np.random.normal(size=n)
+x = x - np.mean(x)
+y = 4+3*x+np.random.normal(size=n)
+y = y - np.mean(y)
+X = (np.vstack((x, y))).T
+print(X)
+Xpd = pd.DataFrame(X)
+print(Xpd)
+correlation_matrix = Xpd.corr()
+print(correlation_matrix)
+!ec
+
+
+We expand this model to the Franke function discussed above.
+
+!split
+===== Correlation Matrix with Pandas and the Franke function =====
+
+!bc pycod
+# Common imports
+import numpy as np
+import pandas as pd
+
+
+def FrankeFunction(x,y):
+ term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))
+ term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))
+ term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))
+ term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)
+ return term1 + term2 + term3 + term4
+
+
+def create_X(x, y, n ):
+ if len(x.shape) > 1:
+ x = np.ravel(x)
+ y = np.ravel(y)
+
+ N = len(x)
+ l = int((n+1)*(n+2)/2) # Number of elements in beta
+ X = np.ones((N,l))
+
+ for i in range(1,n+1):
+ q = int((i)*(i+1)/2)
+ for k in range(i+1):
+ X[:,q+k] = (x**(i-k))*(y**k)
+
+ return X
+
+
+# Making meshgrid of datapoints and compute Franke's function
+n = 4
+N = 100
+x = np.sort(np.random.uniform(0, 1, N))
+y = np.sort(np.random.uniform(0, 1, N))
+z = FrankeFunction(x, y)
+X = create_X(x, y, n=n)
+
+Xpd = pd.DataFrame(X)
+# subtract the mean values and set up the covariance matrix
+Xpd = Xpd - Xpd.mean()
+covariance_matrix = Xpd.cov()
+print(covariance_matrix)
+!ec
+
+We note here that the covariance is zero for the first rows and
+columns since all matrix elements in the design matrix were set to one
+(we are fitting the function in terms of a polynomial of degree $n$).
+
+This means that the variance for these elements will be zero and will
+cause problems when we set up the correlation matrix. We can simply
+drop these elements and construct a correlation
+matrix without these elements.
+
+
+!split
+===== Rewriting the Covariance and/or Correlation Matrix =====
+
+We can rewrite the covariance matrix in a more compact form in terms of the design/feature matrix $\bm{X}$ as
+!bt
+\[
+\bm{C}[\bm{x}] = \frac{1}{n}\bm{X}^T\bm{X}= \mathbb{E}[\bm{X}^T\bm{X}].
+\]
+!et
+
+To see this let us simply look at a design matrix $\bm{X}\in {\mathbb{R}}^{2\times 2}$
+!bt
+\[
+\bm{X}=\begin{bmatrix}
+x_{00} & x_{01}\\
+x_{10} & x_{11}\\
+\end{bmatrix}=\begin{bmatrix}
+\bm{x}_{0} & \bm{x}_{1}\\
+\end{bmatrix}.
+\]
+!et
+
+If we then compute the expectation value
+!bt
+\[
+\mathbb{E}[\bm{X}^T\bm{X}] = \frac{1}{n}\bm{X}^T\bm{X}=\begin{bmatrix}
+x_{00}^2+x_{01}^2 & x_{00}x_{10}+x_{01}x_{11}\\
+x_{10}x_{00}+x_{11}x_{01} & x_{10}^2+x_{11}^2\\
+\end{bmatrix},
+\]
+!et
+which is just
+!bt
+\[
+\bm{C}[\bm{x}_0,\bm{x}_1] = \bm{C}[\bm{x}]=\begin{bmatrix} \mathrm{var}[\bm{x}_0] & \mathrm{cov}[\bm{x}_0,\bm{x}_1] \\
+ \mathrm{cov}[\bm{x}_1,\bm{x}_0] & \mathrm{var}[\bm{x}_1] \\
+ \end{bmatrix},
+\]
+!et
+where we wrote $$\bm{C}[\bm{x}_0,\bm{x}_1] = \bm{C}[\bm{x}]$$ to indicate that this the covariance of the vectors $\bm{x}$ of the design/feature matrix $\bm{X}$.
+
+It is easy to generalize this to a matrix $\bm{X}\in {\mathbb{R}}^{n\times p}$.
+
+
+!split
+===== Linking with SVD =====
+
+See lecture september 11. More text to be added here soon.
+
+
+
+
+!split
+===== Where are we going? =====
+
+Before we proceed, we need to rethink what we have been doing. In our
+eager to fit the data, we have omitted several important elements in
+our regression analysis. In what follows we will
+o look at statistical properties, including a discussion of mean values, variance and the so-called bias-variance tradeoff
+o introduce resampling techniques like cross-validation, bootstrapping and jackknife and more
+
+This will allow us to link the standard linear algebra methods we have discussed above to a statistical interpretation of the methods.
+
+
+
+
+
+!split
+===== Resampling methods =====
+!bblock
+Resampling methods are an indispensable tool in modern
+statistics. They involve repeatedly drawing samples from a training
+set and refitting a model of interest on each sample in order to
+obtain additional information about the fitted model. For example, in
+order to estimate the variability of a linear regression fit, we can
+repeatedly draw different samples from the training data, fit a linear
+regression to each new sample, and then examine the extent to which
+the resulting fits differ. Such an approach may allow us to obtain
+information that would not be available from fitting the model only
+once using the original training sample.
+
+Two resampling methods are often used in Machine Learning analyses,
+o The _bootstrap method_
+o and _Cross-Validation_
+
+In addition there are several other methods such as the Jackknife and the Blocking methods. We will discuss in particular
+cross-validation and the bootstrap method.
+
+
+!eblock
+
+
+!split
+===== Resampling approaches can be computationally expensive =====
+!bblock
+
+Resampling approaches can be computationally expensive, because they
+involve fitting the same statistical method multiple times using
+different subsets of the training data. However, due to recent
+advances in computing power, the computational requirements of
+resampling methods generally are not prohibitive. In this chapter, we
+discuss two of the most commonly used resampling methods,
+cross-validation and the bootstrap. Both methods are important tools
+in the practical application of many statistical learning
+procedures. For example, cross-validation can be used to estimate the
+test error associated with a given statistical learning method in
+order to evaluate its performance, or to select the appropriate level
+of flexibility. The process of evaluating a model’s performance is
+known as model assessment, whereas the process of selecting the proper
+level of flexibility for a model is known as model selection. The
+bootstrap is widely used.
+
+!eblock
+
+!split
+===== Why resampling methods ? =====
+!bblock Statistical analysis
+
+* Our simulations can be treated as *computer experiments*. This is particularly the case for Monte Carlo methods
+* The results can be analysed with the same statistical tools as we would use analysing experimental data.
+* As in all experiments, we are looking for expectation values and an estimate of how accurate they are, i.e., possible sources for errors.
+
+
+!eblock
+
+!split
+===== Statistical analysis =====
+!bblock
+
+* As in other experiments, many numerical experiments have two classes of errors:
+ * Statistical errors
+ * Systematical errors
+* Statistical errors can be estimated using standard tools from statistics
+* Systematical errors are method specific and must be treated differently from case to case.
+!eblock
+
+
+
+
+!split
+===== Linking the regression analysis with a statistical interpretation =====
+
+
+The
+advantage of doing linear regression is that we actually end up with
+analytical expressions for several statistical quantities.
+Standard least squares and Ridge regression allow us to
+derive quantities like the variance and other expectation values in a
+rather straightforward way.
+
+
+It is assumed that $\varepsilon_i
+\sim \mathcal{N}(0, \sigma^2)$ and the $\varepsilon_{i}$ are
+independent, i.e.:
+!bt
+\begin{align*}
+\mbox{Cov}(\varepsilon_{i_1},
+\varepsilon_{i_2}) & = \left\{ \begin{array}{lcc} \sigma^2 & \mbox{if}
+& i_1 = i_2, \\ 0 & \mbox{if} & i_1 \not= i_2. \end{array} \right.
+\end{align*}
+!et
+The randomness of $\varepsilon_i$ implies that
+$\mathbf{y}_i$ is also a random variable. In particular,
+$\mathbf{y}_i$ is normally distributed, because $\varepsilon_i \sim
+\mathcal{N}(0, \sigma^2)$ and $\mathbf{X}_{i,\ast} \, \bm{\beta}$ is a
+non-random scalar. To specify the parameters of the distribution of
+$\mathbf{y}_i$ we need to calculate its first two moments.
+
+Recall that $\bm{X}$ is a matrix of dimensionality $n\times p$. The
+notation above $\mathbf{X}_{i,\ast}$ means that we are looking at the
+row number $i$ and perform a sum over all values $p$.
+
+
+!split
+===== Assumptions made =====
+
+The assumption we have made here can be summarized as (and this is going to be useful when we discuss the bias-variance trade off)
+that there exists a function $f(\bm{x})$ and a normal distributed error $\bm{\varepsilon}\sim \mathcal{N}(0, \sigma^2)$
+which describe our data
+!bt
+\[
+\bm{y} = f(\bm{x})+\bm{\varepsilon}
+\]
+!et
+
+We approximate this function with our model from the solution of the linear regression equations, that is our
+function $f$ is approximated by $\bm{\tilde{y}}$ where we want to minimize $(\bm{y}-\bm{\tilde{y}})^2$, our MSE, with
+!bt
+\[
+\bm{\tilde{y}} = \bm{X}\bm{\beta}.
+\]
+!et
+
+!split
+===== Expectation value and variance =====
+
+We can calculate the expectation value of $\bm{y}$ for a given element $i$
+!bt
+\begin{align*}
+\mathbb{E}(y_i) & =
+\mathbb{E}(\mathbf{X}_{i, \ast} \, \bm{\beta}) + \mathbb{E}(\varepsilon_i)
+\, \, \, = \, \, \, \mathbf{X}_{i, \ast} \, \beta,
+\end{align*}
+!et
+while
+its variance is
+!bt
+\begin{align*} \mbox{Var}(y_i) & = \mathbb{E} \{ [y_i
+- \mathbb{E}(y_i)]^2 \} \, \, \, = \, \, \, \mathbb{E} ( y_i^2 ) -
+[\mathbb{E}(y_i)]^2 \\ & = \mathbb{E} [ ( \mathbf{X}_{i, \ast} \,
+\beta + \varepsilon_i )^2] - ( \mathbf{X}_{i, \ast} \, \bm{\beta})^2 \\ &
+= \mathbb{E} [ ( \mathbf{X}_{i, \ast} \, \bm{\beta})^2 + 2 \varepsilon_i
+\mathbf{X}_{i, \ast} \, \bm{\beta} + \varepsilon_i^2 ] - ( \mathbf{X}_{i,
+\ast} \, \beta)^2 \\ & = ( \mathbf{X}_{i, \ast} \, \bm{\beta})^2 + 2
+\mathbb{E}(\varepsilon_i) \mathbf{X}_{i, \ast} \, \bm{\beta} +
+\mathbb{E}(\varepsilon_i^2 ) - ( \mathbf{X}_{i, \ast} \, \bm{\beta})^2
+\\ & = \mathbb{E}(\varepsilon_i^2 ) \, \, \, = \, \, \,
+\mbox{Var}(\varepsilon_i) \, \, \, = \, \, \, \sigma^2.
+\end{align*}
+!et
+Hence, $y_i \sim \mathcal{N}( \mathbf{X}_{i, \ast} \, \bm{\beta}, \sigma^2)$, that is $\bm{y}$ follows a normal distribution with
+mean value $\bm{X}\bm{\beta}$ and variance $\sigma^2$ (not be confused with the singular values of the SVD).
+
+!split
+===== Expectation value and variance for $\bm{\beta}$ =====
+
+With the OLS expressions for the parameters $\bm{\beta}$ we can evaluate the expectation value
+!bt
+\[
+\mathbb{E}(\bm{\beta}) = \mathbb{E}[ (\mathbf{X}^{\top} \mathbf{X})^{-1}\mathbf{X}^{T} \mathbf{Y}]=(\mathbf{X}^{T} \mathbf{X})^{-1}\mathbf{X}^{T} \mathbb{E}[ \mathbf{Y}]=(\mathbf{X}^{T} \mathbf{X})^{-1} \mathbf{X}^{T}\mathbf{X}\bm{\beta}=\bm{\beta}.
+\]
+!et
+This means that the estimator of the regression parameters is unbiased.
+
+We can also calculate the variance
+
+The variance of $\bm{\beta}$ is
+!bt
+\begin{eqnarray*}
+\mbox{Var}(\bm{\beta}) & = & \mathbb{E} \{ [\bm{\beta} - \mathbb{E}(\bm{\beta})] [\bm{\beta} - \mathbb{E}(\bm{\beta})]^{T} \}
+\\
+& = & \mathbb{E} \{ [(\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \mathbf{Y} - \bm{\beta}] \, [(\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \mathbf{Y} - \bm{\beta}]^{T} \}
+\\
+% & = & \mathbb{E} \{ [(\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \mathbf{Y}] \, [(\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \mathbf{Y}]^{T} \} - \bm{\beta} \, \bm{\beta}^{T}
+% \\
+% & = & \mathbb{E} \{ (\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \mathbf{Y} \, \mathbf{Y}^{T} \, \mathbf{X} \, (\mathbf{X}^{T} \mathbf{X})^{-1} \} - \bm{\beta} \, \bm{\beta}^{T}
+% \\
+& = & (\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \, \mathbb{E} \{ \mathbf{Y} \, \mathbf{Y}^{T} \} \, \mathbf{X} \, (\mathbf{X}^{T} \mathbf{X})^{-1} - \bm{\beta} \, \bm{\beta}^{T}
+\\
+& = & (\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \, \{ \mathbf{X} \, \bm{\beta} \, \bm{\beta}^{T} \, \mathbf{X}^{T} + \sigma^2 \} \, \mathbf{X} \, (\mathbf{X}^{T} \mathbf{X})^{-1} - \bm{\beta} \, \bm{\beta}^{T}
+% \\
+% & = & (\mathbf{X}^T \mathbf{X})^{-1} \, \mathbf{X}^T \, \mathbf{X} \, \bm{\beta} \, \bm{\beta}^T \, \mathbf{X}^T \, \mathbf{X} \, (\mathbf{X}^T % \mathbf{X})^{-1}
+% \\
+% & & + \, \, \sigma^2 \, (\mathbf{X}^T \mathbf{X})^{-1} \, \mathbf{X}^T \, \mathbf{X} \, (\mathbf{X}^T \mathbf{X})^{-1} - \bm{\beta} \bm{\beta}^T
+\\
+& = & \bm{\beta} \, \bm{\beta}^{T} + \sigma^2 \, (\mathbf{X}^{T} \mathbf{X})^{-1} - \bm{\beta} \, \bm{\beta}^{T}
+\, \, \, = \, \, \, \sigma^2 \, (\mathbf{X}^{T} \mathbf{X})^{-1},
+\end{eqnarray*}
+!et
+
+where we have used that $\mathbb{E} (\mathbf{Y} \mathbf{Y}^{T}) =
+\mathbf{X} \, \bm{\beta} \, \bm{\beta}^{T} \, \mathbf{X}^{T} +
+\sigma^2 \, \mathbf{I}_{nn}$. From $\mbox{Var}(\bm{\beta}) = \sigma^2
+\, (\mathbf{X}^{T} \mathbf{X})^{-1}$, one obtains an estimate of the
+variance of the estimate of the $j$-th regression coefficient:
+$\bm{\sigma}^2 (\bm{\beta}_j ) = \bm{\sigma}^2 \sqrt{
+[(\mathbf{X}^{T} \mathbf{X})^{-1}]_{jj} }$. This may be used to
+construct a confidence interval for the estimates.
+
+
+In a similar way, we can obtain analytical expressions for say the
+expectation values of the parameters $\bm{\beta}$ and their variance
+when we employ Ridge regression, allowing us again to define a confidence interval.
+
+It is rather straightforward to show that
+!bt
+\[
+\mathbb{E} \big[ \bm{\beta}^{\mathrm{Ridge}} \big]=(\mathbf{X}^{T} \mathbf{X} + \lambda \mathbf{I}_{pp})^{-1} (\mathbf{X}^{\top} \mathbf{X})\bm{\beta}^{\mathrm{OLS}}.
+\]
+!et
+We see clearly that
+$\mathbb{E} \big[ \bm{\beta}^{\mathrm{Ridge}} \big] \not= \bm{\beta}^{\mathrm{OLS}}$ for any $\lambda > 0$. We say then that the ridge estimator is biased.
+
+We can also compute the variance as
+
+!bt
+\[
+\mbox{Var}[\bm{\beta}^{\mathrm{Ridge}}]=\sigma^2[ \mathbf{X}^{T} \mathbf{X} + \lambda \mathbf{I} ]^{-1} \mathbf{X}^{T} \mathbf{X} \{ [ \mathbf{X}^{\top} \mathbf{X} + \lambda \mathbf{I} ]^{-1}\}^{T},
+\]
+!et
+and it is easy to see that if the parameter $\lambda$ goes to infinity then the variance of Ridge parameters $\bm{\beta}$ goes to zero.
+
+With this, we can compute the difference
+
+!bt
+\[
+\mbox{Var}[\bm{\beta}^{\mathrm{OLS}}]-\mbox{Var}(\bm{\beta}^{\mathrm{Ridge}})=\sigma^2 [ \mathbf{X}^{T} \mathbf{X} + \lambda \mathbf{I} ]^{-1}[ 2\lambda\mathbf{I} + \lambda^2 (\mathbf{X}^{T} \mathbf{X})^{-1} ] \{ [ \mathbf{X}^{T} \mathbf{X} + \lambda \mathbf{I} ]^{-1}\}^{T}.
+\]
+!et
+The difference is non-negative definite since each component of the
+matrix product is non-negative definite.
+This means the variance we obtain with the standard OLS will always for $\lambda > 0$ be larger than the variance of $\bm{\beta}$ obtained with the Ridge estimator. This has interesting consequences when we discuss the so-called bias-variance trade-off below.
+
+
+!split
+===== Resampling methods =====
+
+With all these analytical equations for both the OLS and Ridge
+regression, we will now outline how to assess a given model. This will
+lead us to a discussion of the so-called bias-variance tradeoff (see
+below) and so-called resampling methods.
+
+One of the quantities we have discussed as a way to measure errors is
+the mean-squared error (MSE), mainly used for fitting of continuous
+functions. Another choice is the absolute error.
+
+In the discussions below we will focus on the MSE and in particular since we will split the data into test and training data,
+we discuss the
+o prediction error or simply the _test error_ $\mathrm{Err_{Test}}$, where we have a fixed training set and the test error is the MSE arising from the data reserved for testing. We discuss also the
+o training error $\mathrm{Err_{Train}}$, which is the average loss over the training data.
+
+As our model becomes more and more complex, more of the training data tends to used. The training may thence adapt to more complicated structures in the data. This may lead to a decrease in the bias (see below for code example) and a slight increase of the variance for the test error.
+For a certain level of complexity the test error will reach minimum, before starting to increase again. The
+training error reaches a saturation.
+
+
+
+
+!split
+===== Resampling methods: Jackknife and Bootstrap =====
+
+Two famous
+resampling methods are the _independent bootstrap_ and _the jackknife_.
+
+The jackknife is a special case of the independent bootstrap. Still, the jackknife was made
+popular prior to the independent bootstrap. And as the popularity of
+the independent bootstrap soared, new variants, such as _the dependent bootstrap_.
+
+The Jackknife and independent bootstrap work for
+independent, identically distributed random variables.
+If these conditions are not
+satisfied, the methods will fail. Yet, it should be said that if the data are
+independent, identically distributed, and we only want to estimate the
+variance of $\overline{X}$ (which often is the case), then there is no
+need for bootstrapping.
+
+!split
+===== Resampling methods: Jackknife =====
+
+The Jackknife works by making many replicas of the estimator $\widehat{\theta}$.
+The jackknife is a resampling method where we systematically leave out one observation from the vector of observed values $\bm{x} = (x_1,x_2,\cdots,X_n)$.
+Let $\bm{x}_i$ denote the vector
+!bt
+\[
+\bm{x}_i = (x_1,x_2,\cdots,x_{i-1},x_{i+1},\cdots,x_n),
+\]
+!et
+
+which equals the vector $\bm{x}$ with the exception that observation
+number $i$ is left out. Using this notation, define
+$\widehat{\theta}_i$ to be the estimator
+$\widehat{\theta}$ computed using $\vec{X}_i$.
+
+
+!split
+===== Jackknife code example =====
+!bc pycod
+from numpy import *
+from numpy.random import randint, randn
+from time import time
+
+def jackknife(data, stat):
+ n = len(data);t = zeros(n); inds = arange(n); t0 = time()
+ ## 'jackknifing' by leaving out an observation for each i
+ for i in range(n):
+ t[i] = stat(delete(data,i) )
+
+ # analysis
+ print("Runtime: %g sec" % (time()-t0)); print("Jackknife Statistics :")
+ print("original bias std. error")
+ print("%8g %14g %15g" % (stat(data),(n-1)*mean(t)/n, (n*var(t))**.5))
+
+ return t
+
+
+# Returns mean of data samples
+def stat(data):
+ return mean(data)
+
+
+mu, sigma = 100, 15
+datapoints = 10000
+x = mu + sigma*random.randn(datapoints)
+# jackknife returns the data sample
+t = jackknife(x, stat)
+
+!ec
+
+
+!split
+===== Resampling methods: Bootstrap =====
+!bblock
+Bootstrapping is a nonparametric approach to statistical inference
+that substitutes computation for more traditional distributional
+assumptions and asymptotic results. Bootstrapping offers a number of
+advantages:
+o The bootstrap is quite general, although there are some cases in which it fails.
+o Because it does not require distributional assumptions (such as normally distributed errors), the bootstrap can provide more accurate inferences when the data are not well behaved or when the sample size is small.
+o It is possible to apply the bootstrap to statistics with sampling distributions that are difficult to derive, even asymptotically.
+o It is relatively simple to apply the bootstrap to complex data-collection plans (such as stratified and clustered samples).
+!eblock
+
+
+!split
+===== Resampling methods: Bootstrap background =====
+
+Since $\widehat{\theta} = \widehat{\theta}(\bm{X})$ is a function of random variables,
+$\widehat{\theta}$ itself must be a random variable. Thus it has
+a pdf, call this function $p(\bm{t})$. The aim of the bootstrap is to
+estimate $p(\bm{t})$ by the relative frequency of
+$\widehat{\theta}$. You can think of this as using a histogram
+in the place of $p(\bm{t})$. If the relative frequency closely
+resembles $p(\vec{t})$, then using numerics, it is straight forward to
+estimate all the interesting parameters of $p(\bm{t})$ using point
+estimators.
+
+
+!split
+===== Resampling methods: More Bootstrap background =====
+
+In the case that $\widehat{\theta}$ has
+more than one component, and the components are independent, we use the
+same estimator on each component separately. If the probability
+density function of $X_i$, $p(x)$, had been known, then it would have
+been straight forward to do this by:
+o Drawing lots of numbers from $p(x)$, suppose we call one such set of numbers $(X_1^*, X_2^*, \cdots, X_n^*)$.
+o Then using these numbers, we could compute a replica of $\widehat{\theta}$ called $\widehat{\theta}^*$.
+
+By repeated use of (1) and (2), many
+estimates of $\widehat{\theta}$ could have been obtained. The
+idea is to use the relative frequency of $\widehat{\theta}^*$
+(think of a histogram) as an estimate of $p(\bm{t})$.
+
+!split
+===== Resampling methods: Bootstrap approach =====
+
+But
+unless there is enough information available about the process that
+generated $X_1,X_2,\cdots,X_n$, $p(x)$ is in general
+unknown. Therefore, "Efron in 1979":"https://projecteuclid.org/euclid.aos/1176344552" asked the
+question: What if we replace $p(x)$ by the relative frequency
+of the observation $X_i$; if we draw observations in accordance with
+the relative frequency of the observations, will we obtain the same
+result in some asymptotic sense? The answer is yes.
+
+
+Instead of generating the histogram for the relative
+frequency of the observation $X_i$, just draw the values
+$(X_1^*,X_2^*,\cdots,X_n^*)$ with replacement from the vector
+$\bm{X}$.
+
+!split
+===== Resampling methods: Bootstrap steps =====
+
+The independent bootstrap works like this:
+
+o Draw with replacement $n$ numbers for the observed variables $\bm{x} = (x_1,x_2,\cdots,x_n)$.
+o Define a vector $\bm{x}^*$ containing the values which were drawn from $\bm{x}$.
+o Using the vector $\bm{x}^*$ compute $\widehat{\theta}^*$ by evaluating $\widehat \theta$ under the observations $\bm{x}^*$.
+o Repeat this process $k$ times.
+
+When you are done, you can draw a histogram of the relative frequency
+of $\widehat \theta^*$. This is your estimate of the probability
+distribution $p(t)$. Using this probability distribution you can
+estimate any statistics thereof. In principle you never draw the
+histogram of the relative frequency of $\widehat{\theta}^*$. Instead
+you use the estimators corresponding to the statistic of interest. For
+example, if you are interested in estimating the variance of $\widehat
+\theta$, apply the etsimator $\widehat \sigma^2$ to the values
+$\widehat \theta ^*$.
+
+
+!split
+===== Code example for the Bootstrap method =====
+
+The following code starts with a Gaussian distribution with mean value
+$\mu =100$ and variance $\sigma=15$. We use this to generate the data
+used in the bootstrap analysis. The bootstrap analysis returns a data
+set after a given number of bootstrap operations (as many as we have
+data points). This data set consists of estimated mean values for each
+bootstrap operation. The histogram generated by the bootstrap method
+shows that the distribution for these mean values is also a Gaussian,
+centered around the mean value $\mu=100$ but with standard deviation
+$\sigma/\sqrt{n}$, where $n$ is the number of bootstrap samples (in
+this case the same as the number of original data points). The value
+of the standard deviation is what we expect from the central limit
+theorem.
+
+
+!bc pycod
+from numpy import *
+from numpy.random import randint, randn
+from time import time
+import matplotlib.mlab as mlab
+import matplotlib.pyplot as plt
+
+# Returns mean of bootstrap samples
+def stat(data):
+ return mean(data)
+
+# Bootstrap algorithm
+def bootstrap(data, statistic, R):
+ t = zeros(R); n = len(data); inds = arange(n); t0 = time()
+ # non-parametric bootstrap
+ for i in range(R):
+ t[i] = statistic(data[randint(0,n,n)])
+
+ # analysis
+ print("Runtime: %g sec" % (time()-t0)); print("Bootstrap Statistics :")
+ print("original bias std. error")
+ print("%8g %8g %14g %15g" % (statistic(data), std(data),mean(t),std(t)))
+ return t
+
+
+mu, sigma = 100, 15
+datapoints = 10000
+x = mu + sigma*random.randn(datapoints)
+# bootstrap returns the data sample
+t = bootstrap(x, stat, datapoints)
+# the histogram of the bootstrapped data
+n, binsboot, patches = plt.hist(t, 50, normed=1, facecolor='red', alpha=0.75)
+
+# add a 'best fit' line
+y = mlab.normpdf( binsboot, mean(t), std(t))
+lt = plt.plot(binsboot, y, 'r--', linewidth=1)
+plt.xlabel('Smarts')
+plt.ylabel('Probability')
+plt.axis([99.5, 100.6, 0, 3.0])
+plt.grid(True)
+
+plt.show()
+
+!ec
+
+
+!split
+===== Various steps in cross-validation =====
+
+When the repetitive splitting of the data set is done randomly,
+samples may accidently end up in a fast majority of the splits in
+either training or test set. Such samples may have an unbalanced
+influence on either model building or prediction evaluation. To avoid
+this $k$-fold cross-validation structures the data splitting. The
+samples are divided into $k$ more or less equally sized exhaustive and
+mutually exclusive subsets. In turn (at each split) one of these
+subsets plays the role of the test set while the union of the
+remaining subsets constitutes the training set. Such a splitting
+warrants a balanced representation of each sample in both training and
+test set over the splits. Still the division into the $k$ subsets
+involves a degree of randomness. This may be fully excluded when
+choosing $k=n$. This particular case is referred to as leave-one-out
+cross-validation (LOOCV).
+
+!split
+===== How to set up the cross-validation for Ridge and/or Lasso =====
+
+* Define a range of interest for the penalty parameter.
+
+* Divide the data set into training and test set comprising samples $\{1, \ldots, n\} \setminus i$ and $\{ i \}$, respectively.
+
+* Fit the linear regression model by means of ridge estimation for each $\lambda$ in the grid using the training set, and the corresponding estimate of the error variance $\bm{\sigma}_{-i}^2(\lambda)$, as
+!bt
+\begin{align*}
+\bm{\beta}_{-i}(\lambda) & = ( \bm{X}_{-i, \ast}^{T}
+\bm{X}_{-i, \ast} + \lambda \bm{I}_{pp})^{-1}
+\bm{X}_{-i, \ast}^{T} \bm{y}_{-i}
+\end{align*}
+!et
+
+* Evaluate the prediction performance of these models on the test set by $\log\{L[y_i, \bm{X}_{i, \ast}; \bm{\beta}_{-i}(\lambda), \bm{\sigma}_{-i}^2(\lambda)]\}$. Or, by the prediction error $|y_i - \bm{X}_{i, \ast} \bm{\beta}_{-i}(\lambda)|$, the relative error, the error squared or the R2 score function.
+
+* Repeat the first three steps such that each sample plays the role of the test set once.
+
+* Average the prediction performances of the test sets at each grid point of the penalty bias/parameter. It is an estimate of the prediction performance of the model corresponding to this value of the penalty parameter on novel data. It is defined as
+!bt
+\begin{align*}
+\frac{1}{n} \sum_{i = 1}^n \log\{L[y_i, \mathbf{X}_{i, \ast}; \bm{\beta}_{-i}(\lambda), \bm{\sigma}_{-i}^2(\lambda)]\}.
+\end{align*}
+!et
+
+!split
+===== Cross-validation in brief =====
+
+For the various values of $k$
+
+o shuffle the dataset randomly.
+o Split the dataset into $k$ groups.
+o For each unique group:
+ o Decide which group to use as set for test data
+ o Take the remaining groups as a training data set
+ o Fit a model on the training set and evaluate it on the test set
+ o Retain the evaluation score and discard the model
+o Summarize the model using the sample of model evaluation scores
+
+
+
+!split
+===== Code Example for Cross-validation and $k$-fold Cross-validation =====
+
+The code here uses Ridge regression with cross-validation (CV) resampling and $k$-fold CV in order to fit a specific polynomial.
+!bc pycod
+import numpy as np
+import matplotlib.pyplot as plt
+from sklearn.model_selection import KFold
+from sklearn.linear_model import Ridge
+from sklearn.model_selection import cross_val_score
+from sklearn.preprocessing import PolynomialFeatures
+
+# A seed just to ensure that the random numbers are the same for every run.
+# Useful for eventual debugging.
+np.random.seed(3155)
+
+# Generate the data.
+nsamples = 100
+x = np.random.randn(nsamples)
+y = 3*x**2 + np.random.randn(nsamples)
+
+## Cross-validation on Ridge regression using KFold only
+
+# Decide degree on polynomial to fit
+poly = PolynomialFeatures(degree = 6)
+
+# Decide which values of lambda to use
+nlambdas = 500
+lambdas = np.logspace(-3, 5, nlambdas)
+
+# Initialize a KFold instance
+k = 5
+kfold = KFold(n_splits = k)
+
+# Perform the cross-validation to estimate MSE
+scores_KFold = np.zeros((nlambdas, k))
+
+i = 0
+for lmb in lambdas:
+ ridge = Ridge(alpha = lmb)
+ j = 0
+ for train_inds, test_inds in kfold.split(x):
+ xtrain = x[train_inds]
+ ytrain = y[train_inds]
+
+ xtest = x[test_inds]
+ ytest = y[test_inds]
+
+ Xtrain = poly.fit_transform(xtrain[:, np.newaxis])
+ ridge.fit(Xtrain, ytrain[:, np.newaxis])
+
+ Xtest = poly.fit_transform(xtest[:, np.newaxis])
+ ypred = ridge.predict(Xtest)
+
+ scores_KFold[i,j] = np.sum((ypred - ytest[:, np.newaxis])**2)/np.size(ypred)
+
+ j += 1
+ i += 1
+
+
+estimated_mse_KFold = np.mean(scores_KFold, axis = 1)
+
+## Cross-validation using cross_val_score from sklearn along with KFold
+
+# kfold is an instance initialized above as:
+# kfold = KFold(n_splits = k)
+
+estimated_mse_sklearn = np.zeros(nlambdas)
+i = 0
+for lmb in lambdas:
+ ridge = Ridge(alpha = lmb)
+
+ X = poly.fit_transform(x[:, np.newaxis])
+ estimated_mse_folds = cross_val_score(ridge, X, y[:, np.newaxis], scoring='neg_mean_squared_error', cv=kfold)
+
+ # cross_val_score return an array containing the estimated negative mse for every fold.
+ # we have to the the mean of every array in order to get an estimate of the mse of the model
+ estimated_mse_sklearn[i] = np.mean(-estimated_mse_folds)
+
+ i += 1
+
+## Plot and compare the slightly different ways to perform cross-validation
+
+plt.figure()
+
+plt.plot(np.log10(lambdas), estimated_mse_sklearn, label = 'cross_val_score')
+plt.plot(np.log10(lambdas), estimated_mse_KFold, 'r--', label = 'KFold')
+
+plt.xlabel('log10(lambda)')
+plt.ylabel('mse')
+
+plt.legend()
+
+plt.show()
+
+!ec
+
+
+!split
+===== The bias-variance tradeoff =====
+
+
+We will discuss the bias-variance tradeoff in the context of
+continuous predictions such as regression. However, many of the
+intuitions and ideas discussed here also carry over to classification
+tasks. Consider a dataset $\mathcal{L}$ consisting of the data
+$\mathbf{X}_\mathcal{L}=\{(y_j, \boldsymbol{x}_j), j=0\ldots n-1\}$.
+
+Let us assume that the true data is generated from a noisy model
+
+!bt
+\[
+\bm{y}=f(\boldsymbol{x}) + \bm{\epsilon}
+\]
+!et
+
+where $\epsilon$ is normally distributed with mean zero and standard deviation $\sigma^2$.
+
+In our derivation of the ordinary least squares method we defined then
+an approximation to the function $f$ in terms of the parameters
+$\bm{\beta}$ and the design matrix $\bm{X}$ which embody our model,
+that is $\bm{\tilde{y}}=\bm{X}\bm{\beta}$.
+
+Thereafter we found the parameters $\bm{\beta}$ by optimizing the means squared error via the so-called cost function
+!bt
+\[
+C(\bm{X},\bm{\beta}) =\frac{1}{n}\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2=\mathbb{E}\left[(\bm{y}-\bm{\tilde{y}})^2\right].
+\]
+!et
+
+We can rewrite this as
+!bt
+\[
+\mathbb{E}\left[(\bm{y}-\bm{\tilde{y}})^2\right]=\frac{1}{n}\sum_i(f_i-\mathbb{E}\left[\bm{\tilde{y}}\right])^2+\frac{1}{n}\sum_i(\tilde{y}_i-\mathbb{E}\left[\bm{\tilde{y}}\right])^2+\sigma^2.
+\]
+!et
+
+The three terms represent the square of the bias of the learning
+method, which can be thought of as the error caused by the simplifying
+assumptions built into the method. The second term represents the
+variance of the chosen model and finally the last terms is variance of
+the error $\bm{\epsilon}$.
+
+To derive this equation, we need to recall that the variance of $\bm{y}$ and $\bm{\epsilon}$ are both equal to $\sigma^2$. The mean value of $\bm{\epsilon}$ is by definition equal to zero. Furthermore, the function $f$ is not a stochastics variable, idem for $\bm{\tilde{y}}$.
+We use a more compact notation in terms of the expectation value
+!bt
+\[
+\mathbb{E}\left[(\bm{y}-\bm{\tilde{y}})^2\right]=\mathbb{E}\left[(\bm{f}+\bm{\epsilon}-\bm{\tilde{y}})^2\right],
+\]
+!et
+and adding and subtracting $\mathbb{E}\left[\bm{\tilde{y}}\right]$ we get
+!bt
+\[
+\mathbb{E}\left[(\bm{y}-\bm{\tilde{y}})^2\right]=\mathbb{E}\left[(\bm{f}+\bm{\epsilon}-\bm{\tilde{y}}+\mathbb{E}\left[\bm{\tilde{y}}\right]-\mathbb{E}\left[\bm{\tilde{y}}\right])^2\right],
+\]
+!et
+which, using the abovementioned expectation values can be rewritten as
+!bt
+\[
+\mathbb{E}\left[(\bm{y}-\bm{\tilde{y}})^2\right]=\mathbb{E}\left[(\bm{y}-\mathbb{E}\left[\bm{\tilde{y}}\right])^2\right]+\mathrm{Var}\left[\bm{\tilde{y}}\right]+\sigma^2,
+\]
+!et
+that is the rewriting in terms of the so-called bias, the variance of the model $\bm{\tilde{y}}$ and the variance of $\bm{\epsilon}$.
+
+
+
+
+
+!split
+===== Example code for Bias-Variance tradeoff =====
+!bc pycod
+import matplotlib.pyplot as plt
+import numpy as np
+from sklearn.linear_model import LinearRegression, Ridge, Lasso
+from sklearn.preprocessing import PolynomialFeatures
+from sklearn.model_selection import train_test_split
+from sklearn.pipeline import make_pipeline
+from sklearn.utils import resample
+
+np.random.seed(2018)
+
+n = 500
+n_boostraps = 100
+degree = 18 # A quite high value, just to show.
+noise = 0.1
+
+# Make data set.
+x = np.linspace(-1, 3, n).reshape(-1, 1)
+y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2) + np.random.normal(0, 0.1, x.shape)
+
+# Hold out some test data that is never used in training.
+x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2)
+
+# Combine x transformation and model into one operation.
+# Not neccesary, but convenient.
+model = make_pipeline(PolynomialFeatures(degree=degree), LinearRegression(fit_intercept=False))
+
+# The following (m x n_bootstraps) matrix holds the column vectors y_pred
+# for each bootstrap iteration.
+y_pred = np.empty((y_test.shape[0], n_boostraps))
+for i in range(n_boostraps):
+ x_, y_ = resample(x_train, y_train)
+
+ # Evaluate the new model on the same test data each time.
+ y_pred[:, i] = model.fit(x_, y_).predict(x_test).ravel()
+
+# Note: Expectations and variances taken w.r.t. different training
+# data sets, hence the axis=1. Subsequent means are taken across the test data
+# set in order to obtain a total value, but before this we have error/bias/variance
+# calculated per data point in the test set.
+# Note 2: The use of keepdims=True is important in the calculation of bias as this
+# maintains the column vector form. Dropping this yields very unexpected results.
+error = np.mean( np.mean((y_test - y_pred)**2, axis=1, keepdims=True) )
+bias = np.mean( (y_test - np.mean(y_pred, axis=1, keepdims=True))**2 )
+variance = np.mean( np.var(y_pred, axis=1, keepdims=True) )
+print('Error:', error)
+print('Bias^2:', bias)
+print('Var:', variance)
+print('{} >= {} + {} = {}'.format(error, bias, variance, bias+variance))
+
+plt.plot(x[::5, :], y[::5, :], label='f(x)')
+plt.scatter(x_test, y_test, label='Data points')
+plt.scatter(x_test, np.mean(y_pred, axis=1), label='Pred')
+plt.legend()
+plt.show()
+
+!ec
+
+
+!split
+===== Understanding what happens =====
+!bc pycod
+import matplotlib.pyplot as plt
+import numpy as np
+from sklearn.linear_model import LinearRegression, Ridge, Lasso
+from sklearn.preprocessing import PolynomialFeatures
+from sklearn.model_selection import train_test_split
+from sklearn.pipeline import make_pipeline
+from sklearn.utils import resample
+
+np.random.seed(2018)
+
+n = 40
+n_boostraps = 100
+maxdegree = 14
+
+
+# Make data set.
+x = np.linspace(-3, 3, n).reshape(-1, 1)
+y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)
+error = np.zeros(maxdegree)
+bias = np.zeros(maxdegree)
+variance = np.zeros(maxdegree)
+polydegree = np.zeros(maxdegree)
+x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2)
+
+for degree in range(maxdegree):
+ model = make_pipeline(PolynomialFeatures(degree=degree), LinearRegression(fit_intercept=False))
+ y_pred = np.empty((y_test.shape[0], n_boostraps))
+ for i in range(n_boostraps):
+ x_, y_ = resample(x_train, y_train)
+ y_pred[:, i] = model.fit(x_, y_).predict(x_test).ravel()
+
+ polydegree[degree] = degree
+ error[degree] = np.mean( np.mean((y_test - y_pred)**2, axis=1, keepdims=True) )
+ bias[degree] = np.mean( (y_test - np.mean(y_pred, axis=1, keepdims=True))**2 )
+ variance[degree] = np.mean( np.var(y_pred, axis=1, keepdims=True) )
+ print('Polynomial degree:', degree)
+ print('Error:', error[degree])
+ print('Bias^2:', bias[degree])
+ print('Var:', variance[degree])
+ print('{} >= {} + {} = {}'.format(error[degree], bias[degree], variance[degree], bias[degree]+variance[degree]))
+
+plt.plot(polydegree, error, label='Error')
+plt.plot(polydegree, bias, label='bias')
+plt.plot(polydegree, variance, label='Variance')
+plt.legend()
+plt.show()
+
+
+
+
+!ec
+
+!split
+===== Summing up =====
+
+
+
+
+The bias-variance tradeoff summarizes the fundamental tension in
+machine learning, particularly supervised learning, between the
+complexity of a model and the amount of training data needed to train
+it. Since data is often limited, in practice it is often useful to
+use a less-complex model with higher bias, that is a model whose asymptotic
+performance is worse than another model because it is easier to
+train and less sensitive to sampling noise arising from having a
+finite-sized training dataset (smaller variance).
+
+
+
+The above equations tell us that in
+order to minimize the expected test error, we need to select a
+statistical learning method that simultaneously achieves low variance
+and low bias. Note that variance is inherently a nonnegative quantity,
+and squared bias is also nonnegative. Hence, we see that the expected
+test MSE can never lie below $Var(\epsilon)$, the irreducible error.
+
+
+What do we mean by the variance and bias of a statistical learning
+method? The variance refers to the amount by which our model would change if we
+estimated it using a different training data set. Since the training
+data are used to fit the statistical learning method, different
+training data sets will result in a different estimate. But ideally the
+estimate for our model should not vary too much between training
+sets. However, if a method has high variance then small changes in
+the training data can result in large changes in the model. In general, more
+flexible statistical methods have higher variance.
+
+
+You may also find this recent "article":"https://www.pnas.org/content/116/32/15849" of interest.
+
+!split
+===== Another Example from Scikit-Learn's Repository =====
+!bc pycod
+"""
+============================
+Underfitting vs. Overfitting
+============================
+
+This example demonstrates the problems of underfitting and overfitting and
+how we can use linear regression with polynomial features to approximate
+nonlinear functions. The plot shows the function that we want to approximate,
+which is a part of the cosine function. In addition, the samples from the
+real function and the approximations of different models are displayed. The
+models have polynomial features of different degrees. We can see that a
+linear function (polynomial with degree 1) is not sufficient to fit the
+training samples. This is called **underfitting**. A polynomial of degree 4
+approximates the true function almost perfectly. However, for higher degrees
+the model will **overfit** the training data, i.e. it learns the noise of the
+training data.
+We evaluate quantitatively **overfitting** / **underfitting** by using
+cross-validation. We calculate the mean squared error (MSE) on the validation
+set, the higher, the less likely the model generalizes correctly from the
+training data.
+"""
+
+print(__doc__)
+
+import numpy as np
+import matplotlib.pyplot as plt
+from sklearn.pipeline import Pipeline
+from sklearn.preprocessing import PolynomialFeatures
+from sklearn.linear_model import LinearRegression
+from sklearn.model_selection import cross_val_score
+
+
+def true_fun(X):
+ return np.cos(1.5 * np.pi * X)
+
+np.random.seed(0)
+
+n_samples = 30
+degrees = [1, 4, 15]
+
+X = np.sort(np.random.rand(n_samples))
+y = true_fun(X) + np.random.randn(n_samples) * 0.1
+
+plt.figure(figsize=(14, 5))
+for i in range(len(degrees)):
+ ax = plt.subplot(1, len(degrees), i + 1)
+ plt.setp(ax, xticks=(), yticks=())
+
+ polynomial_features = PolynomialFeatures(degree=degrees[i],
+ include_bias=False)
+ linear_regression = LinearRegression()
+ pipeline = Pipeline([("polynomial_features", polynomial_features),
+ ("linear_regression", linear_regression)])
+ pipeline.fit(X[:, np.newaxis], y)
+
+ # Evaluate the models using crossvalidation
+ scores = cross_val_score(pipeline, X[:, np.newaxis], y,
+ scoring="neg_mean_squared_error", cv=10)
+
+ X_test = np.linspace(0, 1, 100)
+ plt.plot(X_test, pipeline.predict(X_test[:, np.newaxis]), label="Model")
+ plt.plot(X_test, true_fun(X_test), label="True function")
+ plt.scatter(X, y, edgecolor='b', s=20, label="Samples")
+ plt.xlabel("x")
+ plt.ylabel("y")
+ plt.xlim((0, 1))
+ plt.ylim((-2, 2))
+ plt.legend(loc="best")
+ plt.title("Degree {}\nMSE = {:.2e}(+/- {:.2e})".format(
+ degrees[i], -scores.mean(), scores.std()))
+plt.show()
+!ec
+
+
+!split
+===== More examples on bootstrap and cross-validation and errors =====
+
+!bc pycod
+# Common imports
+import os
+import numpy as np
+import pandas as pd
+import matplotlib.pyplot as plt
+from sklearn.linear_model import LinearRegression, Ridge, Lasso
+from sklearn.model_selection import train_test_split
+from sklearn.utils import resample
+from sklearn.metrics import mean_squared_error
+# Where to save the figures and data files
+PROJECT_ROOT_DIR = "Results"
+FIGURE_ID = "Results/FigureFiles"
+DATA_ID = "DataFiles/"
+
+if not os.path.exists(PROJECT_ROOT_DIR):
+ os.mkdir(PROJECT_ROOT_DIR)
+
+if not os.path.exists(FIGURE_ID):
+ os.makedirs(FIGURE_ID)
+
+if not os.path.exists(DATA_ID):
+ os.makedirs(DATA_ID)
+
+def image_path(fig_id):
+ return os.path.join(FIGURE_ID, fig_id)
+
+def data_path(dat_id):
+ return os.path.join(DATA_ID, dat_id)
+
+def save_fig(fig_id):
+ plt.savefig(image_path(fig_id) + ".png", format='png')
+
+infile = open(data_path("EoS.csv"),'r')
+
+# Read the EoS data as csv file and organize the data into two arrays with density and energies
+EoS = pd.read_csv(infile, names=('Density', 'Energy'))
+EoS['Energy'] = pd.to_numeric(EoS['Energy'], errors='coerce')
+EoS = EoS.dropna()
+Energies = EoS['Energy']
+Density = EoS['Density']
+# The design matrix now as function of various polytrops
+
+Maxpolydegree = 30
+X = np.zeros((len(Density),Maxpolydegree))
+X[:,0] = 1.0
+testerror = np.zeros(Maxpolydegree)
+trainingerror = np.zeros(Maxpolydegree)
+polynomial = np.zeros(Maxpolydegree)
+
+trials = 100
+for polydegree in range(1, Maxpolydegree):
+ polynomial[polydegree] = polydegree
+ for degree in range(polydegree):
+ X[:,degree] = Density**(degree/3.0)
+
+# loop over trials in order to estimate the expectation value of the MSE
+ testerror[polydegree] = 0.0
+ trainingerror[polydegree] = 0.0
+ for samples in range(trials):
+ x_train, x_test, y_train, y_test = train_test_split(X, Energies, test_size=0.2)
+ model = LinearRegression(fit_intercept=True).fit(x_train, y_train)
+ ypred = model.predict(x_train)
+ ytilde = model.predict(x_test)
+ testerror[polydegree] += mean_squared_error(y_test, ytilde)
+ trainingerror[polydegree] += mean_squared_error(y_train, ypred)
+
+ testerror[polydegree] /= trials
+ trainingerror[polydegree] /= trials
+ print("Degree of polynomial: %3d"% polynomial[polydegree])
+ print("Mean squared error on training data: %.8f" % trainingerror[polydegree])
+ print("Mean squared error on test data: %.8f" % testerror[polydegree])
+
+plt.plot(polynomial, np.log10(trainingerror), label='Training Error')
+plt.plot(polynomial, np.log10(testerror), label='Test Error')
+plt.xlabel('Polynomial degree')
+plt.ylabel('log10[MSE]')
+plt.legend()
+plt.show()
+
+!ec
+
+
+!split
+===== The same example but now with cross-validation =====
+
+!bc pycod
+# Common imports
+import os
+import numpy as np
+import pandas as pd
+import matplotlib.pyplot as plt
+from sklearn.linear_model import LinearRegression, Ridge, Lasso
+from sklearn.metrics import mean_squared_error
+from sklearn.model_selection import KFold
+from sklearn.model_selection import cross_val_score
+
+
+# Where to save the figures and data files
+PROJECT_ROOT_DIR = "Results"
+FIGURE_ID = "Results/FigureFiles"
+DATA_ID = "DataFiles/"
+
+if not os.path.exists(PROJECT_ROOT_DIR):
+ os.mkdir(PROJECT_ROOT_DIR)
+
+if not os.path.exists(FIGURE_ID):
+ os.makedirs(FIGURE_ID)
+
+if not os.path.exists(DATA_ID):
+ os.makedirs(DATA_ID)
+
+def image_path(fig_id):
+ return os.path.join(FIGURE_ID, fig_id)
+
+def data_path(dat_id):
+ return os.path.join(DATA_ID, dat_id)
+
+def save_fig(fig_id):
+ plt.savefig(image_path(fig_id) + ".png", format='png')
+
+infile = open(data_path("EoS.csv"),'r')
+
+# Read the EoS data as csv file and organize the data into two arrays with density and energies
+EoS = pd.read_csv(infile, names=('Density', 'Energy'))
+EoS['Energy'] = pd.to_numeric(EoS['Energy'], errors='coerce')
+EoS = EoS.dropna()
+Energies = EoS['Energy']
+Density = EoS['Density']
+# The design matrix now as function of various polytrops
+
+Maxpolydegree = 30
+X = np.zeros((len(Density),Maxpolydegree))
+X[:,0] = 1.0
+estimated_mse_sklearn = np.zeros(Maxpolydegree)
+polynomial = np.zeros(Maxpolydegree)
+k =5
+kfold = KFold(n_splits = k)
+
+for polydegree in range(1, Maxpolydegree):
+ polynomial[polydegree] = polydegree
+ for degree in range(polydegree):
+ X[:,degree] = Density**(degree/3.0)
+ OLS = LinearRegression()
+# loop over trials in order to estimate the expectation value of the MSE
+ estimated_mse_folds = cross_val_score(OLS, X, Energies, scoring='neg_mean_squared_error', cv=kfold)
+#[:, np.newaxis]
+ estimated_mse_sklearn[polydegree] = np.mean(-estimated_mse_folds)
+
+plt.plot(polynomial, np.log10(estimated_mse_sklearn), label='Test Error')
+plt.xlabel('Polynomial degree')
+plt.ylabel('log10[MSE]')
+plt.legend()
+plt.show()
+
+!ec
+
+!split
+===== Cross-validation with Ridge =====
+!bc pycod
+import numpy as np
+import matplotlib.pyplot as plt
+from sklearn.model_selection import KFold
+from sklearn.linear_model import Ridge
+from sklearn.model_selection import cross_val_score
+from sklearn.preprocessing import PolynomialFeatures
+
+# A seed just to ensure that the random numbers are the same for every run.
+np.random.seed(3155)
+# Generate the data.
+n = 100
+x = np.linspace(-3, 3, n).reshape(-1, 1)
+y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)
+# Decide degree on polynomial to fit
+poly = PolynomialFeatures(degree = 10)
+
+# Decide which values of lambda to use
+nlambdas = 500
+lambdas = np.logspace(-3, 5, nlambdas)
+# Initialize a KFold instance
+k = 5
+kfold = KFold(n_splits = k)
+estimated_mse_sklearn = np.zeros(nlambdas)
+i = 0
+for lmb in lambdas:
+ ridge = Ridge(alpha = lmb)
+ estimated_mse_folds = cross_val_score(ridge, x, y, scoring='neg_mean_squared_error', cv=kfold)
+ estimated_mse_sklearn[i] = np.mean(-estimated_mse_folds)
+ i += 1
+plt.figure()
+plt.plot(np.log10(lambdas), estimated_mse_sklearn, label = 'cross_val_score')
+plt.xlabel('log10(lambda)')
+plt.ylabel('MSE')
+plt.legend()
+plt.show()
+
+
+!ec
+
+
+
+
+
+
+
+
+
+
+!split
+===== The Ising model =====
+
+The one-dimensional Ising model with nearest neighbor interaction, no
+external field and a constant coupling constant $J$ is given by
+
+!bt
+\begin{align}
+ H = -J \sum_{k}^L s_k s_{k + 1},
+\end{align}
+!et
+
+where $s_i \in \{-1, 1\}$ and $s_{N + 1} = s_1$. The number of spins
+in the system is determined by $L$. For the one-dimensional system
+there is no phase transition.
+
+We will look at a system of $L = 40$ spins with a coupling constant of
+$J = 1$. To get enough training data we will generate 10000 states
+with their respective energies.
+
+
+!bc pycod
+import numpy as np
+import matplotlib.pyplot as plt
+from mpl_toolkits.axes_grid1 import make_axes_locatable
+import seaborn as sns
+import scipy.linalg as scl
+from sklearn.model_selection import train_test_split
+import tqdm
+sns.set(color_codes=True)
+cmap_args=dict(vmin=-1., vmax=1., cmap='seismic')
+
+L = 40
+n = int(1e4)
+
+spins = np.random.choice([-1, 1], size=(n, L))
+J = 1.0
+
+energies = np.zeros(n)
+
+for i in range(n):
+ energies[i] = - J * np.dot(spins[i], np.roll(spins[i], 1))
+!ec
+
+Here we use ordinary least squares
+regression to predict the energy for the nearest neighbor
+one-dimensional Ising model on a ring, i.e., the endpoints wrap
+around. We will use linear regression to fit a value for
+the coupling constant to achieve this.
+
+!split
+===== Reformulating the problem to suit regression =====
+
+A more general form for the one-dimensional Ising model is
+
+!bt
+\begin{align}
+ H = - \sum_j^L \sum_k^L s_j s_k J_{jk}.
+\end{align}
+!et
+
+Here we allow for interactions beyond the nearest neighbors and a state dependent
+coupling constant. This latter expression can be formulated as
+a matrix-product
+!bt
+\begin{align}
+ \bm{H} = \bm{X} J,
+\end{align}
+!et
+
+where $X_{jk} = s_j s_k$ and $J$ is a matrix which consists of the
+elements $-J_{jk}$. This form of writing the energy fits perfectly
+with the form utilized in linear regression, that is
+
+!bt
+\begin{align}
+ \bm{y} = \bm{X}\bm{\beta} + \bm{\epsilon},
+\end{align}
+!et
+
+We split the data in training and test data as discussed in the previous example
+
+!bc pycod
+X = np.zeros((n, L ** 2))
+for i in range(n):
+ X[i] = np.outer(spins[i], spins[i]).ravel()
+y = energies
+X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
+!ec
+
+!split
+===== Linear regression =====
+
+In the ordinary least squares method we choose the cost function
+
+!bt
+\begin{align}
+ C(\bm{X}, \bm{\beta})= \frac{1}{n}\left\{(\bm{X}\bm{\beta} - \bm{y})^T(\bm{X}\bm{\beta} - \bm{y})\right\}.
+\end{align}
+!et
+
+We then find the extremal point of $C$ by taking the derivative with respect to $\bm{\beta}$ as discussed above.
+This yields the expression for $\bm{\beta}$ to be
+
+!bt
+\[
+ \bm{\beta} = \frac{\bm{X}^T \bm{y}}{\bm{X}^T \bm{X}},
+\]
+!et
+
+which immediately imposes some requirements on $\bm{X}$ as there must exist
+an inverse of $\bm{X}^T \bm{X}$. If the expression we are modeling contains an
+intercept, i.e., a constant term, we must make sure that the
+first column of $\bm{X}$ consists of $1$. We do this here
+
+!bc pycod
+X_train_own = np.concatenate(
+ (np.ones(len(X_train))[:, np.newaxis], X_train),
+ axis=1
+)
+X_test_own = np.concatenate(
+ (np.ones(len(X_test))[:, np.newaxis], X_test),
+ axis=1
+)
+!ec
+
+!bc pycod
+def ols_inv(x: np.ndarray, y: np.ndarray) -> np.ndarray:
+ return scl.inv(x.T @ x) @ (x.T @ y)
+beta = ols_inv(X_train_own, y_train)
+!ec
+
+
+!split
+===== Singular Value decomposition =====
+
+Doing the inversion directly turns out to be a bad idea since the matrix
+$\bm{X}^T\bm{X}$ is singular. An alternative approach is to use the _singular
+value decomposition_. Using the definition of the Moore-Penrose
+pseudoinverse we can write the equation for $\bm{\beta}$ as
+
+!bt
+\[
+ \bm{\beta} = \bm{X}^{+}\bm{y},
+\]
+!et
+
+where the pseudoinverse of $\bm{X}$ is given by
+
+!bt
+\[
+ \bm{X}^{+} = \frac{\bm{X}^T}{\bm{X}^T\bm{X}}.
+\]
+!et
+
+Using singular value decomposition we can decompose the matrix $\bm{X} = \bm{U}\bm{\Sigma} \bm{V}^T$,
+where $\bm{U}$ and $\bm{V}$ are orthogonal(unitary) matrices and $\bm{\Sigma}$ contains the singular values (more details below).
+where $X^{+} = V\Sigma^{+} U^T$. This reduces the equation for
+$\omega$ to
+!bt
+\begin{align}
+ \bm{\beta} = \bm{V}\bm{\Sigma}^{+} \bm{U}^T \bm{y}.
+\end{align}
+!et
+
+Note that solving this equation by actually doing the pseudoinverse
+(which is what we will do) is not a good idea as this operation scales
+as $\mathcal{O}(n^3)$, where $n$ is the number of elements in a
+general matrix. Instead, doing $QR$-factorization and solving the
+linear system as an equation would reduce this down to
+$\mathcal{O}(n^2)$ operations.
+
+
+!bc pycod
+def ols_svd(x: np.ndarray, y: np.ndarray) -> np.ndarray:
+ u, s, v = scl.svd(x)
+ return v.T @ scl.pinv(scl.diagsvd(s, u.shape[0], v.shape[0])) @ u.T @ y
+!ec
+
+!bc pycod
+beta = ols_svd(X_train_own,y_train)
+!ec
+
+When extracting the $J$-matrix we need to make sure that we remove the intercept, as is done here
+
+!bc pycod
+J = beta[1:].reshape(L, L)
+!ec
+
+A way of looking at the coefficients in $J$ is to plot the matrices as images.
+
+
+!bc pycod
+fig = plt.figure(figsize=(20, 14))
+im = plt.imshow(J, **cmap_args)
+plt.title("OLS", fontsize=18)
+plt.xticks(fontsize=18)
+plt.yticks(fontsize=18)
+cb = fig.colorbar(im)
+cb.ax.set_yticklabels(cb.ax.get_yticklabels(), fontsize=18)
+plt.show()
+!ec
+It is interesting to note that OLS
+considers both $J_{j, j + 1} = -0.5$ and $J_{j, j - 1} = -0.5$ as
+valid matrix elements for $J$.
+In our discussion below on hyperparameters and Ridge and Lasso regression we will see that
+this problem can be removed, partly and only with Lasso regression.
+
+In this case our matrix inversion was actually possible. The obvious question now is what is the mathematics behind the SVD?
+
+
+
+
+
+!split
+===== The one-dimensional Ising model =====
+
+Let us bring back the Ising model again, but now with an additional
+focus on Ridge and Lasso regression as well. We repeat some of the
+basic parts of the Ising model and the setup of the training and test
+data. The one-dimensional Ising model with nearest neighbor
+interaction, no external field and a constant coupling constant $J$ is
+given by
+
+!bt
+\begin{align}
+ H = -J \sum_{k}^L s_k s_{k + 1},
+\end{align}
+!et
+where $s_i \in \{-1, 1\}$ and $s_{N + 1} = s_1$. The number of spins in the system is determined by $L$. For the one-dimensional system there is no phase transition.
+
+We will look at a system of $L = 40$ spins with a coupling constant of $J = 1$. To get enough training data we will generate 10000 states with their respective energies.
+
+
+!bc pycod
+import numpy as np
+import matplotlib.pyplot as plt
+from mpl_toolkits.axes_grid1 import make_axes_locatable
+import seaborn as sns
+import scipy.linalg as scl
+from sklearn.model_selection import train_test_split
+import sklearn.linear_model as skl
+import tqdm
+sns.set(color_codes=True)
+cmap_args=dict(vmin=-1., vmax=1., cmap='seismic')
+
+L = 40
+n = int(1e4)
+
+spins = np.random.choice([-1, 1], size=(n, L))
+J = 1.0
+
+energies = np.zeros(n)
+
+for i in range(n):
+ energies[i] = - J * np.dot(spins[i], np.roll(spins[i], 1))
+!ec
+
+A more general form for the one-dimensional Ising model is
+
+!bt
+\begin{align}
+ H = - \sum_j^L \sum_k^L s_j s_k J_{jk}.
+\end{align}
+!et
+
+Here we allow for interactions beyond the nearest neighbors and a more
+adaptive coupling matrix. This latter expression can be formulated as
+a matrix-product on the form
+!bt
+\begin{align}
+ H = X J,
+\end{align}
+!et
+
+where $X_{jk} = s_j s_k$ and $J$ is the matrix consisting of the
+elements $-J_{jk}$. This form of writing the energy fits perfectly
+with the form utilized in linear regression, viz.
+!bt
+\begin{align}
+ \bm{y} = \bm{X}\bm{\beta} + \bm{\epsilon}.
+\end{align}
+!et
+We organize the data as we did above
+!bc pycod
+X = np.zeros((n, L ** 2))
+for i in range(n):
+ X[i] = np.outer(spins[i], spins[i]).ravel()
+y = energies
+X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.96)
+
+X_train_own = np.concatenate(
+ (np.ones(len(X_train))[:, np.newaxis], X_train),
+ axis=1
+)
+
+X_test_own = np.concatenate(
+ (np.ones(len(X_test))[:, np.newaxis], X_test),
+ axis=1
+)
+!ec
+
+We will do all fitting with _Scikit-Learn_,
+
+!bc pycod
+clf = skl.LinearRegression().fit(X_train, y_train)
+!ec
+When extracting the $J$-matrix we make sure to remove the intercept
+!bc pycod
+J_sk = clf.coef_.reshape(L, L)
+!ec
+And then we plot the results
+!bc pycod
+fig = plt.figure(figsize=(20, 14))
+im = plt.imshow(J_sk, **cmap_args)
+plt.title("LinearRegression from Scikit-learn", fontsize=18)
+plt.xticks(fontsize=18)
+plt.yticks(fontsize=18)
+cb = fig.colorbar(im)
+cb.ax.set_yticklabels(cb.ax.get_yticklabels(), fontsize=18)
+plt.show()
+!ec
+The results perfectly with our previous discussion where we used our own code.
+
+!split
+===== Ridge regression =====
+
+Having explored the ordinary least squares we move on to ridge
+regression. In ridge regression we include a _regularizer_. This
+involves a new cost function which leads to a new estimate for the
+weights $\bm{\beta}$. This results in a penalized regression problem. The
+cost function is given by
+
+!bt
+\begin{align}
+ C(\bm{X}, \bm{\beta}; \lambda) = (\bm{X}\bm{\beta} - \bm{y})^T(\bm{X}\bm{\beta} - \bm{y}) + \lambda \bm{\beta}^T\bm{\beta}.
+\end{align}
+!et
+!bc pycod
+_lambda = 0.1
+clf_ridge = skl.Ridge(alpha=_lambda).fit(X_train, y_train)
+J_ridge_sk = clf_ridge.coef_.reshape(L, L)
+fig = plt.figure(figsize=(20, 14))
+im = plt.imshow(J_ridge_sk, **cmap_args)
+plt.title("Ridge from Scikit-learn", fontsize=18)
+plt.xticks(fontsize=18)
+plt.yticks(fontsize=18)
+cb = fig.colorbar(im)
+cb.ax.set_yticklabels(cb.ax.get_yticklabels(), fontsize=18)
+
+plt.show()
+!ec
+
+!split
+===== LASSO regression =====
+
+In the _Least Absolute Shrinkage and Selection Operator_ (LASSO)-method we get a third cost function.
+
+!bt
+\begin{align}
+ C(\bm{X}, \bm{\beta}; \lambda) = (\bm{X}\bm{\beta} - \bm{y})^T(\bm{X}\bm{\beta} - \bm{y}) + \lambda \sqrt{\bm{\beta}^T\bm{\beta}}.
+\end{align}
+!et
+
+Finding the extremal point of this cost function is not so straight-forward as in least squares and ridge. We will therefore rely solely on the function ``Lasso`` from _Scikit-Learn_.
+
+!bc pycod
+clf_lasso = skl.Lasso(alpha=_lambda).fit(X_train, y_train)
+J_lasso_sk = clf_lasso.coef_.reshape(L, L)
+fig = plt.figure(figsize=(20, 14))
+im = plt.imshow(J_lasso_sk, **cmap_args)
+plt.title("Lasso from Scikit-learn", fontsize=18)
+plt.xticks(fontsize=18)
+plt.yticks(fontsize=18)
+cb = fig.colorbar(im)
+cb.ax.set_yticklabels(cb.ax.get_yticklabels(), fontsize=18)
+
+plt.show()
+!ec
+
+It is quite striking how LASSO breaks the symmetry of the coupling
+constant as opposed to ridge and OLS. We get a sparse solution with
+$J_{j, j + 1} = -1$.
+
+
+
+!split
+===== Performance as function of the regularization parameter =====
+
+We see how the different models perform for a different set of values for $\lambda$.
+
+
+!bc pycod
+lambdas = np.logspace(-4, 5, 10)
+
+train_errors = {
+ "ols_sk": np.zeros(lambdas.size),
+ "ridge_sk": np.zeros(lambdas.size),
+ "lasso_sk": np.zeros(lambdas.size)
+}
+
+test_errors = {
+ "ols_sk": np.zeros(lambdas.size),
+ "ridge_sk": np.zeros(lambdas.size),
+ "lasso_sk": np.zeros(lambdas.size)
+}
+
+plot_counter = 1
+
+fig = plt.figure(figsize=(32, 54))
+
+for i, _lambda in enumerate(tqdm.tqdm(lambdas)):
+ for key, method in zip(
+ ["ols_sk", "ridge_sk", "lasso_sk"],
+ [skl.LinearRegression(), skl.Ridge(alpha=_lambda), skl.Lasso(alpha=_lambda)]
+ ):
+ method = method.fit(X_train, y_train)
+
+ train_errors[key][i] = method.score(X_train, y_train)
+ test_errors[key][i] = method.score(X_test, y_test)
+
+ omega = method.coef_.reshape(L, L)
+
+ plt.subplot(10, 5, plot_counter)
+ plt.imshow(omega, **cmap_args)
+ plt.title(r"%s, $\lambda = %.4f$" % (key, _lambda))
+ plot_counter += 1
+
+plt.show()
+!ec
+
+We see that LASSO reaches a good solution for low
+values of $\lambda$, but will "wither" when we increase $\lambda$ too
+much. Ridge is more stable over a larger range of values for
+$\lambda$, but eventually also fades away.
+
+!split
+===== Finding the optimal value of $\lambda$ =====
+
+To determine which value of $\lambda$ is best we plot the accuracy of
+the models when predicting the training and the testing set. We expect
+the accuracy of the training set to be quite good, but if the accuracy
+of the testing set is much lower this tells us that we might be
+subject to an overfit model. The ideal scenario is an accuracy on the
+testing set that is close to the accuracy of the training set.
+
+
+!bc pycod
+fig = plt.figure(figsize=(20, 14))
+
+colors = {
+ "ols_sk": "r",
+ "ridge_sk": "y",
+ "lasso_sk": "c"
+}
+
+for key in train_errors:
+ plt.semilogx(
+ lambdas,
+ train_errors[key],
+ colors[key],
+ label="Train {0}".format(key),
+ linewidth=4.0
+ )
+
+for key in test_errors:
+ plt.semilogx(
+ lambdas,
+ test_errors[key],
+ colors[key] + "--",
+ label="Test {0}".format(key),
+ linewidth=4.0
+ )
+plt.legend(loc="best", fontsize=18)
+plt.xlabel(r"$\lambda$", fontsize=18)
+plt.ylabel(r"$R^2$", fontsize=18)
+plt.tick_params(labelsize=18)
+plt.show()
+!ec
+
+From the above figure we can see that LASSO with $\lambda = 10^{-2}$
+achieves a very good accuracy on the test set. This by far surpasses the
+other models for all values of $\lambda$.
+
+
+
+
+
+
diff --git a/doc/src/Statistics/Statistics.dlog b/doc/src/Statistics/Statistics.dlog
new file mode 100644
index 000000000..ddfa3d0b5
--- /dev/null
+++ b/doc/src/Statistics/Statistics.dlog
@@ -0,0 +1,4 @@
+translating doconce text in Statistics.do.txt to ipynb
+Failed to remove ans_at_end environment
+Failed to remove sol_at_end environment
+output in Statistics.ipynb
diff --git a/doc/src/SupportVMachines/chapter7.dlog b/doc/src/SupportVMachines/chapter7.dlog
new file mode 100644
index 000000000..354add915
--- /dev/null
+++ b/doc/src/SupportVMachines/chapter7.dlog
@@ -0,0 +1,62 @@
+*** error: file has a mako construction ${\cal L}'
+ but seemingly no definition in <%...%>'
+ (it is not a command-line given mako variable either).
+ However, if this is a variable in a Makefile or Bash script
+ run with --no_mako - and you cannot use mako and Makefile or Bash variables
+ in the same document!
+
+*** error: file has a mako construction ${\cal L}'
+ but seemingly no definition in <%...%>'
+ (it is not a command-line given mako variable either).
+ However, if this is a variable in a Makefile or Bash script
+ run with --no_mako - and you cannot use mako and Makefile or Bash variables
+ in the same document!
+
+*** error: file has a mako construction ${\cal L}'
+ but seemingly no definition in <%...%>'
+ (it is not a command-line given mako variable either).
+ However, if this is a variable in a Makefile or Bash script
+ run with --no_mako - and you cannot use mako and Makefile or Bash variables
+ in the same document!
+
+translating doconce text in chapter7.do.txt to ipynb
+*** replacing \bm{...} by \boldsymbol{...} (\bm is not supported by MathJax)
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+*** warning: latex envir \begin{bmatrix} does not work well in Markdown.
+ Stick to \[ ... \], equation, equation*, align, or align*
+ environments in math environments.
+
+Failed to remove ans_at_end environment
+Failed to remove sol_at_end environment
+output in chapter7.ipynb
diff --git a/doc/src/SupportVMachines/chapter7.do.txt b/doc/src/SupportVMachines/chapter7.do.txt
new file mode 100644
index 000000000..fdbf529c1
--- /dev/null
+++ b/doc/src/SupportVMachines/chapter7.do.txt
@@ -0,0 +1,1138 @@
+======= Support Vector Machines, overarching aims =======
+
+A Support Vector Machine (SVM) is a very powerful and versatile
+Machine Learning method, capable of performing linear or nonlinear
+classification, regression, and even outlier detection. It is one of
+the most popular models in Machine Learning, and anyone interested in
+Machine Learning should have it in their toolbox. SVMs are
+particularly well suited for classification of complex but small-sized or
+medium-sized datasets.
+
+The case with two well-separated classes only can be understood in an
+intuitive way in terms of lines in a two-dimensional space separating
+the two classes (see figure below).
+
+The basic mathematics behind the SVM is however less familiar to most of us.
+It relies on the definition of hyperplanes and the
+definition of a _margin_ which separates classes (in case of
+classification problems) of variables. It is also used for regression
+problems.
+
+With SVMs we distinguish between hard margin and soft margins. The
+latter introduces a so-called softening parameter to be discussed
+below. We distinguish also between linear and non-linear
+approaches. The latter are the most frequent ones since it is rather
+unlikely that we can separate classes easily by say straight lines.
+
+
+===== Hyperplanes and all that =====
+
+The theory behind support vector machines (SVM hereafter) is based on
+the mathematical description of so-called hyperplanes. Let us start
+with a two-dimensional case. This will also allow us to introduce our
+first SVM examples. These will be tailored to the case of two specific
+classes, as displayed in the figure here based on the usage of the petal data.
+
+We assume here that our data set can be well separated into two
+domains, where a straight line does the job in the separating the two
+classes. Here the two classes are represented by either squares or
+circles.
+!bc pycod
+from sklearn import datasets
+from sklearn.svm import SVC, LinearSVC
+from sklearn.linear_model import SGDClassifier
+from sklearn.preprocessing import StandardScaler
+import matplotlib
+import matplotlib.pyplot as plt
+plt.rcParams['axes.labelsize'] = 14
+plt.rcParams['xtick.labelsize'] = 12
+plt.rcParams['ytick.labelsize'] = 12
+
+
+iris = datasets.load_iris()
+X = iris["data"][:, (2, 3)] # petal length, petal width
+y = iris["target"]
+
+setosa_or_versicolor = (y == 0) | (y == 1)
+X = X[setosa_or_versicolor]
+y = y[setosa_or_versicolor]
+
+
+
+C = 5
+alpha = 1 / (C * len(X))
+
+lin_clf = LinearSVC(loss="hinge", C=C, random_state=42)
+svm_clf = SVC(kernel="linear", C=C)
+sgd_clf = SGDClassifier(loss="hinge", learning_rate="constant", eta0=0.001, alpha=alpha,
+ max_iter=100000, random_state=42)
+
+scaler = StandardScaler()
+X_scaled = scaler.fit_transform(X)
+
+lin_clf.fit(X_scaled, y)
+svm_clf.fit(X_scaled, y)
+sgd_clf.fit(X_scaled, y)
+
+print("LinearSVC: ", lin_clf.intercept_, lin_clf.coef_)
+print("SVC: ", svm_clf.intercept_, svm_clf.coef_)
+print("SGDClassifier(alpha={:.5f}):".format(sgd_clf.alpha), sgd_clf.intercept_, sgd_clf.coef_)
+
+# Compute the slope and bias of each decision boundary
+w1 = -lin_clf.coef_[0, 0]/lin_clf.coef_[0, 1]
+b1 = -lin_clf.intercept_[0]/lin_clf.coef_[0, 1]
+w2 = -svm_clf.coef_[0, 0]/svm_clf.coef_[0, 1]
+b2 = -svm_clf.intercept_[0]/svm_clf.coef_[0, 1]
+w3 = -sgd_clf.coef_[0, 0]/sgd_clf.coef_[0, 1]
+b3 = -sgd_clf.intercept_[0]/sgd_clf.coef_[0, 1]
+
+# Transform the decision boundary lines back to the original scale
+line1 = scaler.inverse_transform([[-10, -10 * w1 + b1], [10, 10 * w1 + b1]])
+line2 = scaler.inverse_transform([[-10, -10 * w2 + b2], [10, 10 * w2 + b2]])
+line3 = scaler.inverse_transform([[-10, -10 * w3 + b3], [10, 10 * w3 + b3]])
+
+# Plot all three decision boundaries
+plt.figure(figsize=(11, 4))
+plt.plot(line1[:, 0], line1[:, 1], "k:", label="LinearSVC")
+plt.plot(line2[:, 0], line2[:, 1], "b--", linewidth=2, label="SVC")
+plt.plot(line3[:, 0], line3[:, 1], "r-", label="SGDClassifier")
+plt.plot(X[:, 0][y==1], X[:, 1][y==1], "bs") # label="Iris-Versicolor"
+plt.plot(X[:, 0][y==0], X[:, 1][y==0], "yo") # label="Iris-Setosa"
+plt.xlabel("Petal length", fontsize=14)
+plt.ylabel("Petal width", fontsize=14)
+plt.legend(loc="upper center", fontsize=14)
+plt.axis([0, 5.5, 0, 2])
+
+plt.show()
+
+
+
+!ec
+
+
+
+
+
+===== What is a hyperplane? =====
+
+The aim of the SVM algorithm is to find a hyperplane in a
+$p$-dimensional space, where $p$ is the number of features that
+distinctly classifies the data points.
+
+In a $p$-dimensional space, a hyperplane is what we call an affine subspace of dimension of $p-1$.
+As an example, in two dimension, a hyperplane is simply as straight line while in three dimensions it is
+a two-dimensional subspace, or stated simply, a plane.
+
+In two dimensions, with the variables $x_1$ and $x_2$, the hyperplane is defined as
+!bt
+\[
+b+w_1x_1+w_2x_2=0,
+\]
+!et
+
+where $b$ is the intercept and $w_1$ and $w_2$ define the elements of a vector orthogonal to the line
+$b+w_1x_1+w_2x_2=0$.
+In two dimensions we define the vectors $\bm{x} =[x1,x2]$ and $\bm{w}=[w1,w2]$.
+We can then rewrite the above equation as
+
+!bt
+\[
+\bm{x}^T\bm{w}+b=0.
+\]
+!et
+
+
+===== A $p$-dimensional space of features =====
+
+We limit ourselves to two classes of outputs $y_i$ and assign these classes the values $y_i = \pm 1$.
+In a $p$-dimensional space of say $p$ features we have a hyperplane defines as
+!bt
+\[
+b+wx_1+w_2x_2+\dots +w_px_p=0.
+\]
+!et
+If we define a
+matrix $\bm{X}=\left[\bm{x}_1,\bm{x}_2,\dots, \bm{x}_p\right]$
+of dimension $n\times p$, where $n$ represents the observations for each feature and each vector $x_i$ is a column vector of the matrix $\bm{X}$,
+!bt
+\[
+\bm{x}_i = \begin{bmatrix} x_{i1} \\ x_{i2} \\ \dots \\ \dots \\ x_{ip} \end{bmatrix}.
+\]
+!et
+If the above condition is not met for a given vector $\bm{x}_i$ we have
+!bt
+\[
+b+w_1x_{i1}+w_2x_{i2}+\dots +w_px_{ip} >0,
+\]
+!et
+if our output $y_i=1$.
+In this case we say that $\bm{x}_i$ lies on one of the sides of the hyperplane and if
+!bt
+\[
+b+w_1x_{i1}+w_2x_{i2}+\dots +w_px_{ip} < 0,
+\]
+!et
+for the class of observations $y_i=-1$,
+then $\bm{x}_i$ lies on the other side.
+
+Equivalently, for the two classes of observations we have
+!bt
+\[
+y_i\left(b+w_1x_{i1}+w_2x_{i2}+\dots +w_px_{ip}\right) > 0.
+\]
+!et
+
+When we try to separate hyperplanes, if it exists, we can use it to construct a natural classifier: a test observation is assigned a given class depending on which side of the hyperplane it is located.
+
+
+===== The two-dimensional case =====
+
+Let us try to develop our intuition about SVMs by limiting ourselves to a two-dimensional
+plane. To separate the two classes of data points, there are many
+possible lines (hyperplanes if you prefer a more strict naming)
+that could be chosen. Our objective is to find a
+plane that has the maximum margin, i.e the maximum distance between
+data points of both classes. Maximizing the margin distance provides
+some reinforcement so that future data points can be classified with
+more confidence.
+
+What a linear classifier attempts to accomplish is to split the
+feature space into two half spaces by placing a hyperplane between the
+data points. This hyperplane will be our decision boundary. All
+points on one side of the plane will belong to class one and all points
+on the other side of the plane will belong to the second class two.
+
+Unfortunately there are many ways in which we can place a hyperplane
+to divide the data. Below is an example of two candidate hyperplanes
+for our data sample.
+
+
+===== Getting into the details =====
+
+Let us define the function
+!bt
+\[
+f(x) = \bm{w}^T\bm{x}+b = 0,
+\]
+!et
+as the function that determines the line $L$ that separates two classes (our two features), see the figure here.
+
+
+Any point defined by $\bm{x}_i$ and $\bm{x}_2$ on the line $L$ will satisfy $\bm{w}^T(\bm{x}_1-\bm{x}_2)=0$.
+
+The signed distance $\delta$ from any point defined by a vector $\bm{x}$ and a point $\bm{x}_0$ on the line $L$ is then
+!bt
+\[
+\delta = \frac{1}{\vert\vert \bm{w}\vert\vert}(\bm{w}^T\bm{x}+b).
+\]
+!et
+
+
+===== First attempt at a minimization approach =====
+
+How do we find the parameter $b$ and the vector $\bm{w}$? What we could
+do is to define a cost function which now contains the set of all
+misclassified points $M$ and attempt to minimize this function
+
+!bt
+\[
+C(\bm{w},b) = -\sum_{i\in M} y_i(\bm{w}^T\bm{x}_i+b).
+\]
+!et
+
+We could now for example define all values $y_i =1$ as misclassified in case we have $\bm{w}^T\bm{x}_i+b < 0$ and the opposite if we have $y_i=-1$. Taking the derivatives gives us
+!bt
+\[
+\frac{\partial C}{\partial b} = -\sum_{i\in M} y_i,
+\]
+!et
+and
+!bt
+\[
+\frac{\partial C}{\partial \bm{w}} = -\sum_{i\in M} y_ix_i.
+\]
+!et
+
+
+===== Solving the equations =====
+
+We can now use the Newton-Raphson method or different variants of the gradient descent family (from plain gradient descent to various stochastic gradient descent approaches) to solve the equations
+!bt
+\[
+b \leftarrow b +\eta \frac{\partial C}{\partial b},
+\]
+!et
+and
+!bt
+\[
+\bm{w} \leftarrow \bm{w} +\eta \frac{\partial C}{\partial \bm{w}},
+\]
+!et
+where $\eta$ is our by now well-known learning rate.
+
+
+
+===== Code Example =====
+
+The equations we discussed above can be coded rather easily (the
+framework is similar to what we developed for logistic
+regression). We are going to set up a simple case with two classes only and we want to find a line which separates them the best possible way.
+!bc pycod
+
+!ec
+
+
+===== Problems with the Simpler Approach =====
+
+
+There are however problems with this approach, although it looks
+pretty straightforward to implement. When running the above code, we see that we can easily end up with many diffeent lines which separate the two classes.
+
+
+For small
+gaps between the entries, we may also end up needing many iterations
+before the solutions converge and if the data cannot be separated
+properly into two distinct classes, we may not experience a converge
+at all.
+
+
+===== A better approach =====
+
+A better approach is rather to try to define a large margin between
+the two classes (if they are well separated from the beginning).
+
+Thus, we wish to find a margin $M$ with $\bm{w}$ normalized to
+$\vert\vert \bm{w}\vert\vert =1$ subject to the condition
+
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, p.
+\]
+!et
+All points are thus at a signed distance from the decision boundary defined by the line $L$. The parameters $b$ and $w_1$ and $w_2$ define this line.
+
+We seek thus the largest value $M$ defined by
+!bt
+\[
+\frac{1}{\vert \vert \bm{w}\vert\vert}y_i(\bm{w}^T\bm{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, n,
+\]
+!et
+or just
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b) \geq M\vert \vert \bm{w}\vert\vert \hspace{0.1cm}\forall i.
+\]
+!et
+If we scale the equation so that $\vert \vert \bm{w}\vert\vert = 1/M$, we have to find the minimum of
+$\bm{w}^T\bm{w}=\vert \vert \bm{w}\vert\vert$ (the norm) subject to the condition
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b) \geq 1 \hspace{0.1cm}\forall i.
+\]
+!et
+
+We have thus defined our margin as the invers of the norm of
+$\bm{w}$. We want to minimize the norm in order to have a as large as
+possible margin $M$. Before we proceed, we need to remind ourselves
+about Lagrangian multipliers.
+
+
+===== A quick Reminder on Lagrangian Multipliers =====
+
+Consider a function of three independent variables $f(x,y,z)$ . For the function $f$ to be an
+extreme we have
+!bt
+\[
+df=0.
+\]
+!et
+A necessary and sufficient condition is
+!bt
+\[
+\frac{\partial f}{\partial x} =\frac{\partial f}{\partial y}=\frac{\partial f}{\partial z}=0,
+\]
+!et
+due to
+!bt
+\[
+df = \frac{\partial f}{\partial x}dx+\frac{\partial f}{\partial y}dy+\frac{\partial f}{\partial z}dz.
+\]
+!et
+In many problems the variables $x,y,z$ are often subject to constraints (such as those above for the margin)
+so that they are no longer all independent. It is possible at least in principle to use each
+constraint to eliminate one variable
+and to proceed with a new and smaller set of independent varables.
+
+The use of so-called Lagrangian multipliers is an alternative technique when the elimination
+of variables is incovenient or undesirable. Assume that we have an equation of constraint on
+the variables $x,y,z$
+!bt
+\[
+\phi(x,y,z) = 0,
+\]
+!et
+ resulting in
+!bt
+\[
+d\phi = \frac{\partial \phi}{\partial x}dx+\frac{\partial \phi}{\partial y}dy+\frac{\partial \phi}{\partial z}dz =0.
+\]
+!et
+Now we cannot set anymore
+!bt
+\[
+\frac{\partial f}{\partial x} =\frac{\partial f}{\partial y}=\frac{\partial f}{\partial z}=0,
+\]
+!et
+if $df=0$ is wanted
+because there are now only two independent variables! Assume $x$ and $y$ are the independent
+variables.
+Then $dz$ is no longer arbitrary.
+
+
+===== Adding the Multiplier =====
+
+However, we can add to
+!bt
+\[
+df = \frac{\partial f}{\partial x}dx+\frac{\partial f}{\partial y}dy+\frac{\partial f}{\partial z}dz,
+\]
+!et
+a multiplum of $d\phi$, viz. $\lambda d\phi$, resulting in
+!bt
+\[
+df+\lambda d\phi = (\frac{\partial f}{\partial z}+\lambda
+\frac{\partial \phi}{\partial x})dx+(\frac{\partial f}{\partial y}+\lambda\frac{\partial \phi}{\partial y})dy+
+(\frac{\partial f}{\partial z}+\lambda\frac{\partial \phi}{\partial z})dz =0.
+\]
+!et
+Our multiplier is chosen so that
+!bt
+\[
+\frac{\partial f}{\partial z}+\lambda\frac{\partial \phi}{\partial z} =0.
+\]
+!et
+
+We need to remember that we took $dx$ and $dy$ to be arbitrary and thus we must have
+!bt
+\[
+\frac{\partial f}{\partial x}+\lambda\frac{\partial \phi}{\partial x} =0,
+\]
+!et
+and
+!bt
+\[
+\frac{\partial f}{\partial y}+\lambda\frac{\partial \phi}{\partial y} =0.
+\]
+!et
+When all these equations are satisfied, $df=0$. We have four unknowns, $x,y,z$ and
+$\lambda$. Actually we want only $x,y,z$, $\lambda$ needs not to be determined,
+it is therefore often called
+Lagrange's undetermined multiplier.
+If we have a set of constraints $\phi_k$ we have the equations
+!bt
+\[
+\frac{\partial f}{\partial x_i}+\sum_k\lambda_k\frac{\partial \phi_k}{\partial x_i} =0.
+\]
+!et
+
+
+===== Setting up the Problem =====
+In order to solve the above problem, we define the following Lagrangian function to be minimized
+!bt
+\[
+{\cal L}(\lambda,b,\bm{w})=\frac{1}{2}\bm{w}^T\bm{w}-\sum_{i=1}^n\lambda_i\left[y_i(\bm{w}^T\bm{x}_i+b)-1\right],
+\]
+!et
+where $\lambda_i$ is a so-called Lagrange multiplier subject to the condition $\lambda_i \geq 0$.
+
+Taking the derivatives with respect to $b$ and $\bm{w}$ we obtain
+!bt
+\[
+\frac{\partial {\cal L}}{\partial b} = -\sum_{i} \lambda_iy_i=0,
+\]
+!et
+and
+!bt
+\[
+\frac{\partial {\cal L}}{\partial \bm{w}} = 0 = \bm{w}-\sum_{i} \lambda_iy_i\bm{x}_i.
+\]
+!et
+Inserting these constraints into the equation for ${\cal L}$ we obtain
+!bt
+\[
+{\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\bm{x}_i^T\bm{x}_j,
+\]
+!et
+subject to the constraints $\lambda_i\geq 0$ and $\sum_i\lambda_iy_i=0$.
+We must in addition satisfy the "Karush-Kuhn-Tucker":"https://en.wikipedia.org/wiki/Karush%E2%80%93Kuhn%E2%80%93Tucker_conditions" (KKT) condition
+!bt
+\[
+\lambda_i\left[y_i(\bm{w}^T\bm{x}_i+b) -1\right] \hspace{0.1cm}\forall i.
+\]
+!et
+o If $\lambda_i > 0$, then $y_i(\bm{w}^T\bm{x}_i+b)=1$ and we say that $x_i$ is on the boundary.
+o If $y_i(\bm{w}^T\bm{x}_i+b)> 1$, we say $x_i$ is not on the boundary and we set $\lambda_i=0$.
+When $\lambda_i > 0$, the vectors $\bm{x}_i$ are called support vectors. They are the vectors closest to the line (or hyperplane) and define the margin $M$.
+
+
+===== The problem to solve =====
+
+We can rewrite
+!bt
+\[
+{\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\bm{x}_i^T\bm{x}_j,
+\]
+!et
+and its constraints in terms of a matrix-vector problem where we minimize w.r.t. $\lambda$ the following problem
+!bt
+\[
+\frac{1}{2} \bm{\lambda}^T\begin{bmatrix} y_1y_1\bm{x}_1^T\bm{x}_1 & y_1y_2\bm{x}_1^T\bm{x}_2 & \dots & \dots & y_1y_n\bm{x}_1^T\bm{x}_n \\
+y_2y_1\bm{x}_2^T\bm{x}_1 & y_2y_2\bm{x}_2^T\bm{x}_2 & \dots & \dots & y_1y_n\bm{x}_2^T\bm{x}_n \\
+\dots & \dots & \dots & \dots & \dots \\
+\dots & \dots & \dots & \dots & \dots \\
+y_ny_1\bm{x}_n^T\bm{x}_1 & y_ny_2\bm{x}_n^T\bm{x}_2 & \dots & \dots & y_ny_n\bm{x}_n^T\bm{x}_n \\
+\end{bmatrix}\bm{\lambda}-\mathbb{1}\bm{\lambda},
+\]
+!et
+subject to $\bm{y}^T\bm{\lambda}=0$. Here we defined the vectors $\bm{\lambda} =[\lambda_1,\lambda_2,\dots,\lambda_n]$ and
+$\bm{y}=[y_1,y_2,\dots,y_n]$.
+
+
+
+===== The last steps =====
+
+Solving the above problem, yields the values of $\lambda_i$.
+To find the coefficients of your hyperplane we need simply to compute
+!bt
+\[
+\bm{w}=\sum_{i} \lambda_iy_i\bm{x}_i.
+\]
+!et
+With our vector $\bm{w}$ we can in turn find the value of the intercept $b$ (here in two dimensions) via
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b)=1,
+\]
+!et
+resulting in
+!bt
+\[
+b = \frac{1}{y_i}-\bm{w}^T\bm{x}_i,
+\]
+!et
+or if we write it out in terms of the support vectors only, with $N_s$ being their number, we have
+!bt
+\[
+b = \frac{1}{N_s}\sum_{j\in N_s}\left(y_j-\sum_{i=1}^n\lambda_iy_i\bm{x}_i^T\bm{x}_j\right).
+\]
+!et
+With our hyperplane coefficients we can use our classifier to assign any observation by simply using
+!bt
+\[
+y_i = \mathrm{sign}(\bm{w}^T\bm{x}_i+b).
+\]
+!et
+Below we discuss how to find the optimal values of $\lambda_i$. Before we proceed however, we discuss now the so-called soft classifier.
+
+
+===== A soft classifier =====
+
+Till now, the margin is strictly defined by the support vectors. This defines what is called a hard classifier, that is the margins are well defined.
+
+Suppose now that classes overlap in feature space, as shown in the
+figure here. One way to deal with this problem before we define the
+so-called _kernel approach_, is to allow a kind of slack in the sense
+that we allow some points to be on the wrong side of the margin.
+
+We introduce thus the so-called _slack_ variables $\bm{\xi} =[\xi_1,x_2,\dots,x_n]$ and
+modify our previous equation
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b)=1,
+\]
+!et
+to
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b)=1-\xi_i,
+\]
+!et
+with the requirement $\xi_i\geq 0$. The total violation is now $\sum_i\xi$.
+The value $\xi_i$ in the constraint the last constraint corresponds to the amount by which the prediction
+$y_i(\bm{w}^T\bm{x}_i+b)=1$ is on the wrong side of its margin. Hence by bounding the sum $\sum_i \xi_i$,
+we bound the total amount by which predictions fall on the wrong side of their margins.
+
+Misclassifications occur when $\xi_i > 1$. Thus bounding the total sum by some value $C$ bounds in turn the total number of
+misclassifications.
+
+
+===== Soft optmization problem =====
+
+
+This has in turn the consequences that we change our optmization problem to finding the minimum of
+!bt
+\[
+{\cal L}=\frac{1}{2}\bm{w}^T\bm{w}-\sum_{i=1}^n\lambda_i\left[y_i(\bm{w}^T\bm{x}_i+b)-(1-\xi_)\right]+C\sum_{i=1}^n\xi_i-\sum_{i=1}^n\gamma_i\xi_i,
+\]
+!et
+subject to
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b)=1-\xi_i \hspace{0.1cm}\forall i,
+\]
+!et
+with the requirement $\xi_i\geq 0$.
+
+Taking the derivatives with respect to $b$ and $\bm{w}$ we obtain
+!bt
+\[
+\frac{\partial {\cal L}}{\partial b} = -\sum_{i} \lambda_iy_i=0,
+\]
+!et
+and
+!bt
+\[
+\frac{\partial {\cal L}}{\partial \bm{w}} = 0 = \bm{w}-\sum_{i} \lambda_iy_i\bm{x}_i,
+\]
+!et
+and
+!bt
+\[
+\lambda_i = C-\gamma_i \hspace{0.1cm}\forall i.
+\]
+!et
+Inserting these constraints into the equation for ${\cal L}$ we obtain the same equation as before
+!bt
+\[
+{\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\bm{x}_i^T\bm{x}_j,
+\]
+!et
+but now subject to the constraints $\lambda_i\geq 0$, $\sum_i\lambda_iy_i=0$ and $0\leq\lambda_i \leq C$.
+We must in addition satisfy the Karush-Kuhn-Tucker condition which now reads
+!bt
+\[
+\lambda_i\left[y_i(\bm{w}^T\bm{x}_i+b) -(1-\xi_)\right]=0 \hspace{0.1cm}\forall i,
+\]
+!et
+!bt
+\[
+\gamma_i\xi_i = 0,
+\]
+!et
+and
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b) -(1-\xi_) \geq 0 \hspace{0.1cm}\forall i.
+\]
+!et
+
+
+===== Kernels and non-linearity =====
+
+The cases we have studied till now, were all characterized by two classes
+with a close to linear separability. The classifiers we have described
+so far find linear boundaries in our input feature space. It is
+possible to make our procedure more flexible by exploring the feature
+space using other basis expansions such as higher-order polynomials,
+wavelets, splines etc.
+
+If our feature space is not easy to separate, as shown in the figure
+here, we can achieve a better separation by introducing more complex
+basis functions. The ideal would be, as shown in the next figure, to, via a specific transformation to
+obtain a separation between the classes which is almost linear.
+
+The change of basis, from $x\rightarrow z=\phi(x)$ leads to the same type of equations to be solved, except that
+we need to introduce for example a polynomial transformation to a two-dimensional training set.
+
+!bc pycod
+import numpy as np
+import os
+
+np.random.seed(42)
+
+# To plot pretty figures
+import matplotlib
+import matplotlib.pyplot as plt
+plt.rcParams['axes.labelsize'] = 14
+plt.rcParams['xtick.labelsize'] = 12
+plt.rcParams['ytick.labelsize'] = 12
+
+
+from sklearn.svm import SVC
+from sklearn import datasets
+
+
+
+X1D = np.linspace(-4, 4, 9).reshape(-1, 1)
+X2D = np.c_[X1D, X1D**2]
+y = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])
+
+plt.figure(figsize=(11, 4))
+
+plt.subplot(121)
+plt.grid(True, which='both')
+plt.axhline(y=0, color='k')
+plt.plot(X1D[:, 0][y==0], np.zeros(4), "bs")
+plt.plot(X1D[:, 0][y==1], np.zeros(5), "g^")
+plt.gca().get_yaxis().set_ticks([])
+plt.xlabel(r"$x_1$", fontsize=20)
+plt.axis([-4.5, 4.5, -0.2, 0.2])
+
+plt.subplot(122)
+plt.grid(True, which='both')
+plt.axhline(y=0, color='k')
+plt.axvline(x=0, color='k')
+plt.plot(X2D[:, 0][y==0], X2D[:, 1][y==0], "bs")
+plt.plot(X2D[:, 0][y==1], X2D[:, 1][y==1], "g^")
+plt.xlabel(r"$x_1$", fontsize=20)
+plt.ylabel(r"$x_2$", fontsize=20, rotation=0)
+plt.gca().get_yaxis().set_ticks([0, 4, 8, 12, 16])
+plt.plot([-4.5, 4.5], [6.5, 6.5], "r--", linewidth=3)
+plt.axis([-4.5, 4.5, -1, 17])
+plt.subplots_adjust(right=1)
+plt.show()
+
+!ec
+
+
+
+
+===== The equations =====
+
+Suppose we define a polynomial transformation of degree two only (we continue to live in a plane with $x_i$ and $y_i$ as variables)
+!bt
+\[
+z = \phi(x_i) =\left(x_i^2, y_i^2, \sqrt{2}x_iy_i\right).
+\]
+!et
+
+With our new basis, the equations we solved earlier are basically the same, that is we have now (without the slack option for simplicity)
+!bt
+\[
+{\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\bm{z}_i^T\bm{z}_j,
+\]
+!et
+subject to the constraints $\lambda_i\geq 0$, $\sum_i\lambda_iy_i=0$, and for the support vectors
+!bt
+\[
+y_i(\bm{w}^T\bm{z}_i+b)= 1 \hspace{0.1cm}\forall i,
+\]
+!et
+from which we also find $b$.
+To compute $\bm{z}_i^T\bm{z}_j$ we define the kernel $K(\bm{x}_i,\bm{x}_j)$ as
+!bt
+\[
+K(\bm{x}_i,\bm{x}_j)=\bm{z}_i^T\bm{z}_j= \phi(\bm{x}_i)^T\phi(\bm{x}_j).
+\]
+!et
+For the above example, the kernel reads
+!bt
+\[
+K(\bm{x}_i,\bm{x}_j)=[x_i^2, y_i^2, \sqrt{2}x_iy_i]^T\begin{bmatrix} x_j^2 \\ y_j^2 \\ \sqrt{2}x_jy_j \end{bmatrix}=x_i^2x_j^2+2x_ix_jy_iy_j+y_i^2y_j^2.
+\]
+!et
+
+We note that this is nothing but the dot product of the two original
+vectors $(\bm{x}_i^T\bm{x}_j)^2$. Instead of thus computing the
+product in the Lagrangian of $\bm{z}_i^T\bm{z}_j$ we simply compute
+the dot product $(\bm{x}_i^T\bm{x}_j)^2$.
+
+
+This leads to the so-called
+kernel trick and the result leads to the same as if we went through
+the trouble of performing the transformation
+$\phi(\bm{x}_i)^T\phi(\bm{x}_j)$ during the SVM calculations.
+
+
+
+===== The problem to solve =====
+Using our definition of the kernel We can rewrite again the Lagrangian
+!bt
+\[
+{\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\bm{x}_i^T\bm{z}_j,
+\]
+!et
+subject to the constraints $\lambda_i\geq 0$, $\sum_i\lambda_iy_i=0$ in terms of a convex optimization problem
+!bt
+\[
+\frac{1}{2} \bm{\lambda}^T\begin{bmatrix} y_1y_1K(\bm{x}_1,\bm{x}_1) & y_1y_2K(\bm{x}_1,\bm{x}_2) & \dots & \dots & y_1y_nK(\bm{x}_1,\bm{x}_n) \\
+y_2y_1K(\bm{x}_2,\bm{x}_1) & y_2y_2(\bm{x}_2,\bm{x}_2) & \dots & \dots & y_1y_nK(\bm{x}_2,\bm{x}_n) \\
+\dots & \dots & \dots & \dots & \dots \\
+\dots & \dots & \dots & \dots & \dots \\
+y_ny_1K(\bm{x}_n,\bm{x}_1) & y_ny_2K(\bm{x}_n\bm{x}_2) & \dots & \dots & y_ny_nK(\bm{x}_n,\bm{x}_n) \\
+\end{bmatrix}\bm{\lambda}-\mathbb{1}\bm{\lambda},
+\]
+!et
+subject to $\bm{y}^T\bm{\lambda}=0$. Here we defined the vectors $\bm{\lambda} =[\lambda_1,\lambda_2,\dots,\lambda_n]$ and
+$\bm{y}=[y_1,y_2,\dots,y_n]$.
+If we add the slack constants this leads to the additional constraint $0\leq \lambda_i \leq C$.
+
+We can rewrite this (see the solutions below) in terms of a convex optimization problem of the type
+!bt
+\begin{align*}
+ &\mathrm{min}_{\lambda}\hspace{0.2cm} \frac{1}{2}\bm{\lambda}^T\bm{P}\bm{\lambda}+\bm{q}^T\bm{\lambda},\\ \nonumber
+ &\mathrm{subject\hspace{0.1cm}to} \hspace{0.2cm} \bm{G}\bm{\lambda} \preceq \bm{h} \hspace{0.2cm} \wedge \bm{A}\bm{\lambda}=f.
+\end{align*}
+!et
+Below we discuss how to solve these equations. Here we note that the matrix $\bm{P}$ has matrix elements $p_{ij}=y_iy_jK(\bm{x}_i,\bm{x}_j)$.
+Given a kernel $K$ and the targets $y_i$ this matrix is easy to set up. The constraint $\bm{y}^T\bm{\lambda}=0$ leads to $f=0$ and $\bm{A}=\bm{y}$. How to set up the matrix $\bm{G}$ is discussed later. Here note that the inequalities $0\leq \lambda_i \leq C$ can be split up into
+$0\leq \lambda_i$ and $\lambda_i \leq C$. These two inequalities define then the matrix $\bm{G}$ and the vector $\bm{h}$.
+
+
+
+===== Different kernels and Mercer's theorem =====
+
+There are several popular kernels being used. These are
+o Linear: $K(\bm{x},\bm{y})=\bm{x}^T\bm{y}$,
+o Polynomial: $K(\bm{x},\bm{y})=(\bm{x}^T\bm{y}+\gamma)^d$,
+o Gaussian Radial Basis Function: $K(\bm{x},\bm{y})=\exp{\left(-\gamma\vert\vert\bm{x}-\bm{y}\vert\vert^2\right)}$,
+o Tanh: $K(\bm{x},\bm{y})=\tanh{(\bm{x}^T\bm{y}+\gamma)}$,
+and many other ones.
+
+An important theorem for us is "Mercer's
+theorem":"https://en.wikipedia.org/wiki/Mercer%27s_theorem". The
+theorem states that if a kernel function $K$ is symmetric, continuous
+and leads to a positive semi-definite matrix $\bm{P}$ then there
+exists a function $\phi$ that maps $\bm{x}_i$ and $\bm{x}_j$ into
+another space (possibly with much higher dimensions) such that
+
+!bt
+\[
+K(\bm{x}_i,\bm{x}_j)=\phi(\bm{x}_i)^T\phi(\bm{x}_j).
+\]
+!et
+
+So you can use $K$ as a kernel since you know $\phi$ exists, even if
+you don’t know what $\phi$ is.
+
+Note that some frequently used kernels (such as the Sigmoid kernel)
+don’t respect all of Mercer’s conditions, yet they generally work well
+in practice.
+
+
+
+===== The moons example =====
+!bc pycod
+from __future__ import division, print_function, unicode_literals
+
+import numpy as np
+np.random.seed(42)
+
+import matplotlib
+import matplotlib.pyplot as plt
+plt.rcParams['axes.labelsize'] = 14
+plt.rcParams['xtick.labelsize'] = 12
+plt.rcParams['ytick.labelsize'] = 12
+
+
+from sklearn.svm import SVC
+from sklearn import datasets
+
+
+
+from sklearn.pipeline import Pipeline
+from sklearn.preprocessing import StandardScaler
+from sklearn.svm import LinearSVC
+
+
+from sklearn.datasets import make_moons
+X, y = make_moons(n_samples=100, noise=0.15, random_state=42)
+
+def plot_dataset(X, y, axes):
+ plt.plot(X[:, 0][y==0], X[:, 1][y==0], "bs")
+ plt.plot(X[:, 0][y==1], X[:, 1][y==1], "g^")
+ plt.axis(axes)
+ plt.grid(True, which='both')
+ plt.xlabel(r"$x_1$", fontsize=20)
+ plt.ylabel(r"$x_2$", fontsize=20, rotation=0)
+
+plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
+plt.show()
+
+from sklearn.datasets import make_moons
+from sklearn.pipeline import Pipeline
+from sklearn.preprocessing import PolynomialFeatures
+
+polynomial_svm_clf = Pipeline([
+ ("poly_features", PolynomialFeatures(degree=3)),
+ ("scaler", StandardScaler()),
+ ("svm_clf", LinearSVC(C=10, loss="hinge", random_state=42))
+ ])
+
+polynomial_svm_clf.fit(X, y)
+
+def plot_predictions(clf, axes):
+ x0s = np.linspace(axes[0], axes[1], 100)
+ x1s = np.linspace(axes[2], axes[3], 100)
+ x0, x1 = np.meshgrid(x0s, x1s)
+ X = np.c_[x0.ravel(), x1.ravel()]
+ y_pred = clf.predict(X).reshape(x0.shape)
+ y_decision = clf.decision_function(X).reshape(x0.shape)
+ plt.contourf(x0, x1, y_pred, cmap=plt.cm.brg, alpha=0.2)
+ plt.contourf(x0, x1, y_decision, cmap=plt.cm.brg, alpha=0.1)
+
+plot_predictions(polynomial_svm_clf, [-1.5, 2.5, -1, 1.5])
+plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
+
+plt.show()
+
+
+from sklearn.svm import SVC
+
+poly_kernel_svm_clf = Pipeline([
+ ("scaler", StandardScaler()),
+ ("svm_clf", SVC(kernel="poly", degree=3, coef0=1, C=5))
+ ])
+poly_kernel_svm_clf.fit(X, y)
+
+poly100_kernel_svm_clf = Pipeline([
+ ("scaler", StandardScaler()),
+ ("svm_clf", SVC(kernel="poly", degree=10, coef0=100, C=5))
+ ])
+poly100_kernel_svm_clf.fit(X, y)
+
+plt.figure(figsize=(11, 4))
+
+plt.subplot(121)
+plot_predictions(poly_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])
+plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
+plt.title(r"$d=3, r=1, C=5$", fontsize=18)
+
+plt.subplot(122)
+plot_predictions(poly100_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])
+plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
+plt.title(r"$d=10, r=100, C=5$", fontsize=18)
+
+plt.show()
+
+def gaussian_rbf(x, landmark, gamma):
+ return np.exp(-gamma * np.linalg.norm(x - landmark, axis=1)**2)
+
+gamma = 0.3
+
+x1s = np.linspace(-4.5, 4.5, 200).reshape(-1, 1)
+x2s = gaussian_rbf(x1s, -2, gamma)
+x3s = gaussian_rbf(x1s, 1, gamma)
+
+XK = np.c_[gaussian_rbf(X1D, -2, gamma), gaussian_rbf(X1D, 1, gamma)]
+yk = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])
+
+plt.figure(figsize=(11, 4))
+
+plt.subplot(121)
+plt.grid(True, which='both')
+plt.axhline(y=0, color='k')
+plt.scatter(x=[-2, 1], y=[0, 0], s=150, alpha=0.5, c="red")
+plt.plot(X1D[:, 0][yk==0], np.zeros(4), "bs")
+plt.plot(X1D[:, 0][yk==1], np.zeros(5), "g^")
+plt.plot(x1s, x2s, "g--")
+plt.plot(x1s, x3s, "b:")
+plt.gca().get_yaxis().set_ticks([0, 0.25, 0.5, 0.75, 1])
+plt.xlabel(r"$x_1$", fontsize=20)
+plt.ylabel(r"Similarity", fontsize=14)
+plt.annotate(r'$\mathbf{x}$',
+ xy=(X1D[3, 0], 0),
+ xytext=(-0.5, 0.20),
+ ha="center",
+ arrowprops=dict(facecolor='black', shrink=0.1),
+ fontsize=18,
+ )
+plt.text(-2, 0.9, "$x_2$", ha="center", fontsize=20)
+plt.text(1, 0.9, "$x_3$", ha="center", fontsize=20)
+plt.axis([-4.5, 4.5, -0.1, 1.1])
+
+plt.subplot(122)
+plt.grid(True, which='both')
+plt.axhline(y=0, color='k')
+plt.axvline(x=0, color='k')
+plt.plot(XK[:, 0][yk==0], XK[:, 1][yk==0], "bs")
+plt.plot(XK[:, 0][yk==1], XK[:, 1][yk==1], "g^")
+plt.xlabel(r"$x_2$", fontsize=20)
+plt.ylabel(r"$x_3$ ", fontsize=20, rotation=0)
+plt.annotate(r'$\phi\left(\mathbf{x}\right)$',
+ xy=(XK[3, 0], XK[3, 1]),
+ xytext=(0.65, 0.50),
+ ha="center",
+ arrowprops=dict(facecolor='black', shrink=0.1),
+ fontsize=18,
+ )
+plt.plot([-0.1, 1.1], [0.57, -0.1], "r--", linewidth=3)
+plt.axis([-0.1, 1.1, -0.1, 1.1])
+
+plt.subplots_adjust(right=1)
+
+plt.show()
+
+
+x1_example = X1D[3, 0]
+for landmark in (-2, 1):
+ k = gaussian_rbf(np.array([[x1_example]]), np.array([[landmark]]), gamma)
+ print("Phi({}, {}) = {}".format(x1_example, landmark, k))
+
+rbf_kernel_svm_clf = Pipeline([
+ ("scaler", StandardScaler()),
+ ("svm_clf", SVC(kernel="rbf", gamma=5, C=0.001))
+ ])
+rbf_kernel_svm_clf.fit(X, y)
+
+
+from sklearn.svm import SVC
+
+gamma1, gamma2 = 0.1, 5
+C1, C2 = 0.001, 1000
+hyperparams = (gamma1, C1), (gamma1, C2), (gamma2, C1), (gamma2, C2)
+
+svm_clfs = []
+for gamma, C in hyperparams:
+ rbf_kernel_svm_clf = Pipeline([
+ ("scaler", StandardScaler()),
+ ("svm_clf", SVC(kernel="rbf", gamma=gamma, C=C))
+ ])
+ rbf_kernel_svm_clf.fit(X, y)
+ svm_clfs.append(rbf_kernel_svm_clf)
+
+plt.figure(figsize=(11, 7))
+
+for i, svm_clf in enumerate(svm_clfs):
+ plt.subplot(221 + i)
+ plot_predictions(svm_clf, [-1.5, 2.5, -1, 1.5])
+ plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
+ gamma, C = hyperparams[i]
+ plt.title(r"$\gamma = {}, C = {}$".format(gamma, C), fontsize=16)
+
+plt.show()
+
+!ec
+
+
+
+
+===== Mathematical optimization of convex functions =====
+
+A mathematical (quadratic) optimization problem, or just optimization problem, has the form
+!bt
+\begin{align*}
+ &\mathrm{min}_{\lambda}\hspace{0.2cm} \frac{1}{2}\bm{\lambda}^T\bm{P}\bm{\lambda}+\bm{q}^T\bm{\lambda},\\ \nonumber
+ &\mathrm{subject\hspace{0.1cm}to} \hspace{0.2cm} \bm{G}\bm{\lambda} \preceq \bm{h} \wedge \bm{A}\bm{\lambda}=f.
+\end{align*}
+!et
+subject to some constraints for say a selected set $i=1,2,\dots, n$.
+In our case we are optimizing with respect to the Lagrangian multipliers $\lambda_i$, and the
+vector $\bm{\lambda}=[\lambda_1, \lambda_2,\dots, \lambda_n]$ is the optimization variable we are dealing with.
+
+In our case we are particularly interested in a class of optimization problems called convex optmization problems.
+In our discussion on gradient descent methods we discussed at length the definition of a convex function.
+
+Convex optimization problems play a central role in applied mathematics and we recommend strongly "Boyd and Vandenberghe's text on the topics":"http://web.stanford.edu/~boyd/cvxbook/".
+
+
+
+
+===== How do we solve these problems? =====
+
+If we use Python as programming language and wish to venture beyond
+_scikit-learn_, _tensorflow_ and similar software which makes our
+lives so much easier, we need to dive into the wonderful world of
+quadratic programming. We can, if we wish, solve the minimization
+problem using say standard gradient methods or conjugate gradient
+methods. However, these methods tend to exhibit a rather slow
+converge. So, welcome to the promised land of quadratic programming.
+
+The functions we need are contained in the quadratic programming package _CVXOPT_ and we need to import it together with _numpy_ as
+
+!bc pycod
+import numpy
+import cvxopt
+!ec
+
+This will make our life much easier. You don't need t write your own optimizer.
+
+
+
+===== A simple example =====
+
+We remind ourselves about the general problem we want to solve
+!bt
+\begin{align*}
+ &\mathrm{min}_{x}\hspace{0.2cm} \frac{1}{2}\bm{x}^T\bm{P}\bm{x}+\bm{q}^T\bm{x},\\ \nonumber
+ &\mathrm{subject\hspace{0.1cm} to} \hspace{0.2cm} \bm{G}\bm{x} \preceq \bm{h} \wedge \bm{A}\bm{x}=f.
+\end{align*}
+!et
+
+Let us show how to perform the optmization using a simple case. Assume we want to optimize the following problem
+!bt
+\begin{align*}
+ &\mathrm{min}_{x}\hspace{0.2cm} \frac{1}{2}x^2+5x+3y \\ \nonumber
+ &\mathrm{subject to} \\ \nonumber
+ &x, y \geq 0 \\ \nonumber
+ &x+3y \geq 15 \\ \nonumber
+ &2x+5y \leq 100 \\ \nonumber
+ &3x+4y \leq 80. \\ \nonumber
+\end{align*}
+!et
+The minimization problem can be rewritten in terms of vectors and matrices as (with $x$ and $y$ being the unknowns)
+!bt
+\[
+\frac{1}{2}\begin{bmatrix} x\\ y \end{bmatrix}^T \begin{bmatrix} 1 & 0\\ 0 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} + \begin{bmatrix}3\\ 4 \end{bmatrix}^T \begin{bmatrix}x \\ y \end{bmatrix}.
+\]
+!et
+Similarly, we can now set up the inequalities (we need to change $\geq$ to $\leq$ by multiplying with $-1$ on bot sides) as the following matrix-vector equation
+!bt
+\[
+\begin{bmatrix} -1 & 0 \\ 0 & -1 \\ -1 & -3 \\ 2 & 5 \\ 3 & 4\end{bmatrix}\begin{bmatrix} x \\ y\end{bmatrix} \preceq \begin{bmatrix}0 \\ 0\\ -15 \\ 100 \\ 80\end{bmatrix}.
+\]
+!et
+We have collapsed all the inequalities into a single matrix $\bm{G}$. We see also that our matrix
+!bt
+\[
+\bm{P} =\begin{bmatrix} 1 & 0\\ 0 & 0 \end{bmatrix}
+\]
+!et
+is clearly positive semi-definite (all eigenvalues larger or equal zero).
+Finally, the vector $\bm{h}$ is defined as
+!bt
+\[
+\bm{h} = \begin{bmatrix}0 \\ 0\\ -15 \\ 100 \\ 80\end{bmatrix}.
+\]
+!et
+
+
+Since we don't have any equalities the matrix $\bm{A}$ is set to zero
+The following code solves the equations for us
+!bc pycod
+# Import the necessary packages
+import numpy
+from cvxopt import matrix
+from cvxopt import solvers
+P = matrix(numpy.diag([1,0]), tc=’d’)
+q = matrix(numpy.array([3,4]), tc=’d’)
+G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc=’d’)
+h = matrix(numpy.array([0,0,-15,100,80]), tc=’d’)
+# Construct the QP, invoke solver
+sol = solvers.qp(P,q,G,h)
+# Extract optimal value and solution
+sol[’x’]
+sol[’primal objective’]
+!ec
+
+
+===== Back to the more realistic cases =====
+
+We are now ready to return to our setup of the optmization problem for a more realistic case. Introducing the _slack_ parameter $C$ we have
+!bt
+\[
+\frac{1}{2} \bm{\lambda}^T\begin{bmatrix} y_1y_1K(\bm{x}_1,\bm{x}_1) & y_1y_2K(\bm{x}_1,\bm{x}_2) & \dots & \dots & y_1y_nK(\bm{x}_1,\bm{x}_n) \\
+y_2y_1K(\bm{x}_2,\bm{x}_1) & y_2y_2K(\bm{x}_2,\bm{x}_2) & \dots & \dots & y_1y_nK(\bm{x}_2,\bm{x}_n) \\
+\dots & \dots & \dots & \dots & \dots \\
+\dots & \dots & \dots & \dots & \dots \\
+y_ny_1K(\bm{x}_n,\bm{x}_1) & y_ny_2K(\bm{x}_n\bm{x}_2) & \dots & \dots & y_ny_nK(\bm{x}_n,\bm{x}_n) \\
+\end{bmatrix}\bm{\lambda}-\mathbb{I}\bm{\lambda},
+\]
+!et
+subject to $\bm{y}^T\bm{\lambda}=0$. Here we defined the vectors $\bm{\lambda} =[\lambda_1,\lambda_2,\dots,\lambda_n]$ and
+$\bm{y}=[y_1,y_2,\dots,y_n]$.
+With the slack constants this leads to the additional constraint $0\leq \lambda_i \leq C$.
+
+_code will be added_
+
+
diff --git a/doc/src/SupportVMachines/chapter7.do.txt~ b/doc/src/SupportVMachines/chapter7.do.txt~
new file mode 100644
index 000000000..4ce89c8ef
--- /dev/null
+++ b/doc/src/SupportVMachines/chapter7.do.txt~
@@ -0,0 +1,1143 @@
+TITLE: Data Analysis and Machine Learning: Support Vector Machines
+AUTHOR: Morten Hjorth-Jensen {copyright, 1999-present|CC BY-NC} at Department of Physics, University of Oslo & Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University
+DATE: today
+
+!split
+===== Support Vector Machines, overarching aims =====
+
+A Support Vector Machine (SVM) is a very powerful and versatile
+Machine Learning method, capable of performing linear or nonlinear
+classification, regression, and even outlier detection. It is one of
+the most popular models in Machine Learning, and anyone interested in
+Machine Learning should have it in their toolbox. SVMs are
+particularly well suited for classification of complex but small-sized or
+medium-sized datasets.
+
+The case with two well-separated classes only can be understood in an
+intuitive way in terms of lines in a two-dimensional space separating
+the two classes (see figure below).
+
+The basic mathematics behind the SVM is however less familiar to most of us.
+It relies on the definition of hyperplanes and the
+definition of a _margin_ which separates classes (in case of
+classification problems) of variables. It is also used for regression
+problems.
+
+With SVMs we distinguish between hard margin and soft margins. The
+latter introduces a so-called softening parameter to be discussed
+below. We distinguish also between linear and non-linear
+approaches. The latter are the most frequent ones since it is rather
+unlikely that we can separate classes easily by say straight lines.
+
+!split
+===== Hyperplanes and all that =====
+
+The theory behind support vector machines (SVM hereafter) is based on
+the mathematical description of so-called hyperplanes. Let us start
+with a two-dimensional case. This will also allow us to introduce our
+first SVM examples. These will be tailored to the case of two specific
+classes, as displayed in the figure here based on the usage of the petal data.
+
+We assume here that our data set can be well separated into two
+domains, where a straight line does the job in the separating the two
+classes. Here the two classes are represented by either squares or
+circles.
+!bc pycod
+from sklearn import datasets
+from sklearn.svm import SVC, LinearSVC
+from sklearn.linear_model import SGDClassifier
+from sklearn.preprocessing import StandardScaler
+import matplotlib
+import matplotlib.pyplot as plt
+plt.rcParams['axes.labelsize'] = 14
+plt.rcParams['xtick.labelsize'] = 12
+plt.rcParams['ytick.labelsize'] = 12
+
+
+iris = datasets.load_iris()
+X = iris["data"][:, (2, 3)] # petal length, petal width
+y = iris["target"]
+
+setosa_or_versicolor = (y == 0) | (y == 1)
+X = X[setosa_or_versicolor]
+y = y[setosa_or_versicolor]
+
+
+
+C = 5
+alpha = 1 / (C * len(X))
+
+lin_clf = LinearSVC(loss="hinge", C=C, random_state=42)
+svm_clf = SVC(kernel="linear", C=C)
+sgd_clf = SGDClassifier(loss="hinge", learning_rate="constant", eta0=0.001, alpha=alpha,
+ max_iter=100000, random_state=42)
+
+scaler = StandardScaler()
+X_scaled = scaler.fit_transform(X)
+
+lin_clf.fit(X_scaled, y)
+svm_clf.fit(X_scaled, y)
+sgd_clf.fit(X_scaled, y)
+
+print("LinearSVC: ", lin_clf.intercept_, lin_clf.coef_)
+print("SVC: ", svm_clf.intercept_, svm_clf.coef_)
+print("SGDClassifier(alpha={:.5f}):".format(sgd_clf.alpha), sgd_clf.intercept_, sgd_clf.coef_)
+
+# Compute the slope and bias of each decision boundary
+w1 = -lin_clf.coef_[0, 0]/lin_clf.coef_[0, 1]
+b1 = -lin_clf.intercept_[0]/lin_clf.coef_[0, 1]
+w2 = -svm_clf.coef_[0, 0]/svm_clf.coef_[0, 1]
+b2 = -svm_clf.intercept_[0]/svm_clf.coef_[0, 1]
+w3 = -sgd_clf.coef_[0, 0]/sgd_clf.coef_[0, 1]
+b3 = -sgd_clf.intercept_[0]/sgd_clf.coef_[0, 1]
+
+# Transform the decision boundary lines back to the original scale
+line1 = scaler.inverse_transform([[-10, -10 * w1 + b1], [10, 10 * w1 + b1]])
+line2 = scaler.inverse_transform([[-10, -10 * w2 + b2], [10, 10 * w2 + b2]])
+line3 = scaler.inverse_transform([[-10, -10 * w3 + b3], [10, 10 * w3 + b3]])
+
+# Plot all three decision boundaries
+plt.figure(figsize=(11, 4))
+plt.plot(line1[:, 0], line1[:, 1], "k:", label="LinearSVC")
+plt.plot(line2[:, 0], line2[:, 1], "b--", linewidth=2, label="SVC")
+plt.plot(line3[:, 0], line3[:, 1], "r-", label="SGDClassifier")
+plt.plot(X[:, 0][y==1], X[:, 1][y==1], "bs") # label="Iris-Versicolor"
+plt.plot(X[:, 0][y==0], X[:, 1][y==0], "yo") # label="Iris-Setosa"
+plt.xlabel("Petal length", fontsize=14)
+plt.ylabel("Petal width", fontsize=14)
+plt.legend(loc="upper center", fontsize=14)
+plt.axis([0, 5.5, 0, 2])
+
+plt.show()
+
+
+
+!ec
+
+
+
+
+!split
+===== What is a hyperplane? =====
+
+The aim of the SVM algorithm is to find a hyperplane in a
+$p$-dimensional space, where $p$ is the number of features that
+distinctly classifies the data points.
+
+In a $p$-dimensional space, a hyperplane is what we call an affine subspace of dimension of $p-1$.
+As an example, in two dimension, a hyperplane is simply as straight line while in three dimensions it is
+a two-dimensional subspace, or stated simply, a plane.
+
+In two dimensions, with the variables $x_1$ and $x_2$, the hyperplane is defined as
+!bt
+\[
+b+w_1x_1+w_2x_2=0,
+\]
+!et
+
+where $b$ is the intercept and $w_1$ and $w_2$ define the elements of a vector orthogonal to the line
+$b+w_1x_1+w_2x_2=0$.
+In two dimensions we define the vectors $\bm{x} =[x1,x2]$ and $\bm{w}=[w1,w2]$.
+We can then rewrite the above equation as
+
+!bt
+\[
+\bm{x}^T\bm{w}+b=0.
+\]
+!et
+
+!split
+===== A $p$-dimensional space of features =====
+
+We limit ourselves to two classes of outputs $y_i$ and assign these classes the values $y_i = \pm 1$.
+In a $p$-dimensional space of say $p$ features we have a hyperplane defines as
+!bt
+\[
+b+wx_1+w_2x_2+\dots +w_px_p=0.
+\]
+!et
+If we define a
+matrix $\bm{X}=\left[\bm{x}_1,\bm{x}_2,\dots, \bm{x}_p\right]$
+of dimension $n\times p$, where $n$ represents the observations for each feature and each vector $x_i$ is a column vector of the matrix $\bm{X}$,
+!bt
+\[
+\bm{x}_i = \begin{bmatrix} x_{i1} \\ x_{i2} \\ \dots \\ \dots \\ x_{ip} \end{bmatrix}.
+\]
+!et
+If the above condition is not met for a given vector $\bm{x}_i$ we have
+!bt
+\[
+b+w_1x_{i1}+w_2x_{i2}+\dots +w_px_{ip} >0,
+\]
+!et
+if our output $y_i=1$.
+In this case we say that $\bm{x}_i$ lies on one of the sides of the hyperplane and if
+!bt
+\[
+b+w_1x_{i1}+w_2x_{i2}+\dots +w_px_{ip} < 0,
+\]
+!et
+for the class of observations $y_i=-1$,
+then $\bm{x}_i$ lies on the other side.
+
+Equivalently, for the two classes of observations we have
+!bt
+\[
+y_i\left(b+w_1x_{i1}+w_2x_{i2}+\dots +w_px_{ip}\right) > 0.
+\]
+!et
+
+When we try to separate hyperplanes, if it exists, we can use it to construct a natural classifier: a test observation is assigned a given class depending on which side of the hyperplane it is located.
+
+!split
+===== The two-dimensional case =====
+
+Let us try to develop our intuition about SVMs by limiting ourselves to a two-dimensional
+plane. To separate the two classes of data points, there are many
+possible lines (hyperplanes if you prefer a more strict naming)
+that could be chosen. Our objective is to find a
+plane that has the maximum margin, i.e the maximum distance between
+data points of both classes. Maximizing the margin distance provides
+some reinforcement so that future data points can be classified with
+more confidence.
+
+What a linear classifier attempts to accomplish is to split the
+feature space into two half spaces by placing a hyperplane between the
+data points. This hyperplane will be our decision boundary. All
+points on one side of the plane will belong to class one and all points
+on the other side of the plane will belong to the second class two.
+
+Unfortunately there are many ways in which we can place a hyperplane
+to divide the data. Below is an example of two candidate hyperplanes
+for our data sample.
+
+!split
+===== Getting into the details =====
+
+Let us define the function
+!bt
+\[
+f(x) = \bm{w}^T\bm{x}+b = 0,
+\]
+!et
+as the function that determines the line $L$ that separates two classes (our two features), see the figure here.
+
+
+Any point defined by $\bm{x}_i$ and $\bm{x}_2$ on the line $L$ will satisfy $\bm{w}^T(\bm{x}_1-\bm{x}_2)=0$.
+
+The signed distance $\delta$ from any point defined by a vector $\bm{x}$ and a point $\bm{x}_0$ on the line $L$ is then
+!bt
+\[
+\delta = \frac{1}{\vert\vert \bm{w}\vert\vert}(\bm{w}^T\bm{x}+b).
+\]
+!et
+
+!split
+===== First attempt at a minimization approach =====
+
+How do we find the parameter $b$ and the vector $\bm{w}$? What we could
+do is to define a cost function which now contains the set of all
+misclassified points $M$ and attempt to minimize this function
+
+!bt
+\[
+C(\bm{w},b) = -\sum_{i\in M} y_i(\bm{w}^T\bm{x}_i+b).
+\]
+!et
+
+We could now for example define all values $y_i =1$ as misclassified in case we have $\bm{w}^T\bm{x}_i+b < 0$ and the opposite if we have $y_i=-1$. Taking the derivatives gives us
+!bt
+\[
+\frac{\partial C}{\partial b} = -\sum_{i\in M} y_i,
+\]
+!et
+and
+!bt
+\[
+\frac{\partial C}{\partial \bm{w}} = -\sum_{i\in M} y_ix_i.
+\]
+!et
+
+!split
+===== Solving the equations =====
+
+We can now use the Newton-Raphson method or different variants of the gradient descent family (from plain gradient descent to various stochastic gradient descent approaches) to solve the equations
+!bt
+\[
+b \leftarrow b +\eta \frac{\partial C}{\partial b},
+\]
+!et
+and
+!bt
+\[
+\bm{w} \leftarrow \bm{w} +\eta \frac{\partial C}{\partial \bm{w}},
+\]
+!et
+where $\eta$ is our by now well-known learning rate.
+
+
+!split
+===== Code Example =====
+
+The equations we discussed above can be coded rather easily (the
+framework is similar to what we developed for logistic
+regression). We are going to set up a simple case with two classes only and we want to find a line which separates them the best possible way.
+!bc pycod
+
+!ec
+
+!split
+===== Problems with the Simpler Approach =====
+
+
+There are however problems with this approach, although it looks
+pretty straightforward to implement. When running the above code, we see that we can easily end up with many diffeent lines which separate the two classes.
+
+
+For small
+gaps between the entries, we may also end up needing many iterations
+before the solutions converge and if the data cannot be separated
+properly into two distinct classes, we may not experience a converge
+at all.
+
+!split
+===== A better approach =====
+
+A better approach is rather to try to define a large margin between
+the two classes (if they are well separated from the beginning).
+
+Thus, we wish to find a margin $M$ with $\bm{w}$ normalized to
+$\vert\vert \bm{w}\vert\vert =1$ subject to the condition
+
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, p.
+\]
+!et
+All points are thus at a signed distance from the decision boundary defined by the line $L$. The parameters $b$ and $w_1$ and $w_2$ define this line.
+
+We seek thus the largest value $M$ defined by
+!bt
+\[
+\frac{1}{\vert \vert \bm{w}\vert\vert}y_i(\bm{w}^T\bm{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, n,
+\]
+!et
+or just
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b) \geq M\vert \vert \bm{w}\vert\vert \hspace{0.1cm}\forall i.
+\]
+!et
+If we scale the equation so that $\vert \vert \bm{w}\vert\vert = 1/M$, we have to find the minimum of
+$\bm{w}^T\bm{w}=\vert \vert \bm{w}\vert\vert$ (the norm) subject to the condition
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b) \geq 1 \hspace{0.1cm}\forall i.
+\]
+!et
+
+We have thus defined our margin as the invers of the norm of
+$\bm{w}$. We want to minimize the norm in order to have a as large as
+possible margin $M$. Before we proceed, we need to remind ourselves
+about Lagrangian multipliers.
+
+!split
+===== A quick Reminder on Lagrangian Multipliers =====
+
+Consider a function of three independent variables $f(x,y,z)$ . For the function $f$ to be an
+extreme we have
+!bt
+\[
+df=0.
+\]
+!et
+A necessary and sufficient condition is
+!bt
+\[
+\frac{\partial f}{\partial x} =\frac{\partial f}{\partial y}=\frac{\partial f}{\partial z}=0,
+\]
+!et
+due to
+!bt
+\[
+df = \frac{\partial f}{\partial x}dx+\frac{\partial f}{\partial y}dy+\frac{\partial f}{\partial z}dz.
+\]
+!et
+In many problems the variables $x,y,z$ are often subject to constraints (such as those above for the margin)
+so that they are no longer all independent. It is possible at least in principle to use each
+constraint to eliminate one variable
+and to proceed with a new and smaller set of independent varables.
+
+The use of so-called Lagrangian multipliers is an alternative technique when the elimination
+of variables is incovenient or undesirable. Assume that we have an equation of constraint on
+the variables $x,y,z$
+!bt
+\[
+\phi(x,y,z) = 0,
+\]
+!et
+ resulting in
+!bt
+\[
+d\phi = \frac{\partial \phi}{\partial x}dx+\frac{\partial \phi}{\partial y}dy+\frac{\partial \phi}{\partial z}dz =0.
+\]
+!et
+Now we cannot set anymore
+!bt
+\[
+\frac{\partial f}{\partial x} =\frac{\partial f}{\partial y}=\frac{\partial f}{\partial z}=0,
+\]
+!et
+if $df=0$ is wanted
+because there are now only two independent variables! Assume $x$ and $y$ are the independent
+variables.
+Then $dz$ is no longer arbitrary.
+
+!split
+===== Adding the Multiplier =====
+
+However, we can add to
+!bt
+\[
+df = \frac{\partial f}{\partial x}dx+\frac{\partial f}{\partial y}dy+\frac{\partial f}{\partial z}dz,
+\]
+!et
+a multiplum of $d\phi$, viz. $\lambda d\phi$, resulting in
+!bt
+\[
+df+\lambda d\phi = (\frac{\partial f}{\partial z}+\lambda
+\frac{\partial \phi}{\partial x})dx+(\frac{\partial f}{\partial y}+\lambda\frac{\partial \phi}{\partial y})dy+
+(\frac{\partial f}{\partial z}+\lambda\frac{\partial \phi}{\partial z})dz =0.
+\]
+!et
+Our multiplier is chosen so that
+!bt
+\[
+\frac{\partial f}{\partial z}+\lambda\frac{\partial \phi}{\partial z} =0.
+\]
+!et
+
+We need to remember that we took $dx$ and $dy$ to be arbitrary and thus we must have
+!bt
+\[
+\frac{\partial f}{\partial x}+\lambda\frac{\partial \phi}{\partial x} =0,
+\]
+!et
+and
+!bt
+\[
+\frac{\partial f}{\partial y}+\lambda\frac{\partial \phi}{\partial y} =0.
+\]
+!et
+When all these equations are satisfied, $df=0$. We have four unknowns, $x,y,z$ and
+$\lambda$. Actually we want only $x,y,z$, $\lambda$ needs not to be determined,
+it is therefore often called
+Lagrange's undetermined multiplier.
+If we have a set of constraints $\phi_k$ we have the equations
+!bt
+\[
+\frac{\partial f}{\partial x_i}+\sum_k\lambda_k\frac{\partial \phi_k}{\partial x_i} =0.
+\]
+!et
+
+!split
+===== Setting up the Problem =====
+In order to solve the above problem, we define the following Lagrangian function to be minimized
+!bt
+\[
+{\cal L}(\lambda,b,\bm{w})=\frac{1}{2}\bm{w}^T\bm{w}-\sum_{i=1}^n\lambda_i\left[y_i(\bm{w}^T\bm{x}_i+b)-1\right],
+\]
+!et
+where $\lambda_i$ is a so-called Lagrange multiplier subject to the condition $\lambda_i \geq 0$.
+
+Taking the derivatives with respect to $b$ and $\bm{w}$ we obtain
+!bt
+\[
+\frac{\partial {\cal L}}{\partial b} = -\sum_{i} \lambda_iy_i=0,
+\]
+!et
+and
+!bt
+\[
+\frac{\partial {\cal L}}{\partial \bm{w}} = 0 = \bm{w}-\sum_{i} \lambda_iy_i\bm{x}_i.
+\]
+!et
+Inserting these constraints into the equation for ${\cal L}$ we obtain
+!bt
+\[
+{\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\bm{x}_i^T\bm{x}_j,
+\]
+!et
+subject to the constraints $\lambda_i\geq 0$ and $\sum_i\lambda_iy_i=0$.
+We must in addition satisfy the "Karush-Kuhn-Tucker":"https://en.wikipedia.org/wiki/Karush%E2%80%93Kuhn%E2%80%93Tucker_conditions" (KKT) condition
+!bt
+\[
+\lambda_i\left[y_i(\bm{w}^T\bm{x}_i+b) -1\right] \hspace{0.1cm}\forall i.
+\]
+!et
+o If $\lambda_i > 0$, then $y_i(\bm{w}^T\bm{x}_i+b)=1$ and we say that $x_i$ is on the boundary.
+o If $y_i(\bm{w}^T\bm{x}_i+b)> 1$, we say $x_i$ is not on the boundary and we set $\lambda_i=0$.
+When $\lambda_i > 0$, the vectors $\bm{x}_i$ are called support vectors. They are the vectors closest to the line (or hyperplane) and define the margin $M$.
+
+!split
+===== The problem to solve =====
+
+We can rewrite
+!bt
+\[
+{\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\bm{x}_i^T\bm{x}_j,
+\]
+!et
+and its constraints in terms of a matrix-vector problem where we minimize w.r.t. $\lambda$ the following problem
+!bt
+\[
+\frac{1}{2} \bm{\lambda}^T\begin{bmatrix} y_1y_1\bm{x}_1^T\bm{x}_1 & y_1y_2\bm{x}_1^T\bm{x}_2 & \dots & \dots & y_1y_n\bm{x}_1^T\bm{x}_n \\
+y_2y_1\bm{x}_2^T\bm{x}_1 & y_2y_2\bm{x}_2^T\bm{x}_2 & \dots & \dots & y_1y_n\bm{x}_2^T\bm{x}_n \\
+\dots & \dots & \dots & \dots & \dots \\
+\dots & \dots & \dots & \dots & \dots \\
+y_ny_1\bm{x}_n^T\bm{x}_1 & y_ny_2\bm{x}_n^T\bm{x}_2 & \dots & \dots & y_ny_n\bm{x}_n^T\bm{x}_n \\
+\end{bmatrix}\bm{\lambda}-\mathbb{1}\bm{\lambda},
+\]
+!et
+subject to $\bm{y}^T\bm{\lambda}=0$. Here we defined the vectors $\bm{\lambda} =[\lambda_1,\lambda_2,\dots,\lambda_n]$ and
+$\bm{y}=[y_1,y_2,\dots,y_n]$.
+
+
+!split
+===== The last steps =====
+
+Solving the above problem, yields the values of $\lambda_i$.
+To find the coefficients of your hyperplane we need simply to compute
+!bt
+\[
+\bm{w}=\sum_{i} \lambda_iy_i\bm{x}_i.
+\]
+!et
+With our vector $\bm{w}$ we can in turn find the value of the intercept $b$ (here in two dimensions) via
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b)=1,
+\]
+!et
+resulting in
+!bt
+\[
+b = \frac{1}{y_i}-\bm{w}^T\bm{x}_i,
+\]
+!et
+or if we write it out in terms of the support vectors only, with $N_s$ being their number, we have
+!bt
+\[
+b = \frac{1}{N_s}\sum_{j\in N_s}\left(y_j-\sum_{i=1}^n\lambda_iy_i\bm{x}_i^T\bm{x}_j\right).
+\]
+!et
+With our hyperplane coefficients we can use our classifier to assign any observation by simply using
+!bt
+\[
+y_i = \mathrm{sign}(\bm{w}^T\bm{x}_i+b).
+\]
+!et
+Below we discuss how to find the optimal values of $\lambda_i$. Before we proceed however, we discuss now the so-called soft classifier.
+
+!split
+===== A soft classifier =====
+
+Till now, the margin is strictly defined by the support vectors. This defines what is called a hard classifier, that is the margins are well defined.
+
+Suppose now that classes overlap in feature space, as shown in the
+figure here. One way to deal with this problem before we define the
+so-called _kernel approach_, is to allow a kind of slack in the sense
+that we allow some points to be on the wrong side of the margin.
+
+We introduce thus the so-called _slack_ variables $\bm{\xi} =[\xi_1,x_2,\dots,x_n]$ and
+modify our previous equation
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b)=1,
+\]
+!et
+to
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b)=1-\xi_i,
+\]
+!et
+with the requirement $\xi_i\geq 0$. The total violation is now $\sum_i\xi$.
+The value $\xi_i$ in the constraint the last constraint corresponds to the amount by which the prediction
+$y_i(\bm{w}^T\bm{x}_i+b)=1$ is on the wrong side of its margin. Hence by bounding the sum $\sum_i \xi_i$,
+we bound the total amount by which predictions fall on the wrong side of their margins.
+
+Misclassifications occur when $\xi_i > 1$. Thus bounding the total sum by some value $C$ bounds in turn the total number of
+misclassifications.
+
+!split
+===== Soft optmization problem =====
+
+
+This has in turn the consequences that we change our optmization problem to finding the minimum of
+!bt
+\[
+{\cal L}=\frac{1}{2}\bm{w}^T\bm{w}-\sum_{i=1}^n\lambda_i\left[y_i(\bm{w}^T\bm{x}_i+b)-(1-\xi_)\right]+C\sum_{i=1}^n\xi_i-\sum_{i=1}^n\gamma_i\xi_i,
+\]
+!et
+subject to
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b)=1-\xi_i \hspace{0.1cm}\forall i,
+\]
+!et
+with the requirement $\xi_i\geq 0$.
+
+Taking the derivatives with respect to $b$ and $\bm{w}$ we obtain
+!bt
+\[
+\frac{\partial {\cal L}}{\partial b} = -\sum_{i} \lambda_iy_i=0,
+\]
+!et
+and
+!bt
+\[
+\frac{\partial {\cal L}}{\partial \bm{w}} = 0 = \bm{w}-\sum_{i} \lambda_iy_i\bm{x}_i,
+\]
+!et
+and
+!bt
+\[
+\lambda_i = C-\gamma_i \hspace{0.1cm}\forall i.
+\]
+!et
+Inserting these constraints into the equation for ${\cal L}$ we obtain the same equation as before
+!bt
+\[
+{\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\bm{x}_i^T\bm{x}_j,
+\]
+!et
+but now subject to the constraints $\lambda_i\geq 0$, $\sum_i\lambda_iy_i=0$ and $0\leq\lambda_i \leq C$.
+We must in addition satisfy the Karush-Kuhn-Tucker condition which now reads
+!bt
+\[
+\lambda_i\left[y_i(\bm{w}^T\bm{x}_i+b) -(1-\xi_)\right]=0 \hspace{0.1cm}\forall i,
+\]
+!et
+!bt
+\[
+\gamma_i\xi_i = 0,
+\]
+!et
+and
+!bt
+\[
+y_i(\bm{w}^T\bm{x}_i+b) -(1-\xi_) \geq 0 \hspace{0.1cm}\forall i.
+\]
+!et
+
+!split
+===== Kernels and non-linearity =====
+
+The cases we have studied till now, were all characterized by two classes
+with a close to linear separability. The classifiers we have described
+so far find linear boundaries in our input feature space. It is
+possible to make our procedure more flexible by exploring the feature
+space using other basis expansions such as higher-order polynomials,
+wavelets, splines etc.
+
+If our feature space is not easy to separate, as shown in the figure
+here, we can achieve a better separation by introducing more complex
+basis functions. The ideal would be, as shown in the next figure, to, via a specific transformation to
+obtain a separation between the classes which is almost linear.
+
+The change of basis, from $x\rightarrow z=\phi(x)$ leads to the same type of equations to be solved, except that
+we need to introduce for example a polynomial transformation to a two-dimensional training set.
+
+!bc pycod
+import numpy as np
+import os
+
+np.random.seed(42)
+
+# To plot pretty figures
+import matplotlib
+import matplotlib.pyplot as plt
+plt.rcParams['axes.labelsize'] = 14
+plt.rcParams['xtick.labelsize'] = 12
+plt.rcParams['ytick.labelsize'] = 12
+
+
+from sklearn.svm import SVC
+from sklearn import datasets
+
+
+
+X1D = np.linspace(-4, 4, 9).reshape(-1, 1)
+X2D = np.c_[X1D, X1D**2]
+y = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])
+
+plt.figure(figsize=(11, 4))
+
+plt.subplot(121)
+plt.grid(True, which='both')
+plt.axhline(y=0, color='k')
+plt.plot(X1D[:, 0][y==0], np.zeros(4), "bs")
+plt.plot(X1D[:, 0][y==1], np.zeros(5), "g^")
+plt.gca().get_yaxis().set_ticks([])
+plt.xlabel(r"$x_1$", fontsize=20)
+plt.axis([-4.5, 4.5, -0.2, 0.2])
+
+plt.subplot(122)
+plt.grid(True, which='both')
+plt.axhline(y=0, color='k')
+plt.axvline(x=0, color='k')
+plt.plot(X2D[:, 0][y==0], X2D[:, 1][y==0], "bs")
+plt.plot(X2D[:, 0][y==1], X2D[:, 1][y==1], "g^")
+plt.xlabel(r"$x_1$", fontsize=20)
+plt.ylabel(r"$x_2$", fontsize=20, rotation=0)
+plt.gca().get_yaxis().set_ticks([0, 4, 8, 12, 16])
+plt.plot([-4.5, 4.5], [6.5, 6.5], "r--", linewidth=3)
+plt.axis([-4.5, 4.5, -1, 17])
+plt.subplots_adjust(right=1)
+plt.show()
+
+!ec
+
+
+
+!split
+===== The equations =====
+
+Suppose we define a polynomial transformation of degree two only (we continue to live in a plane with $x_i$ and $y_i$ as variables)
+!bt
+\[
+z = \phi(x_i) =\left(x_i^2, y_i^2, \sqrt{2}x_iy_i\right).
+\]
+!et
+
+With our new basis, the equations we solved earlier are basically the same, that is we have now (without the slack option for simplicity)
+!bt
+\[
+{\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\bm{z}_i^T\bm{z}_j,
+\]
+!et
+subject to the constraints $\lambda_i\geq 0$, $\sum_i\lambda_iy_i=0$, and for the support vectors
+!bt
+\[
+y_i(\bm{w}^T\bm{z}_i+b)= 1 \hspace{0.1cm}\forall i,
+\]
+!et
+from which we also find $b$.
+To compute $\bm{z}_i^T\bm{z}_j$ we define the kernel $K(\bm{x}_i,\bm{x}_j)$ as
+!bt
+\[
+K(\bm{x}_i,\bm{x}_j)=\bm{z}_i^T\bm{z}_j= \phi(\bm{x}_i)^T\phi(\bm{x}_j).
+\]
+!et
+For the above example, the kernel reads
+!bt
+\[
+K(\bm{x}_i,\bm{x}_j)=[x_i^2, y_i^2, \sqrt{2}x_iy_i]^T\begin{bmatrix} x_j^2 \\ y_j^2 \\ \sqrt{2}x_jy_j \end{bmatrix}=x_i^2x_j^2+2x_ix_jy_iy_j+y_i^2y_j^2.
+\]
+!et
+
+We note that this is nothing but the dot product of the two original
+vectors $(\bm{x}_i^T\bm{x}_j)^2$. Instead of thus computing the
+product in the Lagrangian of $\bm{z}_i^T\bm{z}_j$ we simply compute
+the dot product $(\bm{x}_i^T\bm{x}_j)^2$.
+
+
+This leads to the so-called
+kernel trick and the result leads to the same as if we went through
+the trouble of performing the transformation
+$\phi(\bm{x}_i)^T\phi(\bm{x}_j)$ during the SVM calculations.
+
+
+!split
+===== The problem to solve =====
+Using our definition of the kernel We can rewrite again the Lagrangian
+!bt
+\[
+{\cal L}=\sum_i\lambda_i-\frac{1}{2}\sum_{ij}^n\lambda_i\lambda_jy_iy_j\bm{x}_i^T\bm{z}_j,
+\]
+!et
+subject to the constraints $\lambda_i\geq 0$, $\sum_i\lambda_iy_i=0$ in terms of a convex optimization problem
+!bt
+\[
+\frac{1}{2} \bm{\lambda}^T\begin{bmatrix} y_1y_1K(\bm{x}_1,\bm{x}_1) & y_1y_2K(\bm{x}_1,\bm{x}_2) & \dots & \dots & y_1y_nK(\bm{x}_1,\bm{x}_n) \\
+y_2y_1K(\bm{x}_2,\bm{x}_1) & y_2y_2(\bm{x}_2,\bm{x}_2) & \dots & \dots & y_1y_nK(\bm{x}_2,\bm{x}_n) \\
+\dots & \dots & \dots & \dots & \dots \\
+\dots & \dots & \dots & \dots & \dots \\
+y_ny_1K(\bm{x}_n,\bm{x}_1) & y_ny_2K(\bm{x}_n\bm{x}_2) & \dots & \dots & y_ny_nK(\bm{x}_n,\bm{x}_n) \\
+\end{bmatrix}\bm{\lambda}-\mathbb{1}\bm{\lambda},
+\]
+!et
+subject to $\bm{y}^T\bm{\lambda}=0$. Here we defined the vectors $\bm{\lambda} =[\lambda_1,\lambda_2,\dots,\lambda_n]$ and
+$\bm{y}=[y_1,y_2,\dots,y_n]$.
+If we add the slack constants this leads to the additional constraint $0\leq \lambda_i \leq C$.
+
+We can rewrite this (see the solutions below) in terms of a convex optimization problem of the type
+!bt
+\begin{align*}
+ &\mathrm{min}_{\lambda}\hspace{0.2cm} \frac{1}{2}\bm{\lambda}^T\bm{P}\bm{\lambda}+\bm{q}^T\bm{\lambda},\\ \nonumber
+ &\mathrm{subject\hspace{0.1cm}to} \hspace{0.2cm} \bm{G}\bm{\lambda} \preceq \bm{h} \hspace{0.2cm} \wedge \bm{A}\bm{\lambda}=f.
+\end{align*}
+!et
+Below we discuss how to solve these equations. Here we note that the matrix $\bm{P}$ has matrix elements $p_{ij}=y_iy_jK(\bm{x}_i,\bm{x}_j)$.
+Given a kernel $K$ and the targets $y_i$ this matrix is easy to set up. The constraint $\bm{y}^T\bm{\lambda}=0$ leads to $f=0$ and $\bm{A}=\bm{y}$. How to set up the matrix $\bm{G}$ is discussed later. Here note that the inequalities $0\leq \lambda_i \leq C$ can be split up into
+$0\leq \lambda_i$ and $\lambda_i \leq C$. These two inequalities define then the matrix $\bm{G}$ and the vector $\bm{h}$.
+
+
+!split
+===== Different kernels and Mercer's theorem =====
+
+There are several popular kernels being used. These are
+o Linear: $K(\bm{x},\bm{y})=\bm{x}^T\bm{y}$,
+o Polynomial: $K(\bm{x},\bm{y})=(\bm{x}^T\bm{y}+\gamma)^d$,
+o Gaussian Radial Basis Function: $K(\bm{x},\bm{y})=\exp{\left(-\gamma\vert\vert\bm{x}-\bm{y}\vert\vert^2\right)}$,
+o Tanh: $K(\bm{x},\bm{y})=\tanh{(\bm{x}^T\bm{y}+\gamma)}$,
+and many other ones.
+
+An important theorem for us is "Mercer's
+theorem":"https://en.wikipedia.org/wiki/Mercer%27s_theorem". The
+theorem states that if a kernel function $K$ is symmetric, continuous
+and leads to a positive semi-definite matrix $\bm{P}$ then there
+exists a function $\phi$ that maps $\bm{x}_i$ and $\bm{x}_j$ into
+another space (possibly with much higher dimensions) such that
+
+!bt
+\[
+K(\bm{x}_i,\bm{x}_j)=\phi(\bm{x}_i)^T\phi(\bm{x}_j).
+\]
+!et
+
+So you can use $K$ as a kernel since you know $\phi$ exists, even if
+you don’t know what $\phi$ is.
+
+Note that some frequently used kernels (such as the Sigmoid kernel)
+don’t respect all of Mercer’s conditions, yet they generally work well
+in practice.
+
+
+!split
+===== The moons example =====
+!bc pycod
+from __future__ import division, print_function, unicode_literals
+
+import numpy as np
+np.random.seed(42)
+
+import matplotlib
+import matplotlib.pyplot as plt
+plt.rcParams['axes.labelsize'] = 14
+plt.rcParams['xtick.labelsize'] = 12
+plt.rcParams['ytick.labelsize'] = 12
+
+
+from sklearn.svm import SVC
+from sklearn import datasets
+
+
+
+from sklearn.pipeline import Pipeline
+from sklearn.preprocessing import StandardScaler
+from sklearn.svm import LinearSVC
+
+
+from sklearn.datasets import make_moons
+X, y = make_moons(n_samples=100, noise=0.15, random_state=42)
+
+def plot_dataset(X, y, axes):
+ plt.plot(X[:, 0][y==0], X[:, 1][y==0], "bs")
+ plt.plot(X[:, 0][y==1], X[:, 1][y==1], "g^")
+ plt.axis(axes)
+ plt.grid(True, which='both')
+ plt.xlabel(r"$x_1$", fontsize=20)
+ plt.ylabel(r"$x_2$", fontsize=20, rotation=0)
+
+plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
+plt.show()
+
+from sklearn.datasets import make_moons
+from sklearn.pipeline import Pipeline
+from sklearn.preprocessing import PolynomialFeatures
+
+polynomial_svm_clf = Pipeline([
+ ("poly_features", PolynomialFeatures(degree=3)),
+ ("scaler", StandardScaler()),
+ ("svm_clf", LinearSVC(C=10, loss="hinge", random_state=42))
+ ])
+
+polynomial_svm_clf.fit(X, y)
+
+def plot_predictions(clf, axes):
+ x0s = np.linspace(axes[0], axes[1], 100)
+ x1s = np.linspace(axes[2], axes[3], 100)
+ x0, x1 = np.meshgrid(x0s, x1s)
+ X = np.c_[x0.ravel(), x1.ravel()]
+ y_pred = clf.predict(X).reshape(x0.shape)
+ y_decision = clf.decision_function(X).reshape(x0.shape)
+ plt.contourf(x0, x1, y_pred, cmap=plt.cm.brg, alpha=0.2)
+ plt.contourf(x0, x1, y_decision, cmap=plt.cm.brg, alpha=0.1)
+
+plot_predictions(polynomial_svm_clf, [-1.5, 2.5, -1, 1.5])
+plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
+
+plt.show()
+
+
+from sklearn.svm import SVC
+
+poly_kernel_svm_clf = Pipeline([
+ ("scaler", StandardScaler()),
+ ("svm_clf", SVC(kernel="poly", degree=3, coef0=1, C=5))
+ ])
+poly_kernel_svm_clf.fit(X, y)
+
+poly100_kernel_svm_clf = Pipeline([
+ ("scaler", StandardScaler()),
+ ("svm_clf", SVC(kernel="poly", degree=10, coef0=100, C=5))
+ ])
+poly100_kernel_svm_clf.fit(X, y)
+
+plt.figure(figsize=(11, 4))
+
+plt.subplot(121)
+plot_predictions(poly_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])
+plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
+plt.title(r"$d=3, r=1, C=5$", fontsize=18)
+
+plt.subplot(122)
+plot_predictions(poly100_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])
+plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
+plt.title(r"$d=10, r=100, C=5$", fontsize=18)
+
+plt.show()
+
+def gaussian_rbf(x, landmark, gamma):
+ return np.exp(-gamma * np.linalg.norm(x - landmark, axis=1)**2)
+
+gamma = 0.3
+
+x1s = np.linspace(-4.5, 4.5, 200).reshape(-1, 1)
+x2s = gaussian_rbf(x1s, -2, gamma)
+x3s = gaussian_rbf(x1s, 1, gamma)
+
+XK = np.c_[gaussian_rbf(X1D, -2, gamma), gaussian_rbf(X1D, 1, gamma)]
+yk = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])
+
+plt.figure(figsize=(11, 4))
+
+plt.subplot(121)
+plt.grid(True, which='both')
+plt.axhline(y=0, color='k')
+plt.scatter(x=[-2, 1], y=[0, 0], s=150, alpha=0.5, c="red")
+plt.plot(X1D[:, 0][yk==0], np.zeros(4), "bs")
+plt.plot(X1D[:, 0][yk==1], np.zeros(5), "g^")
+plt.plot(x1s, x2s, "g--")
+plt.plot(x1s, x3s, "b:")
+plt.gca().get_yaxis().set_ticks([0, 0.25, 0.5, 0.75, 1])
+plt.xlabel(r"$x_1$", fontsize=20)
+plt.ylabel(r"Similarity", fontsize=14)
+plt.annotate(r'$\mathbf{x}$',
+ xy=(X1D[3, 0], 0),
+ xytext=(-0.5, 0.20),
+ ha="center",
+ arrowprops=dict(facecolor='black', shrink=0.1),
+ fontsize=18,
+ )
+plt.text(-2, 0.9, "$x_2$", ha="center", fontsize=20)
+plt.text(1, 0.9, "$x_3$", ha="center", fontsize=20)
+plt.axis([-4.5, 4.5, -0.1, 1.1])
+
+plt.subplot(122)
+plt.grid(True, which='both')
+plt.axhline(y=0, color='k')
+plt.axvline(x=0, color='k')
+plt.plot(XK[:, 0][yk==0], XK[:, 1][yk==0], "bs")
+plt.plot(XK[:, 0][yk==1], XK[:, 1][yk==1], "g^")
+plt.xlabel(r"$x_2$", fontsize=20)
+plt.ylabel(r"$x_3$ ", fontsize=20, rotation=0)
+plt.annotate(r'$\phi\left(\mathbf{x}\right)$',
+ xy=(XK[3, 0], XK[3, 1]),
+ xytext=(0.65, 0.50),
+ ha="center",
+ arrowprops=dict(facecolor='black', shrink=0.1),
+ fontsize=18,
+ )
+plt.plot([-0.1, 1.1], [0.57, -0.1], "r--", linewidth=3)
+plt.axis([-0.1, 1.1, -0.1, 1.1])
+
+plt.subplots_adjust(right=1)
+
+plt.show()
+
+
+x1_example = X1D[3, 0]
+for landmark in (-2, 1):
+ k = gaussian_rbf(np.array([[x1_example]]), np.array([[landmark]]), gamma)
+ print("Phi({}, {}) = {}".format(x1_example, landmark, k))
+
+rbf_kernel_svm_clf = Pipeline([
+ ("scaler", StandardScaler()),
+ ("svm_clf", SVC(kernel="rbf", gamma=5, C=0.001))
+ ])
+rbf_kernel_svm_clf.fit(X, y)
+
+
+from sklearn.svm import SVC
+
+gamma1, gamma2 = 0.1, 5
+C1, C2 = 0.001, 1000
+hyperparams = (gamma1, C1), (gamma1, C2), (gamma2, C1), (gamma2, C2)
+
+svm_clfs = []
+for gamma, C in hyperparams:
+ rbf_kernel_svm_clf = Pipeline([
+ ("scaler", StandardScaler()),
+ ("svm_clf", SVC(kernel="rbf", gamma=gamma, C=C))
+ ])
+ rbf_kernel_svm_clf.fit(X, y)
+ svm_clfs.append(rbf_kernel_svm_clf)
+
+plt.figure(figsize=(11, 7))
+
+for i, svm_clf in enumerate(svm_clfs):
+ plt.subplot(221 + i)
+ plot_predictions(svm_clf, [-1.5, 2.5, -1, 1.5])
+ plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])
+ gamma, C = hyperparams[i]
+ plt.title(r"$\gamma = {}, C = {}$".format(gamma, C), fontsize=16)
+
+plt.show()
+
+!ec
+
+
+
+!split
+===== Mathematical optimization of convex functions =====
+
+A mathematical (quadratic) optimization problem, or just optimization problem, has the form
+!bt
+\begin{align*}
+ &\mathrm{min}_{\lambda}\hspace{0.2cm} \frac{1}{2}\bm{\lambda}^T\bm{P}\bm{\lambda}+\bm{q}^T\bm{\lambda},\\ \nonumber
+ &\mathrm{subject\hspace{0.1cm}to} \hspace{0.2cm} \bm{G}\bm{\lambda} \preceq \bm{h} \wedge \bm{A}\bm{\lambda}=f.
+\end{align*}
+!et
+subject to some constraints for say a selected set $i=1,2,\dots, n$.
+In our case we are optimizing with respect to the Lagrangian multipliers $\lambda_i$, and the
+vector $\bm{\lambda}=[\lambda_1, \lambda_2,\dots, \lambda_n]$ is the optimization variable we are dealing with.
+
+In our case we are particularly interested in a class of optimization problems called convex optmization problems.
+In our discussion on gradient descent methods we discussed at length the definition of a convex function.
+
+Convex optimization problems play a central role in applied mathematics and we recommend strongly "Boyd and Vandenberghe's text on the topics":"http://web.stanford.edu/~boyd/cvxbook/".
+
+
+
+!split
+===== How do we solve these problems? =====
+
+If we use Python as programming language and wish to venture beyond
+_scikit-learn_, _tensorflow_ and similar software which makes our
+lives so much easier, we need to dive into the wonderful world of
+quadratic programming. We can, if we wish, solve the minimization
+problem using say standard gradient methods or conjugate gradient
+methods. However, these methods tend to exhibit a rather slow
+converge. So, welcome to the promised land of quadratic programming.
+
+The functions we need are contained in the quadratic programming package _CVXOPT_ and we need to import it together with _numpy_ as
+
+!bc pycod
+import numpy
+import cvxopt
+!ec
+
+This will make our life much easier. You don't need t write your own optimizer.
+
+
+!split
+===== A simple example =====
+
+We remind ourselves about the general problem we want to solve
+!bt
+\begin{align*}
+ &\mathrm{min}_{x}\hspace{0.2cm} \frac{1}{2}\bm{x}^T\bm{P}\bm{x}+\bm{q}^T\bm{x},\\ \nonumber
+ &\mathrm{subject\hspace{0.1cm} to} \hspace{0.2cm} \bm{G}\bm{x} \preceq \bm{h} \wedge \bm{A}\bm{x}=f.
+\end{align*}
+!et
+
+Let us show how to perform the optmization using a simple case. Assume we want to optimize the following problem
+!bt
+\begin{align*}
+ &\mathrm{min}_{x}\hspace{0.2cm} \frac{1}{2}x^2+5x+3y \\ \nonumber
+ &\mathrm{subject to} \\ \nonumber
+ &x, y \geq 0 \\ \nonumber
+ &x+3y \geq 15 \\ \nonumber
+ &2x+5y \leq 100 \\ \nonumber
+ &3x+4y \leq 80. \\ \nonumber
+\end{align*}
+!et
+The minimization problem can be rewritten in terms of vectors and matrices as (with $x$ and $y$ being the unknowns)
+!bt
+\[
+\frac{1}{2}\begin{bmatrix} x\\ y \end{bmatrix}^T \begin{bmatrix} 1 & 0\\ 0 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} + \begin{bmatrix}3\\ 4 \end{bmatrix}^T \begin{bmatrix}x \\ y \end{bmatrix}.
+\]
+!et
+Similarly, we can now set up the inequalities (we need to change $\geq$ to $\leq$ by multiplying with $-1$ on bot sides) as the following matrix-vector equation
+!bt
+\[
+\begin{bmatrix} -1 & 0 \\ 0 & -1 \\ -1 & -3 \\ 2 & 5 \\ 3 & 4\end{bmatrix}\begin{bmatrix} x \\ y\end{bmatrix} \preceq \begin{bmatrix}0 \\ 0\\ -15 \\ 100 \\ 80\end{bmatrix}.
+\]
+!et
+We have collapsed all the inequalities into a single matrix $\bm{G}$. We see also that our matrix
+!bt
+\[
+\bm{P} =\begin{bmatrix} 1 & 0\\ 0 & 0 \end{bmatrix}
+\]
+!et
+is clearly positive semi-definite (all eigenvalues larger or equal zero).
+Finally, the vector $\bm{h}$ is defined as
+!bt
+\[
+\bm{h} = \begin{bmatrix}0 \\ 0\\ -15 \\ 100 \\ 80\end{bmatrix}.
+\]
+!et
+
+
+Since we don't have any equalities the matrix $\bm{A}$ is set to zero
+The following code solves the equations for us
+!bc pycod
+# Import the necessary packages
+import numpy
+from cvxopt import matrix
+from cvxopt import solvers
+P = matrix(numpy.diag([1,0]), tc=’d’)
+q = matrix(numpy.array([3,4]), tc=’d’)
+G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc=’d’)
+h = matrix(numpy.array([0,0,-15,100,80]), tc=’d’)
+# Construct the QP, invoke solver
+sol = solvers.qp(P,q,G,h)
+# Extract optimal value and solution
+sol[’x’]
+sol[’primal objective’]
+!ec
+
+!split
+===== Back to the more realistic cases =====
+
+We are now ready to return to our setup of the optmization problem for a more realistic case. Introducing the _slack_ parameter $C$ we have
+!bt
+\[
+\frac{1}{2} \bm{\lambda}^T\begin{bmatrix} y_1y_1K(\bm{x}_1,\bm{x}_1) & y_1y_2K(\bm{x}_1,\bm{x}_2) & \dots & \dots & y_1y_nK(\bm{x}_1,\bm{x}_n) \\
+y_2y_1K(\bm{x}_2,\bm{x}_1) & y_2y_2K(\bm{x}_2,\bm{x}_2) & \dots & \dots & y_1y_nK(\bm{x}_2,\bm{x}_n) \\
+\dots & \dots & \dots & \dots & \dots \\
+\dots & \dots & \dots & \dots & \dots \\
+y_ny_1K(\bm{x}_n,\bm{x}_1) & y_ny_2K(\bm{x}_n\bm{x}_2) & \dots & \dots & y_ny_nK(\bm{x}_n,\bm{x}_n) \\
+\end{bmatrix}\bm{\lambda}-\mathbb{I}\bm{\lambda},
+\]
+!et
+subject to $\bm{y}^T\bm{\lambda}=0$. Here we defined the vectors $\bm{\lambda} =[\lambda_1,\lambda_2,\dots,\lambda_n]$ and
+$\bm{y}=[y_1,y_2,\dots,y_n]$.
+With the slack constants this leads to the additional constraint $0\leq \lambda_i \leq C$.
+
+_code will be added_
+
+