SlideShare a Scribd company logo
2
Most read
4
Most read
5
Most read
Masayuki Tanaka
Jun. 17, 2016
Derivation of
the closed soft threshold solution
of
the Lasso regression
Lasso regression
The cost function of Lasso regression:
𝐿 𝜷, 𝜆 =
1
2
𝒀 − 𝑿𝜷 2
2
+ 𝜆 𝜷 1
Y:Data matrix
X:System matrix
Orthonormal Lasso regression
𝐿 𝜷, 𝜆 =
1
2
𝒀 − 𝑿𝜷 2
2
+ 𝜆 𝜷 1
where 𝑿 𝑇 𝑿 = 𝑰
(orthonormal)The closed form
soft threshold
solution
𝛽𝑗 = sign 𝛽𝑗
OLS
𝛽𝑗
OLS
− 𝜆
+
𝜷OLS
= arg min
𝜷
1
2
𝒀 − 𝑿𝜷 2
2
= 𝑿 𝑇
𝑿 −1
𝑿 𝑇
𝒀 = 𝑿 𝑇
𝒀
sign 𝜉 =
−1 (𝜉 < 0)
0 (𝜉 = 0)
1 (𝜉 > 0)
𝜉 + = max 𝜉, 0 =
𝜉 (𝜉 > 0)
0 (𝜉 ≤ 0)
Derivation of the soft threshold solution
arg min
𝜷
1
2
𝒀 − 𝑿𝜷 2
2
+ 𝜆 𝜷 1
= arg min
𝜷
1
2
𝒀 𝑇 𝒀 − 2𝜷 𝑇 𝑿 𝑻 𝒀 + 𝜷 𝑇 𝑿 𝑻 𝑿𝜷 + 𝜆 𝜷 1
= arg min
𝜷
1
2
−2𝜷 𝑇
𝜷OLS
+ 𝜷 𝑇
𝜷 + 𝜆 𝜷 1
𝒀 𝑇 𝒀 = 𝒄𝒐𝒏𝒔𝒕
𝑿 𝑻 𝒀 = 𝜷OLS
𝑿 𝑻 𝑿 = 𝑰
(We can consider element-wise)
arg min
𝛽𝑗
𝐶 𝛽𝑗 = arg min
𝛽𝑗
1
2
𝛽𝑗
2
− 𝛽𝑗
OLS
𝛽𝑗 + 𝜆 𝛽𝑗
𝛽𝑗 = 0
𝛽𝑗 = 0
𝛽𝑗 > 0
𝐶 𝛽𝑗 =
1
2
𝛽𝑗
2
− 𝛽𝑗
OLS
𝛽𝑗 + 𝜆𝛽𝑗
= 𝛽𝑗
1
2
𝛽𝑗 − 𝛽𝑗
OLS
+ 𝜆
𝛽𝑗 = 𝛽𝑗
OLS
− 𝜆
𝛽𝑗 < 0
𝐶 𝛽𝑗 =
1
2
𝛽𝑗
2
− 𝛽𝑗
OLS
𝛽𝑗 − 𝜆𝛽𝑗
= 𝛽𝑗
1
2
𝛽𝑗 − 𝛽𝑗
OLS
− 𝜆
𝛽𝑗 = 𝛽𝑗
OLS
+ 𝜆
Derivation of the soft threshold solution
𝛽𝑗
OLS
−𝜆 𝜆
Case: 𝛽𝑗
OLS
< −𝜆 𝛽𝑗
OLS
− 𝜆 < 0𝛽𝑗
OLS
+ 𝜆 < 0
𝛽𝑗
𝐶 𝛽𝑗
𝛽𝑗 = 𝛽𝑗
OLS
+ 𝜆
𝛽𝑗
OLS
−𝜆 𝜆
Case: −𝜆 ≤ 𝛽𝑗
OLS
≤ 𝜆
𝛽𝑗
OLS
− 𝜆 ≤ 0𝛽𝑗
OLS
+ 𝜆 ≥ 0
𝛽𝑗
𝐶 𝛽𝑗
𝛽𝑗 = 0
𝛽𝑗
OLS
−𝜆 𝜆
Case: 𝜆 < 𝛽𝑗
OLS
𝛽𝑗
OLS
− 𝜆 > 0𝛽𝑗
OLS
+ 𝜆 > 0
𝛽𝑗
𝐶 𝛽𝑗
𝛽𝑗 = 𝛽𝑗
OLS
− 𝜆
Derivation of the soft threshold solution
Case: 𝛽𝑗
OLS
< −𝜆, 𝛽𝑗 = 𝛽𝑗
OLS
+ 𝜆
Case: −𝜆 ≤ 𝛽𝑗
OLS
≤ 𝜆,𝛽𝑗 = 0
Case: 𝜆 < 𝛽𝑗
OLS
, 𝛽𝑗 = 𝛽𝑗
OLS
− 𝜆
𝛽𝑗 = sign 𝛽𝑗
OLS
𝛽𝑗
OLS
− 𝜆
+
𝛽𝑗 = sign 𝛽𝑗
OLS
𝛽𝑗
OLS
− 𝜆
+
= −1 − 𝛽𝑗
OLS
− 𝜆
+
= 𝛽𝑗
OLS
+ 𝜆
𝛽𝑗 = sign 𝛽𝑗
OLS
𝛽𝑗
OLS
− 𝜆
+
= sign 𝛽𝑗
OLS
× 0 = 0
𝛽𝑗 = sign 𝛽𝑗
OLS
𝛽𝑗
OLS
− 𝜆
+
= +1 𝛽𝑗
OLS
− 𝜆
+
= 𝛽𝑗
OLS
− 𝜆
Reference
High-dimensional data analysis, Lecture 6 (Lasso Regression) by Wessel van Wierin

More Related Content

PDF
Data Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
PPTX
Generalized linear model
PPSX
Lasso and ridge regression
PPTX
Logistic regression
PDF
Ridge regression
PDF
Visual Explanation of Ridge Regression and LASSO
PDF
Linear regression
PPTX
Logistic regression
Data Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
Generalized linear model
Lasso and ridge regression
Logistic regression
Ridge regression
Visual Explanation of Ridge Regression and LASSO
Linear regression
Logistic regression

What's hot (20)

PDF
Linear regression theory
PPTX
Simple Linear Regression: Step-By-Step
PPTX
Point Estimation
PDF
Missing data handling
PPTX
Regression Analysis
PPTX
Naive bayes
ODP
Machine Learning with Decision trees
PPT
Linear regression
PDF
Simple linear regression
PPTX
Regression analysis
PPTX
Bayes Theorem
PPT
Regression analysis
PPTX
Machine learning prediction of stock markets
PPTX
Lecture 6: Ensemble Methods
PDF
Decision tree learning
PDF
Chapter 4 part1-Probability Model
PPTX
Logistic regression with SPSS
PDF
Understanding Bagging and Boosting
PPTX
Linear Regression
PPT
Sampling theory
Linear regression theory
Simple Linear Regression: Step-By-Step
Point Estimation
Missing data handling
Regression Analysis
Naive bayes
Machine Learning with Decision trees
Linear regression
Simple linear regression
Regression analysis
Bayes Theorem
Regression analysis
Machine learning prediction of stock markets
Lecture 6: Ensemble Methods
Decision tree learning
Chapter 4 part1-Probability Model
Logistic regression with SPSS
Understanding Bagging and Boosting
Linear Regression
Sampling theory
Ad

Viewers also liked (20)

PDF
Ridge regression, lasso and elastic net
PPT
Apprentissage automatique, Régression Ridge et LASSO
PDF
Reading the Lasso 1996 paper by Robert Tibshirani
PDF
Lecture 8 strings and characters
PDF
Python introduction
PDF
Thiyagu viva voce prsesentation
PDF
Seminar on Robust Regression Methods
PDF
4thchannel conference poster_freedom_gumedze
PPTX
Lasso
PDF
A_Study_on_the_Medieval_Kerala_School_of_Mathematics
PPT
Python Introduction
PDF
Phonons & Phonopy: Pro Tips (2015)
PDF
Seminar- Robust Regression Methods
PPTX
Outlier detection for high dimensional data
PPTX
5.7 poisson regression in the analysis of cohort data
 
PDF
PPT
Impedance Spectroscopy
PPTX
Poisson regression models for count data
PDF
Diagnostic in poisson regression models
Ridge regression, lasso and elastic net
Apprentissage automatique, Régression Ridge et LASSO
Reading the Lasso 1996 paper by Robert Tibshirani
Lecture 8 strings and characters
Python introduction
Thiyagu viva voce prsesentation
Seminar on Robust Regression Methods
4thchannel conference poster_freedom_gumedze
Lasso
A_Study_on_the_Medieval_Kerala_School_of_Mathematics
Python Introduction
Phonons & Phonopy: Pro Tips (2015)
Seminar- Robust Regression Methods
Outlier detection for high dimensional data
5.7 poisson regression in the analysis of cohort data
 
Impedance Spectroscopy
Poisson regression models for count data
Diagnostic in poisson regression models
Ad

Similar to Lasso regression (20)

PPTX
Least Square with L0, L1, and L2 Constraint
PPTX
Solving Poisson Equation using Conjugate Gradient Method and its implementation
PDF
Tutorial 8
PDF
Further Results On The Basis Of Cauchy’s Proper Bound for the Zeros of Entire...
PDF
Intro to Quant Trading Strategies (Lecture 5 of 10)
PPTX
7.3_Nonlinear Programming-LagrangeExamples.pptx
PDF
Problem of the week no6
PDF
Residue integration 01
PDF
Intro to Quant Trading Strategies (Lecture 3 of 10)
PDF
서포트 벡터 머신(Support Vector Machine, SVM)
PDF
C0560913
PDF
Intro to Quantitative Investment (Lecture 4 of 6)
PPTX
Homework 1 Solution.pptx
PPTX
تطبيقات المعادلات التفاضلية
PDF
Taller 1 parcial 3
PPTX
Error Correction 14_03_2022.pptx
PPTX
Testdjhdhddjjdjdjdjdjdjdjjdjdjffhfhfhfjfudh
PDF
Blow up in a degenerate keller--segel system(Eng.)
PDF
TRANSIENT RADIAL HEAT CONDUCTION WITH BESSEL FUNCTIONS AND INTEGRAL TRANSFOR...
PDF
Neet class 11 12 basic mathematics notes
Least Square with L0, L1, and L2 Constraint
Solving Poisson Equation using Conjugate Gradient Method and its implementation
Tutorial 8
Further Results On The Basis Of Cauchy’s Proper Bound for the Zeros of Entire...
Intro to Quant Trading Strategies (Lecture 5 of 10)
7.3_Nonlinear Programming-LagrangeExamples.pptx
Problem of the week no6
Residue integration 01
Intro to Quant Trading Strategies (Lecture 3 of 10)
서포트 벡터 머신(Support Vector Machine, SVM)
C0560913
Intro to Quantitative Investment (Lecture 4 of 6)
Homework 1 Solution.pptx
تطبيقات المعادلات التفاضلية
Taller 1 parcial 3
Error Correction 14_03_2022.pptx
Testdjhdhddjjdjdjdjdjdjdjjdjdjffhfhfhfjfudh
Blow up in a degenerate keller--segel system(Eng.)
TRANSIENT RADIAL HEAT CONDUCTION WITH BESSEL FUNCTIONS AND INTEGRAL TRANSFOR...
Neet class 11 12 basic mathematics notes

More from Masayuki Tanaka (20)

PDF
Slideshare breaking inter layer co-adaptation
PDF
PRMU201902 Presentation document
PDF
Gradient-Based Low-Light Image Enhancement
PDF
Year-End Seminar 2018
PPTX
遠赤外線カメラと可視カメラを利用した悪条件下における画像取得
PPTX
Learnable Image Encryption
PDF
クリエイティブ・コモンズ
PDF
デザイン4原則
PDF
メラビアンの法則
PDF
類似性の法則
PDF
権威に訴える論証
PDF
Chain rule of deep neural network layer for back propagation
PDF
Give Me Four
PDF
Tech art 20170315
PDF
My Slide Theme
PDF
Font Memo
PPT
One-point for presentation
PPTX
ADMM algorithm in ProxImaL
PPTX
Intensity Constraint Gradient-Based Image Reconstruction
PPTX
Welcome to our lab 2016
Slideshare breaking inter layer co-adaptation
PRMU201902 Presentation document
Gradient-Based Low-Light Image Enhancement
Year-End Seminar 2018
遠赤外線カメラと可視カメラを利用した悪条件下における画像取得
Learnable Image Encryption
クリエイティブ・コモンズ
デザイン4原則
メラビアンの法則
類似性の法則
権威に訴える論証
Chain rule of deep neural network layer for back propagation
Give Me Four
Tech art 20170315
My Slide Theme
Font Memo
One-point for presentation
ADMM algorithm in ProxImaL
Intensity Constraint Gradient-Based Image Reconstruction
Welcome to our lab 2016

Recently uploaded (20)

PDF
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf
PPTX
2. Earth - The Living Planet earth and life
PPT
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
PPTX
Microbiology with diagram medical studies .pptx
PDF
. Radiology Case Scenariosssssssssssssss
PDF
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
PDF
Warm, water-depleted rocky exoplanets with surfaceionic liquids: A proposed c...
PPT
6.1 High Risk New Born. Padetric health ppt
DOCX
Q1_LE_Mathematics 8_Lesson 5_Week 5.docx
PDF
Sciences of Europe No 170 (2025)
PDF
Lymphatic System MCQs & Practice Quiz – Functions, Organs, Nodes, Ducts
PPT
POSITIONING IN OPERATION THEATRE ROOM.ppt
PPTX
2Systematics of Living Organisms t-.pptx
PDF
CHAPTER 3 Cell Structures and Their Functions Lecture Outline.pdf
PPTX
Classification Systems_TAXONOMY_SCIENCE8.pptx
PPTX
Introduction to Fisheries Biotechnology_Lesson 1.pptx
PPTX
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
PDF
lecture 2026 of Sjogren's syndrome l .pdf
PPTX
neck nodes and dissection types and lymph nodes levels
PPTX
famous lake in india and its disturibution and importance
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf
2. Earth - The Living Planet earth and life
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
Microbiology with diagram medical studies .pptx
. Radiology Case Scenariosssssssssssssss
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
Warm, water-depleted rocky exoplanets with surfaceionic liquids: A proposed c...
6.1 High Risk New Born. Padetric health ppt
Q1_LE_Mathematics 8_Lesson 5_Week 5.docx
Sciences of Europe No 170 (2025)
Lymphatic System MCQs & Practice Quiz – Functions, Organs, Nodes, Ducts
POSITIONING IN OPERATION THEATRE ROOM.ppt
2Systematics of Living Organisms t-.pptx
CHAPTER 3 Cell Structures and Their Functions Lecture Outline.pdf
Classification Systems_TAXONOMY_SCIENCE8.pptx
Introduction to Fisheries Biotechnology_Lesson 1.pptx
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
lecture 2026 of Sjogren's syndrome l .pdf
neck nodes and dissection types and lymph nodes levels
famous lake in india and its disturibution and importance

Lasso regression

  • 1. Masayuki Tanaka Jun. 17, 2016 Derivation of the closed soft threshold solution of the Lasso regression
  • 2. Lasso regression The cost function of Lasso regression: 𝐿 𝜷, 𝜆 = 1 2 𝒀 − 𝑿𝜷 2 2 + 𝜆 𝜷 1 Y:Data matrix X:System matrix
  • 3. Orthonormal Lasso regression 𝐿 𝜷, 𝜆 = 1 2 𝒀 − 𝑿𝜷 2 2 + 𝜆 𝜷 1 where 𝑿 𝑇 𝑿 = 𝑰 (orthonormal)The closed form soft threshold solution 𝛽𝑗 = sign 𝛽𝑗 OLS 𝛽𝑗 OLS − 𝜆 + 𝜷OLS = arg min 𝜷 1 2 𝒀 − 𝑿𝜷 2 2 = 𝑿 𝑇 𝑿 −1 𝑿 𝑇 𝒀 = 𝑿 𝑇 𝒀 sign 𝜉 = −1 (𝜉 < 0) 0 (𝜉 = 0) 1 (𝜉 > 0) 𝜉 + = max 𝜉, 0 = 𝜉 (𝜉 > 0) 0 (𝜉 ≤ 0)
  • 4. Derivation of the soft threshold solution arg min 𝜷 1 2 𝒀 − 𝑿𝜷 2 2 + 𝜆 𝜷 1 = arg min 𝜷 1 2 𝒀 𝑇 𝒀 − 2𝜷 𝑇 𝑿 𝑻 𝒀 + 𝜷 𝑇 𝑿 𝑻 𝑿𝜷 + 𝜆 𝜷 1 = arg min 𝜷 1 2 −2𝜷 𝑇 𝜷OLS + 𝜷 𝑇 𝜷 + 𝜆 𝜷 1 𝒀 𝑇 𝒀 = 𝒄𝒐𝒏𝒔𝒕 𝑿 𝑻 𝒀 = 𝜷OLS 𝑿 𝑻 𝑿 = 𝑰 (We can consider element-wise) arg min 𝛽𝑗 𝐶 𝛽𝑗 = arg min 𝛽𝑗 1 2 𝛽𝑗 2 − 𝛽𝑗 OLS 𝛽𝑗 + 𝜆 𝛽𝑗 𝛽𝑗 = 0 𝛽𝑗 = 0 𝛽𝑗 > 0 𝐶 𝛽𝑗 = 1 2 𝛽𝑗 2 − 𝛽𝑗 OLS 𝛽𝑗 + 𝜆𝛽𝑗 = 𝛽𝑗 1 2 𝛽𝑗 − 𝛽𝑗 OLS + 𝜆 𝛽𝑗 = 𝛽𝑗 OLS − 𝜆 𝛽𝑗 < 0 𝐶 𝛽𝑗 = 1 2 𝛽𝑗 2 − 𝛽𝑗 OLS 𝛽𝑗 − 𝜆𝛽𝑗 = 𝛽𝑗 1 2 𝛽𝑗 − 𝛽𝑗 OLS − 𝜆 𝛽𝑗 = 𝛽𝑗 OLS + 𝜆
  • 5. Derivation of the soft threshold solution 𝛽𝑗 OLS −𝜆 𝜆 Case: 𝛽𝑗 OLS < −𝜆 𝛽𝑗 OLS − 𝜆 < 0𝛽𝑗 OLS + 𝜆 < 0 𝛽𝑗 𝐶 𝛽𝑗 𝛽𝑗 = 𝛽𝑗 OLS + 𝜆 𝛽𝑗 OLS −𝜆 𝜆 Case: −𝜆 ≤ 𝛽𝑗 OLS ≤ 𝜆 𝛽𝑗 OLS − 𝜆 ≤ 0𝛽𝑗 OLS + 𝜆 ≥ 0 𝛽𝑗 𝐶 𝛽𝑗 𝛽𝑗 = 0 𝛽𝑗 OLS −𝜆 𝜆 Case: 𝜆 < 𝛽𝑗 OLS 𝛽𝑗 OLS − 𝜆 > 0𝛽𝑗 OLS + 𝜆 > 0 𝛽𝑗 𝐶 𝛽𝑗 𝛽𝑗 = 𝛽𝑗 OLS − 𝜆
  • 6. Derivation of the soft threshold solution Case: 𝛽𝑗 OLS < −𝜆, 𝛽𝑗 = 𝛽𝑗 OLS + 𝜆 Case: −𝜆 ≤ 𝛽𝑗 OLS ≤ 𝜆,𝛽𝑗 = 0 Case: 𝜆 < 𝛽𝑗 OLS , 𝛽𝑗 = 𝛽𝑗 OLS − 𝜆 𝛽𝑗 = sign 𝛽𝑗 OLS 𝛽𝑗 OLS − 𝜆 + 𝛽𝑗 = sign 𝛽𝑗 OLS 𝛽𝑗 OLS − 𝜆 + = −1 − 𝛽𝑗 OLS − 𝜆 + = 𝛽𝑗 OLS + 𝜆 𝛽𝑗 = sign 𝛽𝑗 OLS 𝛽𝑗 OLS − 𝜆 + = sign 𝛽𝑗 OLS × 0 = 0 𝛽𝑗 = sign 𝛽𝑗 OLS 𝛽𝑗 OLS − 𝜆 + = +1 𝛽𝑗 OLS − 𝜆 + = 𝛽𝑗 OLS − 𝜆
  • 7. Reference High-dimensional data analysis, Lecture 6 (Lasso Regression) by Wessel van Wierin