Ridge regression

From testwiki
Jump to navigation Jump to search

Template:Short description Template:Regression bar Ridge regression (also known as Tikhonov regularization, named for Andrey Tikhonov) is a method of estimating the coefficients of multiple-regression models in scenarios where the variables are highly correlated.[1] It has been used in many fields including econometrics, chemistry, and engineering.[2] It is a widely used method of regularization of ill-posed problem inverse problems.Template:Efn It is particularly useful to mitigate the problem of multicollinearity in linear regression, which commonly occurs in models with large numbers of parameters.[3] In general, the method provides improved efficiency in parameter estimation problems in exchange for a tolerable amount of bias (see bias–variance tradeoff).[4]

The theory was first introduced by Hoerl and Kennard in 1970 in their Technometrics papers "Ridge regressions: biased estimation of nonorthogonal problems" and "Ridge regressions: applications in nonorthogonal problems".[5][6][1]

Ridge regression was developed as a possible solution to the imprecision of least square estimators when linear regression models have some multicollinear (highly correlated) independent variablesβ€”by creating a ridge regression estimator (RR). This provides a more precise ridge parameters estimate, as its variance and mean square estimator are often smaller than the least square estimators previously derived.[7][2]

Overview

In the ordinary least squares solution of

𝐘=π—πœ·+𝜺,

the problem of a near-singular moment matrix 𝐗𝖳𝐗 is alleviated by adding positive elements to the diagonals, thereby decreasing its condition number. Compared to the ordinary least squares estimator, the simple ridge estimator has an extra term λ𝐈 in the denominator: πœ·Μ‚Ξ»=(𝐗𝖳𝐗+λ𝐈)βˆ’1π—π–³π˜ where 𝐘 is the regressand or response vector, 𝐗 is the design matrix, 𝐈 is the identity matrix, and the ridge (or Tikhonov) regularization parameter Ξ»β‰₯0 serves as the constant shifting the diagonals of the moment matrix.[8] It can be shown that this estimator is the solution to the least squares problem subject to the constraint πœ·π–³πœ·=c, which can be expressed as a Lagrangian minimization: argminπœ·β€–π˜βˆ’π—πœ·β€–2+Ξ»(πœ·π–³πœ·βˆ’c) which shows that Ξ» is nothing but the Lagrange multiplier of the constraint.[9] In fact, there is a one-to-one relationship between c and Ξ» and since, in practice, we do not know c, we define Ξ» heuristically or find it via additional data-fitting strategies, see Determination of the Tikhonov parameter below.

Note that as λ↓0, the constraint eventually becomes non-binding, and the ridge estimator converges to the minimum-norm ordinary least squares estimator, here denoted as πœ·Μ‚=πœ·Μ‚0:

limλ↓0πœ·Μ‚Ξ»=𝐗+𝐘=πœ·Μ‚0, with 𝐗+ denoting the pseudoinverse of 𝐗.

Determination of the Tikhonov parameter

The optimal regularization parameter Ξ» is usually unknown and in practice needs to be estimated. Typically, a data-driven choice for the Tikhonov regularization parameter Ξ» is accomplished either via cross-validation, or via a plug-in procedure, as follows.

Generalized cross-validation estimator

A common data-driven choice for Ξ» is the minimizer of the cross-validation loss or its generalizations. For example, Grace Wahba proved that the optimal parameter, in the sense of generalized cross-validation minimizes[10][11]

G=RSSΟ„2=β€–π—πœ·Μ‚βˆ’π˜β€–2[tr⁡(πˆβˆ’π—(𝐗𝖳𝐗+Ξ»2𝐈)βˆ’1𝐗𝖳)]2, where RSS is the residual sum of squares, and Ο„ is the effective number of degrees of freedom.

Plug-in estimator

Assume that 𝐗 is an nΓ—p matrix and define the matrix Ξ©:=(π—βŠ€π—/n)+. Then, consider the following choice for the Tikhonov regularization parameter:

Ξ»βˆ—:=Ο‚2tr(Ξ©)𝜷⊀Ω𝜷+3Ο‚2tr(Ξ©2)/n,

where Ο‚2 is the variance of the noise 𝜺=π˜βˆ’π—πœ·, that is, Var(𝜺)=Ο‚2𝐈. It can be shown[12] that the ridge estimator πœ·Μ‚Ξ»βˆ— enjoys smaller expected in-sample risk than the minimum-norm least-squares estimator πœ·Μ‚0=𝐗+𝐘. More precisely,

π”Όβ€–π˜′βˆ’π—πœ·Μ‚0β€–2β‰₯π”Όβ€–π˜′βˆ’π—πœ·Μ‚Ξ»βˆ—β€–2+Ο‚2nΞ»βˆ—tr(Ξ©),

where the expectations treat 𝐗 as fixed and 𝐘′ is test response data, independent from 𝐘 (and hence independent from the estimators πœ·Μ‚0 and πœ·Μ‚Ξ»βˆ—).

Of course, in practice the formula for Ξ»βˆ— is used by plugging in statistical estimators for the unknown parameters 𝜷 and Ο‚2. When n>p, the most natural estimators for these parameters are the usual least-squares ones:

πœ·Μ‚=𝐗+𝐘,Ο‚Μ‚2=β€–π˜βˆ’π—πœ·Μ‚β€–2nβˆ’p. Replacing the unknown 𝜷,Ο‚2 in the formula for Ξ»βˆ— with the corresponding πœ·Μ‚,Ο‚Μ‚2 thus gives the so-called plug-in estimator Ξ»^βˆ— for the optimal Ξ»βˆ—.


Alternative approaches to the data-driven selection of the Tikhonov regularization parameter include the discrepancy principle, L-curve method,[13] restricted maximum likelihood.

History

Tikhonov regularization was invented independently in many different contexts. It became widely known through its application to integral equations in the works of Andrey Tikhonov[14][15][16][17][18] and David L. Phillips.[19] Some authors use the term Tikhonov–Phillips regularization. The finite-dimensional case was expounded by Arthur E. Hoerl, who took a statistical approach,[20] and by Manus Foster, who interpreted this method as a Wiener–Kolmogorov (Kriging) filter.[21] Following Hoerl, it is known in the statistical literature as ridge regression,[22] named after ridge analysis ("ridge" refers to the path from the constrained maximum).[23]

Tikhonov regularization for linear equations

Suppose that for a known real matrix A and vector 𝐛, we wish to find a vector 𝐱 such that A𝐱=𝐛, where 𝐱 and 𝐛 may be of different sizes and A may even be non-square.

The standard approach is ordinary least squares linear regression.Template:Clarify However, if no 𝐱 satisfies the equation or more than one 𝐱 doesβ€”that is, the solution is not uniqueβ€”the problem is said to be ill posed. In such cases, ordinary least squares estimation leads to an overdetermined, or more often an underdetermined system of equations. Most real-world phenomena have the effect of low-pass filtersTemplate:Clarify in the forward direction where A maps 𝐱 to 𝐛. Therefore, in solving the inverse-problem, the inverse mapping operates as a high-pass filter that has the undesirable tendency of amplifying noise (eigenvalues / singular values are largest in the reverse mapping where they were smallest in the forward mapping). In addition, ordinary least squares implicitly nullifies every element of the reconstructed version of 𝐱 that is in the null-space of A, rather than allowing for a model to be used as a prior for 𝐱. Ordinary least squares seeks to minimize the sum of squared residuals, which can be compactly written as β€–Aπ±βˆ’π›β€–22, where β€–β‹…β€–2 is the Euclidean norm.

In order to give preference to a particular solution with desirable properties, a regularization term can be included in this minimization: β€–Aπ±βˆ’π›β€–22+‖Γ𝐱‖22=β€–π’œπ±βˆ’π’·β€–22, where π’œ=(AΞ“) and 𝒷=(𝐛0), for some suitably chosen Tikhonov matrix Ξ“. In many cases, this matrix is chosen as a scalar multiple of the identity matrix (Ξ“=Ξ±I), giving preference to solutions with smaller norms; this is known as Template:Math regularization.[24] In other cases, high-pass operators (e.g., a difference operator or a weighted Fourier operator) may be used to enforce smoothness if the underlying vector is believed to be mostly continuous. This regularization improves the conditioning of the problem, thus enabling a direct numerical solution. Treating it as an ordinary least squares problem with augmented matrices π’œ and 𝒷, the solution is 𝐱̂=(π’œπ–³π’œ)βˆ’1π’œπ–³π’·=(A𝖳A+Γ𝖳Γ)βˆ’1A𝖳𝐛. The effect of regularization may be varied by the scale of the matrix Ξ“. For Ξ“=0 this reduces to the unregularized least-squares solution, provided that (ATA)βˆ’1 exists. Note that in case of a complex matrix A, as usual the transpose A𝖳 has to be replaced by the Hermitian transpose A𝖧.

Template:Math regularization is used in many contexts aside from linear regression, such as classification with logistic regression or support vector machines,[25] and matrix factorization.[26]

Application to existing fit results

Since Tikhonov Regularization simply adds a quadratic term to the objective function in optimization problems, it is possible to do so after the unregularised optimisation has taken place. E.g., if the above problem with Ξ“=0 yields the solution 𝐱̂0, the solution in the presence of Ξ“β‰ 0 can be expressed as: 𝐱̂=B𝐱̂0, with the "regularisation matrix" B=(A𝖳A+Γ𝖳Γ)βˆ’1A𝖳A.

If the parameter fit comes with a covariance matrix of the estimated parameter uncertainties V0, then the regularisation matrix will be B=(V0βˆ’1+Γ𝖳Γ)βˆ’1V0βˆ’1, and the regularised result will have a new covariance V=BV0B𝖳.

In the context of arbitrary likelihood fits, this is valid, as long as the quadratic approximation of the likelihood function is valid. This means that, as long as the perturbation from the unregularised result is small, one can regularise any result that is presented as a best fit point with a covariance matrix. No detailed knowledge of the underlying likelihood function is needed.[27]

Generalized Tikhonov regularization

For general multivariate normal distributions for 𝐱 and the data error, one can apply a transformation of the variables to reduce to the case above. Equivalently, one can seek an 𝐱 to minimize β€–Aπ±βˆ’π›β€–P2+β€–π±βˆ’π±0β€–Q2, where we have used ‖𝐱‖Q2 to stand for the weighted norm squared 𝐱𝖳Q𝐱 (compare with the Mahalanobis distance). In the Bayesian interpretation P is the inverse covariance matrix of 𝐛, 𝐱0 is the expected value of 𝐱, and Q is the inverse covariance matrix of 𝐱.

The Tikhonov matrix is not explicitly included because the corresponding regularization term β€–Ξ“π±βˆ’π±0′β€–Q′2 reduces to above with Γ𝐱0=𝐱0′ and Q=Ξ“TQ′Ξ“. For normal regularization where Q′=I, the Tikhonov matrix then appears in the Cholesky factorization Q=Γ𝖳Γ and is considered a whitening filter.

This generalized problem has an optimal solution 𝐱̂ which can be written explicitly using the formula 𝐱̂=(A𝖳PA+Q)βˆ’1(A𝖳P𝐛+Q𝐱0)=𝐱0+(A𝖳PA+Q)βˆ’1(A𝖳P(π›βˆ’A𝐱0)).

Lavrentyev regularization

In some situations, one can avoid using the transpose A𝖳, as proposed by Mikhail Lavrentyev.[28] For example, if A is symmetric positive definite, i.e. A=A𝖳>0, so is its inverse Aβˆ’1, which can thus be used to set up the weighted norm squared ‖𝐱‖P2=𝐱𝖳Aβˆ’1𝐱 in the generalized Tikhonov regularization, leading to minimizing β€–Aπ±βˆ’π›β€–Aβˆ’12+β€–π±βˆ’π±0β€–Q2 or, equivalently up to a constant term, 𝐱𝖳(A+Q)π±βˆ’2𝐱𝖳(𝐛+Q𝐱0).

This minimization problem has an optimal solution π±βˆ— which can be written explicitly using the formula π±βˆ—=(A+Q)βˆ’1(𝐛+Q𝐱0), which is nothing but the solution of the generalized Tikhonov problem where A=A𝖳=Pβˆ’1.

The Lavrentyev regularization, if applicable, is advantageous to the original Tikhonov regularization, since the Lavrentyev matrix A+Q can be better conditioned, i.e., have a smaller condition number, compared to the Tikhonov matrix A𝖳A+Γ𝖳Γ.

Regularization in Hilbert space

Typically discrete linear ill-conditioned problems result from discretization of integral equations, and one can formulate a Tikhonov regularization in the original infinite-dimensional context. In the above we can interpret A as a compact operator on Hilbert spaces, and x and b as elements in the domain and range of A. The operator Aβˆ—A+Γ𝖳Γ is then a self-adjoint bounded invertible operator.

Relation to singular-value decomposition and Wiener filter

With Ξ“=Ξ±I, this least-squares solution can be analyzed in a special way using the singular-value decomposition. Given the singular value decomposition A=UΞ£V𝖳 with singular values Οƒi, the Tikhonov regularized solution can be expressed as xΜ‚=VDU𝖳b, where D has diagonal values Dii=ΟƒiΟƒi2+Ξ±2 and is zero elsewhere. This demonstrates the effect of the Tikhonov parameter on the condition number of the regularized problem. For the generalized case, a similar representation can be derived using a generalized singular-value decomposition.[29]

Finally, it is related to the Wiener filter: xΜ‚=βˆ‘i=1qfiui𝖳bΟƒivi, where the Wiener weights are fi=Οƒi2Οƒi2+Ξ±2 and q is the rank of A.

Relation to probabilistic formulation

The probabilistic formulation of an inverse problem introduces (when all uncertainties are Gaussian) a covariance matrix CM representing the a priori uncertainties on the model parameters, and a covariance matrix CD representing the uncertainties on the observed parameters.[30] In the special case when these two matrices are diagonal and isotropic, CM=ΟƒM2I and CD=ΟƒD2I, and, in this case, the equations of inverse theory reduce to the equations above, with Ξ±=ΟƒD/ΟƒM.[31][32]

Bayesian interpretation

Template:Main Template:Further Although at first the choice of the solution to this regularized problem may look artificial, and indeed the matrix Ξ“ seems rather arbitrary, the process can be justified from a Bayesian point of view.[33] Note that for an ill-posed problem one must necessarily introduce some additional assumptions in order to get a unique solution. Statistically, the prior probability distribution of x is sometimes taken to be a multivariate normal distribution.[34] For simplicity here, the following assumptions are made: the means are zero; their components are independent; the components have the same standard deviation Οƒx. The data are also subject to errors, and the errors in b are also assumed to be independent with zero mean and standard deviation Οƒb. Under these assumptions the Tikhonov-regularized solution is the most probable solution given the data and the a priori distribution of x, according to Bayes' theorem.[35]

If the assumption of normality is replaced by assumptions of homoscedasticity and uncorrelatedness of errors, and if one still assumes zero mean, then the Gauss–Markov theorem entails that the solution is the minimal unbiased linear estimator.[36]

See also

Notes

Template:Notelist

References

Template:Reflist

Further reading

Template:Least squares and regression analysis Template:Authority control