Lasso算法

维基百科,自由的百科全书
跳到导航 跳到搜索

统计学机器学习中,Lasso算法(英语:least absolute shrinkage and selection operator,又译最小绝对值收敛和选择算子、套索算法)是一种同时进行特征选择正则化(数学)的回归分析方法,旨在增强统计模型的预测准确性和可解释性,最初由斯坦福大学统计学教授Robert Tibshirani英语Robert Tibshirani于1996年基于Leo Breiman非负参数推断(Nonnegative Garrote, NNG)提出[1][2]。Lasso算法最初用于计算最小二乘法模型,这个简单的算法揭示了很多估计量的重要性质,如估计量岭回归(Ridge regression,也叫Tikhonov regularization)和最佳子集选择的关系,Lasso系数估计值(estimate)和软阈值(soft thresholding)之间的联系。它也揭示了当协变量共线时,Lasso系数估计值不一定唯一(类似标准线性回归)。

虽然最早是为应用最小二乘法而定义的算法,lasso正则化可以简单直接地拓展应用于许多统计学模型上,包括广义线性模型广义估计方程成比例灾难模型M-估计[3][4]。Lasso选择子集的能力依赖于限制条件的形式并且有多种表现形式,包括几何学贝叶斯统计,和凸分析

Lasso算法与基追踪降噪联系紧密。

历史来源[编辑]

Robert Tibshirani最初使用Lasso来提高预测的准确性与回归模型的可解释性,他修改了模型拟合的过程,在协变量中只选择一个子集应用到最终模型中,而非用上全部协变量。这是基于有着相似目的,但方法有所不同的Breiman的非负参数推断。

在Lasso之前,选择模型中协变量最常用的方法是移步选择,这种方法在某些情况下是准确的,例如一些协变量与模型输出值有强相关性情况。然而在另一些情况下,这种方法会让预测结果更差。在当时,岭回归是提高模型预测准确性最常用的方法。岭回归可以通过缩小大的回归系数来减少过拟合从而改善模型预测偏差。但是它并不选择协变量,所以对模型的准确构建和解释没有帮助。

Lasso结合了上述的两种方法,它通过强制让回归系数绝对值之和小于某固定值,即强制一些回归系数变为0,有效地选择了不包括这些回归系数对应的协变量的更简单的模型。这种方法和岭回归类似,在岭回归中,回归系数平方和被强制小于某定值,不同点在于岭回归只改变系数的值,而不把任何值设为0。

基本形式[编辑]

Lasso最初为了最小二乘法而被设计出来,Lasso的最小二乘法应用能够简单明了地展示Lasso的许多特性。

假设一个样本包括N种事件,每个事件包括p个协变量和一个输出值。让为输出值,并且为第i种情况的协变量向量,那么Lasso要计算的目标方程就是:

对所有 ,计算 [1]

这里 是一个决定规则化程度的预定的自由参数。 设协方差矩阵,那么 ,其中 的第 i 行,那么上式可以写成更紧凑的形式:

对所有 ,计算

这里 是标准 范数维的1的向量。

因为 ,所以有

对变量进行中心化是常用的数据处理方法。并且协方差一般规范化为 ,这样得到的解就不会依赖测量的规模。

它的目标方程还可以写为:

in the so-called Lagrangian form

where the exact relationship between and is data dependent.

Orthonormal covariates[编辑]

Some basic properties of the lasso estimator can now be considered.

Assuming first that the covariates are orthonormal so that , where is the inner product and is the Kronecker delta, or, equivalently, , then using subgradient methods it can be shown that

[1]

is referred to as the soft thresholding operator, since it translates values towards zero (making them exactly zero if they are small enough) instead of setting smaller values to zero and leaving larger ones untouched as the hard thresholding operator, often denoted , would.

This can be compared to ridge regression, where the objective is to minimize

yielding

So ridge regression shrinks all coefficients by a uniform factor of and does not set any coefficients to zero.

It can also be compared to regression with best subset selection, in which the goal is to minimize

where is the " norm", which is defined as if exactly m components of z are nonzero. In this case, it can be shown that

where is the so-called hard thresholding function and is an indicator function (it is 1 if its argument is true and 0 otherwise).

Therefore, the lasso estimates share features of the estimates from both ridge and best subset selection regression since they both shrink the magnitude of all the coefficients, like ridge regression, but also set some of them to zero, as in the best subset selection case. Additionally, while ridge regression scales all of the coefficients by a constant factor, lasso instead translates the coefficients towards zero by a constant value and sets them to zero if they reach it.

Correlated covariates[编辑]

Returning to the general case, in which the different covariates may not be independent, a special case may be considered in which two of the covariates, say j and k, are identical for each case, so that , where . Then the values of and that minimize the lasso objective function are not uniquely determined. In fact, if there is some solution in which , then if replacing by and by , while keeping all the other fixed, gives a new solution, so the lasso objective function then has a continuum of valid minimizers.[5] Several variants of the lasso, including the Elastic Net, have been designed to address this shortcoming, which are discussed below.


一般形式[编辑]

算法解释[编辑]

参见[编辑]

参考文献[编辑]

  1. ^ 1.0 1.1 1.2 Tibshirani, Robert. 1996. “Regression Shrinkage and Selection via the lasso”. Journal of the Royal Statistical Society. Series B (methodological) 58 (1). Wiley: 267–88. http://www.jstor.org/stable/2346178.
  2. ^ Breiman, Leo. Better Subset Regression Using the Nonnegative Garrote. Technometrics. 1995-11-01, 37 (4): 373–384. ISSN 0040-1706. doi:10.2307/1269730. 
  3. ^ Tibshirani, Robert. Regression Shrinkage and Selection via the Lasso. Journal of the Royal Statistical Society. Series B (Methodological). 1996, 58 (1): 267–288. 
  4. ^ Tibshirani, Robert. The Lasso Method for Variable Selection in the Cox Model. Statistics in Medicine. 1997-02-28, 16 (4): 385–395. ISSN 1097-0258. doi:10.1002/(sici)1097-0258(19970228)16:4%3C385::aid-sim380%3E3.0.co;2-3 (英语). 
  5. ^ 引用错误:没有为名为Zou 2005的参考文献提供内容