Proteomics and Variable Selection

Similar documents
Boosting. Ryan Tibshirani Data Mining: / April Optional reading: ISL 8.2, ESL , 10.7, 10.13

Applied Machine Learning Annalisa Marsico

A Survey of L 1. Regression. Céline Cunen, 20/10/2014. Vidaurre, Bielza and Larranaga (2013)

Machine Learning for OR & FE

CMSC858P Supervised Learning Methods

Data Analysis and Machine Learning Lecture 12: Multicollinearity, Bias-Variance Trade-off, Cross-validation and Shrinkage Methods.

Prediction & Feature Selection in GLM

Linear Regression. Aarti Singh. Machine Learning / Sept 27, 2010

Statistical aspects of prediction models with high-dimensional data

MS&E 226: Small Data

MS-C1620 Statistical inference

A Modern Look at Classical Multivariate Techniques

Lecture 6: Methods for high-dimensional problems

MS&E 226: Small Data

Linear Models in Machine Learning

Machine Learning. Regression basics. Marc Toussaint University of Stuttgart Summer 2015

Pattern Recognition and Machine Learning

Data Mining und Maschinelles Lernen

High-Dimensional Statistical Learning: Introduction

Final Overview. Introduction to ML. Marek Petrik 4/25/2017

Bayesian Grouped Horseshoe Regression with Application to Additive Models

Support Vector Machines for Classification: A Statistical Portrait

Chris Fraley and Daniel Percival. August 22, 2008, revised May 14, 2010

Linear Decision Boundaries

Chap 1. Overview of Statistical Learning (HTF, , 2.9) Yongdai Kim Seoul National University

Recap from previous lecture

Introduction to Machine Learning

Shrinkage Methods: Ridge and Lasso

Overview. Probabilistic Interpretation of Linear Regression Maximum Likelihood Estimation Bayesian Estimation MAP Estimation

10701/15781 Machine Learning, Spring 2007: Homework 2

Lecture 14: Shrinkage

Ensemble Methods. Charles Sutton Data Mining and Exploration Spring Friday, 27 January 12

Machine Learning - MT & 5. Basis Expansion, Regularization, Validation

Compressed Sensing in Cancer Biology? (A Work in Progress)

Regularization Paths

Association studies and regression

Multivariate statistical methods and data mining in particle physics

Machine learning comes from Bayesian decision theory in statistics. There we want to minimize the expected value of the loss function.

High-dimensional regression

CLUe Training An Introduction to Machine Learning in R with an example from handwritten digit recognition

Sparse Linear Models (10/7/13)

STAT 535 Lecture 5 November, 2018 Brief overview of Model Selection and Regularization c Marina Meilă

Bayesian linear regression

Mark your answers ON THE EXAM ITSELF. If you are not sure of your answer you may wish to provide a brief explanation.

Linear Regression (9/11/13)

Lecture 3: Statistical Decision Theory (Part II)

Logistic Regression. COMP 527 Danushka Bollegala

Math for Machine Learning Open Doors to Data Science and Artificial Intelligence. Richard Han

ECE521 week 3: 23/26 January 2017

Fast Regularization Paths via Coordinate Descent

The prediction of house price

CPSC 340: Machine Learning and Data Mining. MLE and MAP Fall 2017

Coordinate descent. Geoff Gordon & Ryan Tibshirani Optimization /

STA 4273H: Statistical Machine Learning

Linear Models for Regression

New Statistical Methods That Improve on MLE and GLM Including for Reserve Modeling GARY G VENTER

Probabilistic classification CE-717: Machine Learning Sharif University of Technology. M. Soleymani Fall 2016

COS 424: Interacting with Data

Classification. Classification is similar to regression in that the goal is to use covariates to predict on outcome.

Machine Learning Linear Regression. Prof. Matteo Matteucci

Lecture 2 Machine Learning Review

SVAN 2016 Mini Course: Stochastic Convex Optimization Methods in Machine Learning

LogitBoost with Trees Applied to the WCCI 2006 Performance Prediction Challenge Datasets

Generative Clustering, Topic Modeling, & Bayesian Inference

Tufts COMP 135: Introduction to Machine Learning

Kernel Logistic Regression and the Import Vector Machine

MS&E 226. In-Class Midterm Examination Solutions Small Data October 20, 2015

TDT4173 Machine Learning

Sparse regression. Optimization-Based Data Analysis. Carlos Fernandez-Granda

MS&E 226: Small Data

ISyE 691 Data mining and analytics

Regression Shrinkage and Selection via the Lasso

Homework 1 Solutions Probability, Maximum Likelihood Estimation (MLE), Bayes Rule, knn

Building a Prognostic Biomarker

EXAM IN STATISTICAL MACHINE LEARNING STATISTISK MASKININLÄRNING

Linear Model Selection and Regularization

CPSC 340: Machine Learning and Data Mining. Gradient Descent Fall 2016

Lecture Data Science

Nonparametric Bayesian Methods (Gaussian Processes)

COMS 4771 Regression. Nakul Verma

Machine Learning Linear Models

Bootstrap, Jackknife and other resampling methods

How to evaluate credit scorecards - and why using the Gini coefficient has cost you money

High-dimensional Ordinary Least-squares Projection for Screening Variables

High-dimensional regression modeling

COMP 551 Applied Machine Learning Lecture 3: Linear regression (cont d)

Linear regression methods

6.036 midterm review. Wednesday, March 18, 15

Chapter 3. Linear Models for Regression

MSA220/MVE440 Statistical Learning for Big Data

Least Absolute Shrinkage is Equivalent to Quadratic Penalization

Introduction to Machine Learning Midterm, Tues April 8

COMS 4771 Introduction to Machine Learning. James McInerney Adapted from slides by Nakul Verma

A Bias Correction for the Minimum Error Rate in Cross-validation

CS6220: DATA MINING TECHNIQUES

Data Mining Stat 588

CART Classification and Regression Trees Trees can be viewed as basis expansions of simple functions. f(x) = c m 1(x R m )

The Bayes classifier

Cheng Soon Ong & Christian Walder. Canberra February June 2018

Biostatistics-Lecture 16 Model Selection. Ruibin Xi Peking University School of Mathematical Sciences

Transcription:

Proteomics and Variable Selection p. 1/55 Proteomics and Variable Selection Alex Lewin With thanks to Paul Kirk for some graphs Department of Epidemiology and Biostatistics, School of Public Health, Imperial College a.m.lewin@imperial.ac.uk

Proteomics and Variable Selection p. 2/55 Overview Introduction to Proteomics and an Application Introduction to Classification and Regression Linear models Linear regression: least squares Penalised linear regression Classification: logistic regression Prediction error and cross-validation Other models

Proteomics and Variable Selection p. 3/55 Proteomics Overall aim in molecular biology is the understanding of proteins and their functions in living organisms. Proteomics is the large-scale study of proteins. We will be discussing the particular problem of inferring which proteins are present in particular groups of samples. Aim to infer which proteins are important in particular biological processes.

Proteomics and Variable Selection p. 4/55 Proteomics - Mass Spectrometry Proteins ionized by laser, accelerated in electric field. Measure time-of-flight t to infer mass to charge ratio. t 2 m/z Image from http://biochemistry.wur.nl/biochem/educatio/images/maldi.jpg

Proteomics and Variable Selection p. 5/55 Proteomics - Mass Spectrometry Mass spectrum is the distribution of counts per time interval: intensity v. m/z Intensity relative abundance of ions Protein identified by presence of peaks with m/z corresponding to peptides contained in the protein. Pre-processing of data: spectra from different samples are aligned; keep only the peaks which appear in more than a certain number of samples.

Proteomics and Variable Selection p. 6/55 Application: HAM/TSP vs. AC Human T-Lymphotropic Virus type 1 (HTLV-1) is a human RNA retrovirus that causes T-cell leukaemia and T-cell lymphoma. HTLV-1 infection is also the cause of a debilitating disease called HAM/TSP. The vast majority of infected individuals ( 90% ) remain lifelong asymptomatic carriers (ACs). Blood plasma samples were taken from 34 HAM/TSP individuals and 34 ACs. SELDI mass-spectrometry was used to investigate the protein content of these samples. We seek to identify peaks in the spectra whose heights enable us to distinguish between the 2 classes of individuals.

Proteomics and Variable Selection p. 7/55 Application: HAM/TSP vs. AC Aim is to find a way to predict whether a new patient will go on to develop HAM/TSP or remain AC. Select small number of proteins to base the classification on. Easier to measure smaller number of biomarkers for future diagnosis Interpretation of model (want to find proteins which are really involved in the biological process)

Introduction to Classification and Regression Proteomics and Variable Selection p. 8/55

Proteomics and Variable Selection p. 9/55 Notation n = number of individuals p = number of input variables (here spectrum peaks) Label individuals by i, where i = 1,,n Label peaks by j, where j = 1,,p There are two types of data for each individual: The outcome variable y i is the class of individual i (eg. HAM or AC). This can also be called the response. Input variables are those we use to try to make the prediction (in this case peak intensities). Call these x ij. Input variables can also be called covariates, features, predictors or simply variables. We try to pick a small number of the input variables for the classifier, hence variable selection or feature selection.

Proteomics and Variable Selection p. 10/55 Classification Rules Now consider a new individual, labelled by i = 0. Know the peak intensities x 0j for the new individual. Don t know which group the new individual belongs to (HAM or AC). Example of a prediction rule could be: (x 02 > 0.08 and x 05 > 0.06 ) y 0 = HAM Here we use a star in y 0 to indicate that this is a predicted quantity.

Proteomics and Variable Selection p. 11/55 Relation to univariate analysis Consider a problem with 2 classes (eg. two types of leukaemia: ALL and AML often studied with gene expression) We could consider this as a differential expression problem: 1) Perform a test for each gene to see if its expression differs significantly between the classes. (eg. a modified t-test or permutation test). 2) Account for multiple testing. This produces a list of genes whose expression differs between classes. But, Treats each gene separately Takes no account of correlation between genes. Doesn t produce a prediction or classifier.

Proteomics and Variable Selection p. 12/55 Relation to univariate analysis Toy example: 400 individuals in each of 2 classes. Expression for 2 genes. Neither gene alone can completely separate the 2 classes. But a combination of the two genes can separate all but outlying points. gene 2 0.0 0.2 0.4 0.6 0.8 1.0 class 1 class 2 0.0 0.2 0.4 0.6 0.8 1.0 Classifier using only gene 1 would be something like this: x 01 < 0.4 y 0 = 2 x 01 > 0.4 y 0 = 1 But see that many points in class 1 would be mis-classified by this rule. gene 1 Same thing happens for a rule using only gene 2. But using both genes, we can find a rule which separates the classes: x 01 +x 02 < 0.85 y 0 = 2 x 01 +x 02 > 0.85 y 0 = 1

Proteomics and Variable Selection p. 13/55 Classification Decision boundaries don t have to be linear: Logistic regression 1 nearest neighbour gene 2 0.0 0.2 0.4 0.6 0.8 1.0 Predicted class 2 Predicted class 1 gene 2 0.0 0.2 0.4 0.6 0.8 1.0 Predicted class 2 Predicted class 1 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 gene 1 Logistic regression finds a straight line separating classes. 1-nearest neighbour classifies points to the class of the nearest point in data set. gene 1

Proteomics and Variable Selection p. 14/55 Classification Choice of shape/smoothness of decision boundary: balance between too smooth may be too simple to separate classes well too wiggly will be sensitive to individual points in the data set used to find the boundary Trade-off between mis-classifying points in this data set and making bad predictions for future points.

Proteomics and Variable Selection p. 15/55 Introduction to Regression If outcome variable is continuous, process is called regression. For example, in the HAM/TSP v. AC example, the proviral load has been measured for all individuals in the study. May wish to find proteins peaks whose intensity correlates with proviral load. 1.0 Find a surface which describes the relationship between the outcome and predictor variables. outcome 0.5 0.0 0.5 gene 2 gene 1 1.0

Proteomics and Variable Selection p. 16/55 Introduction to Regression As with classification, there are two types of variable for each individual: The outcome variable y i is now the continuous variable which is to be modelled in terms of the predictors. Input variables as before Here we try to pick a small number of the input variables which explain the variability of the outcome variable.

Proteomics and Variable Selection p. 17/55 Introduction to Regression Here we have to choose how smooth to make the surface. 1.0 1.5 1.0 0.5 outcome outcome 0.5 0.0 0.0 0.5 gene 2 gene 1 gene 2 gene 1 0.5 1.0 1.0 Choice of shape/smoothness of surface: balance between too smooth may give high errors on this data set too wiggly will be sensitive to individual points in the data set Trade-off between high errors for points in this data set and high errors for future data.

Proteomics and Variable Selection p. 18/55 Regression - linear models 1.0 0.5 outcome 0.0 0.5 gene 2 gene 1 1.0

Proteomics and Variable Selection p. 19/55 Linear Regression: Ordinary Least Squares Define random variables Y the outcome variable (here continuous) and X j the input variable j. These correspond to observed y i and x ij for individual j. Simple linear model: y i = β 0 + p β j x ij +ǫ i β 0 is the intercept term representing the expectation of Y for an individual with all variables X j zero. j=1 Each variable j has its own regression coefficient β j : this represents the effect that variable j has on the outcome, when all other variables are held constant. (Linear model variable has same effect whatever values of other variables.)

Proteomics and Variable Selection p. 20/55 Linear Regression: Ordinary Least Squares ǫ i is the residual error for individual i, after the effect of variable j has been taken into account. Fit the model by minimising the sum of squared residuals: RSS = n ǫ 2 i = n (y i β 0 p β j x ij ) 2 i=1 i=1 j=1 Solution can be written in matrix format. Straightforward and quick computationally.

Proteomics and Variable Selection p. 21/55 Details of matrix solution Write the model as y = Xβ +ǫ Here y and ǫ are the n-vectors of the outcomes and residual errors for all individuals. β is the (p+1)-vector of all regression coefficients, including β 0. X is the n (p+1) matrix of input variables for all individuals, where row i is (1,x i1,...,x ip ) - the 1 corresponds to β 0. In matrix format, the solution for β minimising the residual sum of squares is ˆβ OLS = (X T X) 1 X T y This involves matrix inversion of a (p+1) (p+1) matrix.

Proteomics and Variable Selection p. 22/55 Large p, small n problem However, in most biomarker selection problems, p is much larger than n. In this case the solution for the β j is not unique. (There are many different ways to write Y as a linear function of the X j.) This is known as the large p, small n problem. Present for all supervised learning models, not only linear models. Hence we need variable selection. Some possibilities: filter the input variables subset selection penalisation methods shrink the regression coefficients or set some of them to zero.

Proteomics and Variable Selection p. 23/55 Penalised linear regression 1.0 0.5 outcome 0.0 0.5 gene 2 gene 1 1.0

Proteomics and Variable Selection p. 24/55 Penalised Linear Regression: Ridge regression Penalised methods shrink the regression coefficients by imposing a penalty on their size. Ridge regression uses the same linear regression model as before, but minimises a different quantity: n (y i β 0 i=1 p β j x ij ) 2 +λ j=1 p j=1 β 2 j Parameter λ controls the amount of shrinkage. Larger λ gives more shrinkage: larger λ second term more important p j=1 β2 j must be smaller. An equivalent way to think of it is that β j minimises the residual sum of squares subject to the constraint p j=1 β2 j s, where s has a one-to-one correspondence with λ.

Proteomics and Variable Selection p. 25/55 Details of matrix solution The solution in matrix format is ˆβ ridge = (X T X +λi p ) 1 X T y where I p is the p p identity matrix. Use centred and scaled variables in X and y, and no intercept, so X is p p. So the ridge regression solution is also straightforward and reasonably quick computationally.

Proteomics and Variable Selection p. 26/55 Penalised Linear Regression: Lasso In ridge regression, regression coefficients are shrunk towards zero, but are not actually zero. Lasso is a method which produces zeros for most regression coefficients. Lasso minimises: n (y i β 0 i=1 p β j x ij ) 2 +λ j=1 p β j j=1 This time β j minimises the residual sum of squares subject to the constraint p j=1 β j t, where t has a one-to-one correspondence with λ. This modified penalty produces many zero regression coefficients, so the lasso performs a type of subset selection.

Proteomics and Variable Selection p. 27/55 Penalised Linear Regression: Lasso Lasso tends to pick one of a group of correlated predictors. Ridge gives the whole group smaller coefficients than if only one of the group was available. The solution to the lasso minimisation is not linear in the y, so cannot be written down as with ordinary least squares and ridge regression. ˆβ lasso Several methods have been proposed for fitting the lasso: quadratic programming, least angle regression and co-ordinate descent. The last two involve step-wise procedures, starting with one predictor in the model and successively adding the next best in when required. They calculate the solutions for all values of λ at once.

Proteomics and Variable Selection p. 28/55 Connections between fitting methods Ordinary least squares for linear regression is equivalent to maximum likelihood (assuming the outcome Y comes from a Normal distribution) Log likelihood for the mean of a Normal distribution is the sum of squares. Penalised methods for linear regression are equivalent to Bayesian methods for estimating the regression coefficients (assuming Y is Normal) Sum of squares is the log likelihood term. Penalty terms correspond to a prior on the regression coefficients (Normal for ridge regression, Laplace or double exponential for lasso). But ridge/lasso find the maximum of the posterior distribution only.

Proteomics and Variable Selection p. 29/55 Classification - generalised linear models Logistic regression gene 2 0.0 0.2 0.4 0.6 0.8 1.0 Predicted class 2 Predicted class 1 0.0 0.2 0.4 0.6 0.8 1.0 gene 1

Proteomics and Variable Selection p. 30/55 Classification: generalised linear models Suppose there are G classes. Our aim is to model the probabilities of being in each class, given the values of the input variables P( classg x i ),g = 1, G. Probabilities sum to one: G g=1 P( classg x i) = 1 so there are G 1 quantities to estimate. Cannot model the probabilities as linear because probabilities must be between 0 and 1. But we can transform: log ( ) P( class1 xi ) P( classg x i ) = β (1) 0 + p j=1 β (1) j x ij log. ( ) P( classg 1 xi ) P( classg x i ) = β (G 1) 0 + p j=1 β (G 1) j x ij So here we have G 1 linear functions (unlike in the continuous outcome case, where there is just one).

Classification: logistic regression When there are only 2 classes, often label them by 0 and 1. Here we have just one function to model: log ( ) P( class1 xi ) P( class0 x i ) = log ( ) P( class1 xi ) 1 P( class1 x i ) It is usual to write p(x i ) = P( class1 x i ), and then the model is p logit(p(x i )) = β 0 + β j x ij where logit(p) = log(p/(1 p)). This is called the logistic function - hence this model is called the logistic regression model. j=1 logit(p) 5 0 5 0.0 0.2 0.4 0.6 0.8 1.0 p Proteomics and Variable Selection p. 31/55

To find ˆβ j, solve logl/ β j = 0. These equations are non-linear in β j, so an iterative method (iteratively weighted least squares) is used to solve them. Proteomics and Variable Selection p. 32/55 Classification: logistic regression Usually fit logistic regression models using maximum likelihood. The likelihood function is multinomial (assuming individuals are independent): L = n i=1 P( classy i x i ). Here y i is 0 or 1. logl = = = n logp( classy i x i ) i=1 n (y i log(p(x i,β))+(1 y i )log(1 p(x i,β))) i=1 n p y i β j x ij log(1+e p i=1 j=0 j=0 β jx ij ) So now we have the log Likelihood in terms of the observed y i, x i and the parameters β j.

Proteomics and Variable Selection p. 33/55 Penalised Classification Logistic regression gene 2 0.0 0.2 0.4 0.6 0.8 1.0 Predicted class 2 Predicted class 1 0.0 0.2 0.4 0.6 0.8 1.0 gene 1

Fitting method for ridge logistic regression is iteratively weighted least squares, for lasso logistic regression the methods are similar to those for lasso linear regression. Proteomics and Variable Selection p. 34/55 Classification: logistic regression As with linear regression, logistic regression can be penalised, eg. with ridge or lasso penalties. Maximise the penalised log likelihood: logl λ p j=1 β 2 j or logl λ p β j j=1 Note the minus sign in front of the penalty, since maximising not minimising.

Proteomics and Variable Selection p. 35/55 Application: HAM/TSP vs. AC 34 HAM/TSP individuals and 34 ACs. For each person, have 650 peak intensities. Use logistic regression (classification) with lasso penalty to select small number of peaks: logit(p( class HAM peaks for personi)) = β 0 + p β j peak ij j=1 (i labels the 68 people, j labels the 650 peaks) Lasso penalty maximises logit(p( class HAM peaks for personi)) λ p j=1 β j.

Proteomics and Variable Selection p. 36/55 Regularisation Paths for HAM v. AC Plot β j v. λ for each j (one line per variable). For small L1 norm (large λ), very few coefficients are non-zero. As λ decreases, more variables enter the model.

Prediction error and cross-validation Proteomics and Variable Selection p. 37/55

Proteomics and Variable Selection p. 38/55 Separation of Classes (HAM v. AC) Disease status in terms of the top 2 peaks: Good but not perfect separation. Can we separate the classes if we include more peaks?

Proteomics and Variable Selection p. 39/55 Misclassification Error (HAM v. AC) Look at numbers of misclassifications for different numbers of peaks. Error rate decreases as we include more peaks - where do we stop?

Proteomics and Variable Selection p. 40/55 Use prediction error to choose model complexity Decreasing λ less penalised more variables included in model (more terms in ˆf) more complex model better fit to the current data set But if the model fits too well to the current data, we may be fitting to small details of the current data set which will not be present in future data. prediction error Train Test model complexity

Proteomics and Variable Selection p. 41/55 Cross Validation We seek a balance between the fit on current data and on future data. Look at this within the one data set we have, by splitting it into training data and test data. Fit the model to the training data (i.e. find the best fitting ˆβ lasso ). Calculate the error in the model using the test data (using fixed ˆβ lasso ). Important: this means that different data points are used for fitting the model and estimating the prediction error.

Proteomics and Variable Selection p. 42/55 Prediction error for linear regression Regression models attempt to find a function which describes the behaviour of the outcome Y in terms of the predictors {X 1, X p }. Write x i for the vector of predictor variables for individual i. Then we write the function in general as y i = f(x i )+ǫ i For example, in penalised linear regression, f(x i,β) = β 0 + p j=1 β jx ij Recall the estimate (best fit) of β is denoted by ˆβ. The function of x i using the best fit values of the regression coefficients is ˆf(x i ) = f(x i, ˆβ).

Proteomics and Variable Selection p. 43/55 Prediction error for linear regression Prediction error is the error we find when we compare the best fit predictions from the model with the actual observed data. For continuous outcomes the error usually used is the average squared error between the observed values and the predictions from the model: err = 1 n n (y i ˆf(x i )) 2 i=1

Proteomics and Variable Selection p. 44/55 Prediction error for classification Binary classification models in general can be written as P(y i = 1 x i ) = f(x i ) For the generalised linear models we have discussed so far, f(x i,β) = β 0 + p j=1 β jx ij, and as before, the best fit function is that found using the best fit parameters, ˆf(x i ) = f(x i, ˆβ). Make a class prediction for each point: y i = { 1, ˆf(xi ) > 0.5; 0, ˆf(xi ) < 0.5.

Proteomics and Variable Selection p. 45/55 Prediction error for classification How do we characterise prediction error (comparing y i with y i)? One possibility is simply to count the number of misclassifications: 1 n n I[yi y i ] (1) i=1 Notation: I[ ] is an indicator function: it takes value 1 if the expression inside [ ] is true, 0 otherwise. (So the misclassification error is simply the proportion of misclassifications.)

Proteomics and Variable Selection p. 46/55 Cross-validation Example: 5 fold cross validation We can use cross-validation to get a better estimate of the prediction error. TRAIN TRAIN TRAIN TRAIN TEST TEST Here we average the test error over several splits of the data. TEST TEST TRAIN TRAIN TRAIN TEST TRAIN With 5 splits, we obtain 5 different best estimates ˆf k, k = 1, 5, one on each training set. If we take the first split, the test error is err 1 = 1 (n/5) i TEST 1 (y i ˆf 1 (x i )) 2

Proteomics and Variable Selection p. 47/55 Cross-validation Each individual appears in 4 training sets, but only 1 test set. We evaluate the prediction error for individual i using ˆf k for the split in which individual i appears in the test set and not the training set. So if we label the test set for individual i by k(i), we use ˆf k for the prediction error. The overall cross-validation prediction error for the model is then CVerr = 1 n n (y i ˆf k(i) (x i )) 2 i=1 It can be seen that this is the average of the test errors of the 5 sets: CVerr = 1 5 ( 1 (n/5) i TEST 1 (y i ˆf 1 (x i )) 2 + + 1 (n/5) i TEST 5 (y i ˆf 5 (x i )) 2 )

Proteomics and Variable Selection p. 48/55 Cross-validation Cross-validation error can be used to find the optimal value of λ: calculate the prediction error on test data for a range of λ: the optimal λ minimises the prediction error. Can also be used to compare models, eg. ridge v. lasso. The split into groups for cross-validation must be chosen at random, not based on order of individuals in the study. (Picture shown above is just for convenience). Also possible to average over many more random splits (so each individual appears in more than one test set, though never in the corresponding training set).

Proteomics and Variable Selection p. 49/55 HAM v. AC example: Cross-validation outline Data set contains 34 HAM, 34 AC. Sample 100 subsets of 17 HAM, 17 AC. Cross Validation: Set λ. Run model 100 times (once for each subset). Get 100 test errors (on the left-out individuals). Average over the 100 subsets to get CVerr(λ). Repeat for range of λ, find λ min which has the minimum CVerr(λ). Set λ = λ min. Run model once on whole data set to get final model and peak selection.

Proteomics and Variable Selection p. 50/55 Misclassification Error (HAM v. AC) Look at numbers of misclassifications for different numbers of peaks. The best validation misclassification rate is 18% errors, achieved using 3 peaks.

Proteomics and Variable Selection p. 51/55 Final model (HAM v. AC) Run lasso on all data, selecting the top 3 peaks. logit(p( class HAM peaks for person i)) = 0.23 + 2.07Intensity(peak11.7) + 1.65Intensity(peak13.3) 1.34Intensity(peak2.1) The cross-validation error of 18% does not correspond exactly to these 3 peaks: it s an average over the results for the 100 subsets. To find a good estimate of prediction error, obtain a separate validation data set, make class predictions using the above model and compare with the true classes (future work for this application).

Other methods Proteomics and Variable Selection p. 52/55

Proteomics and Variable Selection p. 53/55 Some other methods for prediction Many different methods available for prediction/discrimination: Decision trees: fit interaction terms; interpretable. Boosted trees: fit an average over many small trees, but iterative method to gradually improve prediction. Lots of non-linear methods fitting basis functions: spline functions, wavelets, support vector machines. Neural networks fit complex non-linear functions of predictors. Local methods: kernel smoothing and nearest neighbours. Many of these methods do not provide automatic variable selection or ranking. But active research area.

Proteomics and Variable Selection p. 54/55 Bayesian methods Methods described here are usually fit by optimisation given one data set, find the one best solution. Then may use bootstrap techniques to get an idea of uncertainty of parameter estimates. Another approach is to use Bayesian models using MCMC (Markov Chain Monte Carlo) methods. These explore the parameter space more fully, enabling estimation of uncertainty in parameters and predictions. Obtains more information, coherent inference. But complex computationally. Also active research area.

Proteomics and Variable Selection p. 55/55 Bibliography/Software Further Reading: The Elements of Statistical Learning (Hastie, Tibshirani and Friedman), pub. Springer. Software in R: glm for linear regression, logistic regression lm.ridge for ridge regression glmnet for lasso (linear or logistic regression) Some of these are standard packages in R, others can be downloaded from http://cran.r-project.org/