# f10 Stat841 digest

## Contents

- 1 Classification - September 21, 2010
- 2 Linear and Quadratic Discriminant Analysis cont'd - September 23, 2010
- 3 Fisher's (Linear) Discriminant Analysis (FDA) - Two Class Problem - October 5, 2010
- 4 Fisher's (Linear) Discriminant Analysis (FDA) - Multi-Class Problem - October 7, 2010
- 5 Linear and Logistic Regression - October 12, 2010
- 6 Logistic Regression Cont. - October 14, 2010
- 7 Multi-Class Logistic Regression & Perceptron - October 19, 2010
- 8 Perceptron Learning Algorithm and Feed Forward Neural Networks - October 21, 2010
- 9 Complexity Control - October 26, 2010
- 10 Leave-One-Out Cross-Validation and Radial Basis Function Networks - October 28, 2010
- 11 Model Selection (SURE) for RBF Network - November 2nd, 2010
- 12 Regularization Weight Decay - November 4, 2010

## Classification - September 21, 2010

- Classification is an area of supervised learning that systematically assigns unlabeled novel data to their label through the characteristics and attributes obtained from observation.
- Classification is the prediction of a discrete random variable [math] \mathcal{Y} [/math] from another random variable [math] \mathcal{X} [/math], where [math] \mathcal{Y} [/math] represents the label assigned to a new data input and [math] \mathcal{X} [/math] represents the known feature values of the input. The classification rule used by a classifier has the form [math]\,h: \mathcal{X} \mapsto \mathcal{Y} [/math].
- True error rate is the probability that the classification rule [math]\,h[/math] does not correctly classify any data input. Empirical error rate is the frequency where the classification rule [math]\,h[/math] does not correctly classify any data input in the training set. In experimental tasks true error cannot be measured and as a result the empirical error rate is used as its estimate.
- Bayes Classifier is a probabilistic classifier by applying Bayes Theorem with strong (naive) independence assumptions. It has the advantage of requiring small training data to estimate the parameters needed for classification. Under this classifier an input [math]\,x[/math] is classified to class [math]\,y[/math] where the posterior probability for [math]\,y[/math] is the largest for input [math]\,x[/math].
- Bayes Classification Rule Optimality Theorem states that Bayes classifier is the optimal classifier, in other words the true error rate of the Bayes classification rule will always be smaller or equal to any other classification rule

- Bayes Decision Boundary is the hyperplane boundary that separates the two classes [math]\,m, n[/math] obtained by setting the posterior probability for the two classes equal, [math]\,D(h)=\{x: P(Y=m|X=x)=P(Y=n|X=x)\}[/math].
- Linear Discriminant Analysis (LDA) for the Bayes classifier decision boundary between two classes makes the assumption that both are generated from Gaussian distribution and have the same covariance matrix.
- PCA is an appropriate method when you have obtained measures on a number of observed variables and wish to develop a smaller number of artificial variables (called principal components) that will account for most of the variance in the observed variables. This is a powerful technique for dimensionally reduction. It has applications in data visualization, data mining, reducing the dimensionality of a data set and etc. It is mostly used for data analysis and for making predictive models.

## Linear and Quadratic Discriminant Analysis cont'd - September 23, 2010

In the second lecture, Professor Ali Ghodsi recapitulates that by calculating the class posteriors [math]\Pr(Y=k|X=x)[/math] we have optimal classification. He also shows that by assuming that the classes have common covariance matrix [math]\Sigma_{k}=\Sigma \forall k [/math], the decision boundary between classes [math]k[/math] and [math]l[/math] is linear (LDA). However, if we do not assume same covariance between the two classes, the decision boundary is a quadratic function (QDA).

The following MATLAB examples can be used to demonstrated LDA and QDA.

### Principle Component Analysis -September 30, 2010

Principal component analysis (PCA) is a dimensionality-reduction method invented by Karl Pearson in 1901 [1]. Depending on where this methodology is applied, other common names of PCA include the Karhunen–Loève transform (KLT) , the Hotelling transform, and the proper orthogonal decomposition (POD). PCA is the simplist eigenvector-based multivariate analysis. It reduces the dimensionality of the data by revealing the internal structure of the data in a way that best explains the variance in the data. To this end, PCA works by using a user-defined number of the most important directions of variation (dimensions or **principal components**) of the data to project the data onto these directions so as to produce a lower-dimensional representation of the original data. The resulting lower-dimensional representation of our data is usually much easier to visualize and it also exhibits the most informative aspects (dimensions) of our data whilst capturing as much of the variation exhibited by our data as it possibly could.

## Fisher's (Linear) Discriminant Analysis (FDA) - Two Class Problem - October 5, 2010

This lecture introduces Fisher's linear discrimination analysis (FDA), which is a supervised dimensionality reduction method. FDA does not assume any distribution of the data and it works by reducing the dimensionality of the data by projecting the data on a line. That is, given d-dimensional data FDA project it to one-dimensional representation by [math]z = \underline{w}^T \underline{x} [/math] where [math]x \in \mathbb{R}^{d}[/math] and [math] \underline{w} = \begin{bmatrix}w_1 \\ \vdots \\w_d \end{bmatrix} _{d \times 1}[/math]

FDA derives a set of feature vectors by which high-dimensional data can be projected onto a low-dimensional feature space in the sense of maximizing class separability. Furthermore, the lecture clarifies a set of FDA basic concepts like Fisher’s ratio, ratio of between-class scatter matrix to within-class scatter matrix. It also discusses the goals specified by Fisher for his analysis then proceeding by mathematical formulation of these goals.

## Fisher's (Linear) Discriminant Analysis (FDA) - Multi-Class Problem - October 7, 2010

This lecture describes a generalization of Fisher's discriminant analysis to more than 2 classes. For the multi-class, or [math]k[/math]-class problem, we are trying to find a projection from a [math]d[/math]-dimensional space to a [math] (k-1)[/math]-dimensional space. Recall that for the [math]2[/math]-class problem, the objective function was [math]\displaystyle \max \frac{(w^Ts_Bw)}{(w^Ts_ww)}[/math] . In the [math]k[/math]-class problem, [math]\mathbf{W}[/math] is a [math]d\times (k-1)[/math] transformation matrix, [math]\mathbf{W} =[\mathbf{w}_{1}, \mathbf{w}_{2},..., \mathbf{w}_{k-1}][/math], and the objective function becomes [math]\displaystyle \max \frac{Tr[\mathbf{W}^{T}\mathbf{S}_{B}\mathbf{W}]}{Tr[\mathbf{W}^{T}\mathbf{S}_{W}\mathbf{W}]}[/math]

As in the [math]2[/math]-class case, this is also a generalized eigenvalue problem, and the solution can be computed as the first [math](k-1)[/math] eigenvectors of [math]\mathbf{S}_{W}^{-1}\mathbf{S}_{B},[/math] i.e. [math]\mathbf{S}_{W}^{-1}\mathbf{S}_{B}\mathbf{w}_{i} =\lambda_{i}\mathbf{w}_{i}[/math].

## Linear and Logistic Regression - October 12, 2010

In this Lecture, Prof Ali Ghodsi reviews the LDA as a dimensionality reduction method and introduces 2 models for regression, linear and logistic regression.

Regression analysis is a general statistical technique for modeling and analyzing how a dependent variable changes according to changes in independent variables. In classification, we are interested in how a label, [math]\,y[/math], changes according to changes in [math]\,X[/math].

General information on linear regression can be found at the University of South Florida and this MIT lecture.

## Logistic Regression Cont. - October 14, 2010

Traditionally logistic regression parameters are estimated using maximum likelihood. However , other optimization techniques may be used as well.

Since there is no closed form solution for finding the zero of the first derivative of the log likelihood the Newton Raphson algorithm is used. Since the problem is convex Newtons is guaranteed to converge to a global optimum.

Logistic regression requires less parameters than LDA or QDA and is therefore more favorable for high dimensional data.

## Multi-Class Logistic Regression & Perceptron - October 19, 2010

In this lecture, the topic of logistic regression was finalized by covering the multi-class logistic regression and new topic of perceptron has started. Perceptron is a linear classifier for two-class problems. The main goal of perceptron is to minimize the distances between the misclassified points and the decision boundary. This will be continued in the following lectures.

## Perceptron Learning Algorithm and Feed Forward Neural Networks - October 21, 2010

In this lecture, we finalize our discussion of the Perceptron by reviewing its learning algorithm, which is based on gradient descent. We then begin the next topic, Neural Networks (NN), and we focus on a NN that is useful for classification: the Feed Forward Neural Network (FFNN). The mathematical model for the FFNN is shown, and we review one of its most popular learning algorithms: Back-Propagation.

To open the Neural Network discussion, we present a formulation of the universal function approximator. The mathematical model for Neural Networks is then built upon this formulation. We also discuss the trade-off between training error and testing error -- known as the generalization problem -- under the universal function approximator section.

## Complexity Control - October 26, 2010

Selecting the model structure with an appropriate complexity is a standard problem in pattern recognition and machine learning. Systems with the optimal complexity have a good generalization to unseen data.

A wide range of techniques may be used which alter the system complexity. In this lecture, we introduce the topic of Model Selection, also known as Complexity Control. This involves choosing the model that will best classify any given data by minimizing test error rates or by regularization.

The two problems that we wish to avoid when choosing a model are over-fitting and under-fitting. We present over & under-fitting concepts with an example to illustrate how we choose a good classifier and how to avoid over-fitting.

Moreover, Cross-validation has been introduced during the leacture which is a method for estimating generalization error based on "resampling" (Weiss and Kulikowski 1991; Efron and Tibshirani 1993; Hjorth 1994; Plutowski, Sakata, and White 1994; Shao and Tu 1995). The resulting estimates of generalization error are often used for choosing among various models. Also, it can be used for model selection by choosing one of several models that has the smallest estimated generalization error. Finally, We discuss two methods to estimate the true error rate: simple cross-validation and K-fold cross-validation. Both of these methods involve splitting the data into a training set to train the model and a validation set to compute the test error rate.

## Leave-One-Out Cross-Validation and Radial Basis Function Networks - October 28, 2010

In this lecture, we finalize the discussion of cross-validation with leave-one-out cross-validation and begin regression by discussing Radial Basis Function (RBF) Networks. Leave-one-out is similar to k-fold cross-validation, but separates each single element. Under linear model conditions, leave-one-out cross-validation performs well asymptotically.

RBF networks are similar to neural networks. There is one hidden layer with each node being a basis function. Between the hidden layer and output layer there are weights. Noise in the actual model creates issues in model selection, so we consider the expected squared difference between actual and estimated outputs.

{{

Template:namespace detect

| type = style
| image =
| imageright =
| style =
| textstyle =
| text = This article **may require cleanup to meet Wikicoursenote's quality standards.** The specific problem is: *It is worth to note that any function can be expanded in terms of RBF functions since they are a orthogonal basis so RBF network has the property to interpolate any function that we have in our problems*. Please improve this article if you can. *(November 2010)*
| small =
| smallimage =
| smallimageright =
| smalltext =
}}

- Radial Basis Function (RBF) networks is an artificial neural network consisting of an output layer, a hidden layer, and weights from the hidden layer to the output; it has a closed form solution and can be solved without back-propagation.
- During the model selection process, the complexity (the number of neurons in the hidden layer), the basis function, and the basis function parameters are estimated.
- A common basis function is the RBF (or Gaussian) function;
- Function parameters can be estimated by clustering the data into as many clusters as there are nodes and using the sample mean and variance
- The complexity of the model is determined during the training process (methods like K-Fold Cross-Validation or Leave-One-Out Cross Validation can be used)

## Model Selection (SURE) for RBF Network - November 2nd, 2010

Model selection is the task of selecting a model of optimal complexity for a given set of data. Learning a radial basis function network from data is a parameter estimation problem. A model is selected that has parameters associated with the best observed performance on the training data. Squared error is used as the performance index.

Some basic assumptions are taken initially. Such as:

- [math]\hat f(X)[/math] denote the
*prediction/estimated model*, which is generated from a training data set [math]\displaystyle D = \{(x_i, y_i)\}^n_{i=1}[/math]. - [math]\displaystyle MSE=E[(\hat f-f)^2][/math] denote the
*mean squared error*, where [math]\hat f(X)[/math] is the estimated model and [math]\displaystyle f(X)[/math] is the true model.

We have made two assumptions about the observations:

- [math]\displaystyle \epsilon[/math] is additive Gaussian noise, and
- [math]\displaystyle \epsilon_i [/math] ~ [math]\displaystyle N(0,\sigma^2)[/math].

Then we estimated

- [math]\hat f[/math] from the training data set [math]D=\{(x_i,y_i)\}^n_{i=1}[/math] and
- [math]\displaystyle E[(\hat y_i-y_i)^2 ]=E[(\hat f_i-f_i)^2]+\sigma^2-2E[\epsilon_i(\hat f_i-f_i)][/math]

We have taken the last term [math]\displaystyle 2E[\epsilon_i(\hat f_i-f_i)][/math] of mean squared error for two cases as follows:

### Case 1

New data point has been introduced to the estimated model, i.e. [math](x_i,y_i)\not\in D[/math]; this new point belongs to the testing/validation data set [math]V=\{(x_i,y_i)\}^m_{i=1}[/math].

We found that in this case [math]\displaystyle err=Err+m\sigma^2[/math].

### Case 2

In this case we do not use new data points to assess the performance of the estimated model, we suppose [math](x_i,y_i)\in D[/math]. Then by applying Stein's Lemma, we obtained equation for one data point: [math]\displaystyle E[(\hat y_i-y_i)^2 ]=E[(\hat f_i-f_i)^2]+\sigma^2-2\sigma^2E\left[\frac {\partial \hat f}{\partial y_i}\right][/math] or

[math]\displaystyle err=Err+n\sigma^2-2\sigma^2\sum_{i=1}^n \frac {\partial \hat f}{\partial y_i}[/math] known as Stein's unbiased risk estimate (SURE).

### SURE for RBF Network

Finally based on SURE, we derived

[math]\displaystyle Err=err-n\sigma^2+2\sigma^2m[/math]

for RBF Network with no intercept.

## Regularization Weight Decay - November 4, 2010

### Regularization

Regularization is used to prevent overfitting. We add a penalty function to training error such that when the complexity increases, the penalty function increases as well.

Regularization methods are also used for model selection, well-known model selection techniques include AIC, BIC, and MDL.

### Weight Decay

Weight decay adds a penalty term to the error function. The usual penalty is the sum of squared weights times a decay constant.

[math]\,REG = err + \rho \sum_{ij}u_{ij}^2[/math]