The Lasso: an Application to Cancer Detection and Some New Tools for Selective Inference
Total Page:16
File Type:pdf, Size:1020Kb
1 The Lasso: An Application to Cancer Detection and Some New Tools for Selective Inference Robert Tibshirani, Stanford University Georgia Statistics Day, 2015 Robert Tibshirani, Stanford University Lasso 2 An exciting time for statisticians! • BIG DATA is everywhere • Data Science is emerging as a new field • Enrollment in Statistics/Machine Learning/Data Science classes are way up! • Graduates are in big demand: Google, FaceBook, Twitter, LinkedIn Robert Tibshirani, Stanford University Lasso 3 For Statisticians: 15 minutes of fame • 2009: \ I keep saying the sexy job in the next ten years will be statisticians." Hal Varian, Chief Economist Google • 2012 \Data Scientist: The Sexiest Job of the 21st Century" Harvard Business Review Robert Tibshirani, Stanford University Lasso 4 Sexiest man alive? Robert Tibshirani, Stanford University Lasso 5 Don't believe everything on the Web Robert Tibshirani, Stanford University Lasso 6 Outline Focus is on predictive modeling 1 Prediction: Example application of the lasso for cancer diagnosis 2 Inference (How to obtain p-values and confidence intervals) after fitting Forward Stepwise Regression or the Lasso: New tools for post-selective inference Robert Tibshirani, Stanford University Lasso 7 A Cancer detection problem • I am currently working in a cancer diagnosis project with co-workers at Stanford; Livia Eberlin (PI) |PostDoc (Chemistry); Richard Zare (Chemistry) and George Poulsides (Surgery) • Eberlin et al (2014). \Molecular assessment of surgical-resection margins of gastric cancer by mass-spectrometric imaging". Proc. Nat. Acad. Sci. • They have collected samples of tissue from a number of patients undergoing surgery for stomach cancer. Robert Tibshirani, Stanford University Lasso 8 Livia Eberlin George Poulsides Richard Zare Robert Tibshirani, Stanford University Lasso 9 Extracted part Left in patient Cancer Normal margin Stromal Epithelial Robert Tibshirani, Stanford University Lasso 10 The challenge • Build a classifier than can distinguish three kinds of tissue: normal epithelial, normal stromal and cancer. • Such a classifier could be used to assist surgeons in determining, in real time, whether they had successfully removed all of the tumor. Current pathologist error rate for the real-time call can be as high as 20%. Robert Tibshirani, Stanford University Lasso 11 Technology to the rescue! DESI (Desorption electrospray ionization) An electrically charged \mist" is directed at the sample; surface ions are freed and enter the mass spec. Robert Tibshirani, Stanford University Lasso 12 The data for one patient Cancer Epithelial Stromal Spectrum for each pixel Spectrum sampled at 11,000 m/z values Robert Tibshirani, Stanford University Lasso 13 Details • 20 patients, each contributing a sample of epithelial, stromal and cancer tissue. • Labels determined after 2 weeks of testing in pathology lab. • At each pixel in the image, the intensity of metabolites is measured by DESI. Peaks in the spectrum representing different metabolites. • The spectrum has been finely sampled, with the intensity measured at about 11; 000 m=z sites across the spectrum, for each of about 8000 pixels. Robert Tibshirani, Stanford University Lasso 14 The overall data −−− 11,000 m/z sites −−−− Y Label of pixel: Pixels 1 1=Epithelial Patient 1 1 3 2= Cancer 2 3=Stromal Patient 2 1.3 7.6 Patient 3 9.4 Patient 4 ... Patient 20 Robert Tibshirani, Stanford University Lasso 15 Selected negative ion mode DESI-MS ion images of sample GC727. Robert Tibshirani, Stanford University Lasso Eberlin L S et al. PNAS 2014;111:2436-2441 ©2014 by National Academy of Sciences 16 What we need to tackle this problem • A statistical classifier (algorithm) that sorts through the large number of features, and finds the most informative ones: a sparse set of features. • the Lasso! Robert Tibshirani, Stanford University Lasso 17 Review of the Lasso The Lasso is an estimator defined by the following optimization problem: 1 X X 2 X minimize (yi β0 xij βj ) subject to βj s β0,β 2 − − j j ≤ i j • Penalty = sparsity (feature selection) ) • Convex problem (good for computation and theory) • Ridge regression uses penalty P β2 s and does not yield sparsity j j ≤ Robert Tibshirani, Stanford University Lasso 18 Prostate cancer example N = 88; p = 8. Predicting log-PSA, in men after prostate cancer surgery lcavol svi lweight pgg45 lbph Coefficients gleason age −0.2 0.0 0.2 0.4 0.6 lcp 0.0 0.2 0.4 0.6 0.8 1.0 Shrinkage Factor s Robert Tibshirani, Stanford University Lasso Pathwise version of lasso is called least angle regression (LAR) 19 Why does the lasso give a sparse solution? β β 2 β^ ..2 β^ β β 1 1 Robert Tibshirani, Stanford University Lasso 20 Back to our problem • K = 3 classes (epithelial, stromal, cancer): multinomial model Pr(Yi = k x) X log P j = β0k + xij βjk ; k = 1; 2;::: K Pr(Yi = k x) k j j Here xij is height of spectrum for sample i at jth m=z position • We replace the least squares objective function by the multinomial log-likelihood P • Add lasso penalty βj s; optimize, using cross-validation to estimate best value for budgetjs. j ≤ • yields a pixel classifier, and also reveals which m=z sites are informative. Robert Tibshirani, Stanford University Lasso 21 Fast computation is essential • Our lab has written a open-source R language package called glmnet for fitting lasso models. Available on CRAN. Largely written in FORTRAN!!!!! • It is very fast- can solve the current problem in a few minutes on a PC. Some builtin parallelization too. • Not “off-the shelf": Many clever computational tricks were used to achieve the impressive speed. • Lots of features- Gaussian, Logistic, Poisson, Survival models; elastic net; grouping; parameter constraints; Available in R and Matlab. Jerry Friedman Trevor Hastie Robert Tibshirani, Stanford University Lasso 22 Results Cross-validation- min at 129 peaks; overall error rate= 4.2% Predicted true Epi Canc Strom Prop correct Epi 3277.00 80.00 145.00 0.94 Canc 73.00 5106.00 13.00 0.98 Strom 79.00 86.00 2409.00 0.94 Test set: overall error rate =5.7% Predicted true Epi Canc Strom Prop correct Epi 1606.00 149.00 19.00 0.91 Canc 23.00 1622.00 5.00 0.98 Strom 67.00 5.00 1222.00 0.94 Robert Tibshirani, Stanford University Lasso 23 Cross-validated estimates of class probabilities 1.2 Epithelial Cancer Stromal oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooo oooooooooooooooooooooooooo 1.0 ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo ooo o ooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooooo ooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooooooooooooooooo oooooooooo oo o ooo ooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oo oooo ooooooooooooooooooooooooooooooo ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo ooo ooooooo oo oo o ooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooo ooo ooooooo ooo oooooooooooooo ooooooooooooooooooooooooooo oo ooo oo oooooooo o ooooo ooooooooooooooooooo oooooooooooooooooooooooooooooooooo ooooooooooo ooooo ooooooooooooooooooooooooo ooo oo oooo oooooo ooo oo ooooo o ooo ooooooo ooo oooooooooooooooooooo o oooooooooooooooooooooooo oooooooooo ooo oo oooo 0.8 oooooo oo ooooooo ooooo oo ooooooo ooooo oooooooooo o ooo o o o ooooooooooooooooo o ooooooooooooooooo oooooooo oo oo ooo oo oo ooo ooo oo ooo ooooooooooo oo oooo o ooo o o o o ooooooooooooooooooooo o oooooooooooooooooo oooooooooo o o o o oooooooo oo ooooooo o o ooooooo ooooooooo o ooo oooo o ooooooooooooooooo o oooooooooooooo oooooooooo o ooo oooo ooooo ooo o ooo oooo oooo oo oooo ooooo ooo o o o oooooooooooooooooooo o ooooooooooooooooo ooooooooo oo oo oooo ooo oooooooo oo o oo o oooo oooo oooo o oooooooooooooooooooo o ooo ooooooooo oooo oooooooooo ooo o ooo o ooooo o o ooooo ooo o oooo oo oooooooooooooooooo oooooooooo oooooooo oo o 0.6 oo o ooooo oo oo o o o o o o oooooooooooooooooooo o o ooooooo o oooooooo oo ooo oo ooooo o ooooo o ooooooo o o o o oo oooooooooooooooooooo oo ooooooooooo ooooooooooo oo o oo oooo o o oooo o oooo ooo ooo o o ooooo o ooooooooooooooooooo o o o oooo o oooooooooo o o oo oooooo oo oo oo oooooooo ooo o o o o o ooooooooooooooooooo oo o oooo oooooooo o o ooo oo ooooo ooo o ooooo o oo o o oo ooooooooooooooooooooo oo oooooooo ooooooooo o o ooo o ooo oooo o ooo oo o o ooooo ooooooooooooooooooo o o oooooooo oooooooo o o 0.4 o ooo oooooo o o o oo oo o o ooooo oo ooooooooooooooooooo o oo oooo ooooo oooooo oo oooooo ooo oo o oo o oo ooooo o oo ooooo o ooooooooooooooooooooo o o ooooooooooo ooooooooo o oooooo oo ooooooo ooo o oooooooo ooo oooooo oo o oo o ooooooooooooooo o oooo oooo oooo oooooooooo o oo oooooo ooo oooo oooo o oo ooooooooo oo o oo oooo oooooooooooooooooooo o o ooooooooooooooo oooooooooo o ooo o Estimated CV Probability