Ridge regression

Last updated

Ridge regression is a method of estimating the coefficients of multiple-regression models in scenarios where the independent variables are highly correlated. [1] It has been used in many fields including econometrics, chemistry, and engineering. [2] Also known as Tikhonov regularization, named for Andrey Tikhonov, it is a method of regularization of ill-posed problems. [lower-alpha 1] 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]

Contents

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] This was the result of ten years of research into the field of ridge analysis. [7]

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. [8] [2]

Overview

In the simplest case, the problem of a near-singular moment matrix is alleviated by adding positive elements to the diagonals, thereby decreasing its condition number. Analogous to the ordinary least squares estimator, the simple ridge estimator is then given by

where is the regressand, is the design matrix, is the identity matrix, and the ridge parameter serves as the constant shifting the diagonals of the moment matrix. [9] It can be shown that this estimator is the solution to the least squares problem subject to the constraint , which can be expressed as a Lagrangian:

which shows that is nothing but the Lagrange multiplier of the constraint. [10] Typically, is chosen according to a heuristic criterion, so that the constraint will not be satisfied exactly. Specifically in the case of , in which the constraint is non-binding, the ridge estimator reduces to ordinary least squares. A more general approach to Tikhonov regularization is discussed below.

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 [11] [12] [13] [14] [15] and David L. Phillips. [16] Some authors use the term Tikhonov–Phillips regularization. The finite-dimensional case was expounded by Arthur E. Hoerl, who took a statistical approach, [17] and by Manus Foster, who interpreted this method as a Wiener–Kolmogorov (Kriging) filter. [18] Following Hoerl, it is known in the statistical literature as ridge regression, [19] named after ridge analysis ("ridge" refers to the path from the constrained maximum). [20]

Tikhonov regularization

Suppose that for a known matrix and vector , we wish to find a vector such that

where and may be of different sizes and may be non-square.

The standard approach is ordinary least squares linear regression.[ clarification needed ] 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 filters [ clarification needed ] in the forward direction where 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 , 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

where 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:

for some suitably chosen Tikhonov matrix. In many cases, this matrix is chosen as a scalar multiple of the identity matrix (), giving preference to solutions with smaller norms; this is known as L2 regularization. [21] 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. An explicit solution, denoted by , is given by

The effect of regularization may be varied by the scale of matrix . For this reduces to the unregularized least-squares solution, provided that (ATA)−1 exists.

L2 regularization is used in many contexts aside from linear regression, such as classification with logistic regression or support vector machines, [22] and matrix factorization. [23]

Application to existing fit results

Since Tikhonov Regularisation 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 yields the solution , the solution in the presence of can be expressed as:

with the "regularisation matrix" .

If the parameter fit comes with a covariance matrix of the estimated parameter uncertainties , then the regularisation matrix will be

and the regularised result will have a new covariance

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. [24]

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

where we have used to stand for the weighted norm squared (compare with the Mahalanobis distance). In the Bayesian interpretation is the inverse covariance matrix of , is the expected value of , and is the inverse covariance matrix of . The Tikhonov matrix is then given as a factorization of the matrix (e.g. the Cholesky factorization) and is considered a whitening filter.

This generalized problem has an optimal solution which can be written explicitly using the formula

or equivalently, when Q is not a null matrix:

Lavrentyev regularization

In some situations, one can avoid using the transpose , as proposed by Mikhail Lavrentyev. [25] For example, if is symmetric positive definite, i.e. , so is its inverse , which can thus be used to set up the weighted norm squared in the generalized Tikhonov regularization, leading to minimizing

or, equivalently up to a constant term,

This minimization problem has an optimal solution which can be written explicitly using the formula

which is nothing but the solution of the generalized Tikhonov problem where

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

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 as a compact operator on Hilbert spaces, and and as elements in the domain and range of . The operator is then a self-adjoint bounded invertible operator.

Relation to singular-value decomposition and Wiener filter

With , this least-squares solution can be analyzed in a special way using the singular-value decomposition. Given the singular value decomposition

with singular values , the Tikhonov regularized solution can be expressed as

where has diagonal values

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. [26]

Finally, it is related to the Wiener filter:

where the Wiener weights are and is the rank of .

Determination of the Tikhonov factor

The optimal regularization parameter is usually unknown and often in practical problems is determined by an ad hoc method. A possible approach relies on the Bayesian interpretation described below. Other approaches include the discrepancy principle, cross-validation, L-curve method, [27] restricted maximum likelihood and unbiased predictive risk estimator. Grace Wahba proved that the optimal parameter, in the sense of leave-one-out cross-validation minimizes [28] [29]

where is the residual sum of squares, and is the effective number of degrees of freedom.

Using the previous SVD decomposition, we can simplify the above expression:

and

Relation to probabilistic formulation

The probabilistic formulation of an inverse problem introduces (when all uncertainties are Gaussian) a covariance matrix representing the a priori uncertainties on the model parameters, and a covariance matrix representing the uncertainties on the observed parameters. [30] In the special case when these two matrices are diagonal and isotropic, and , and, in this case, the equations of inverse theory reduce to the equations above, with .

Bayesian interpretation

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. [31] 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 is sometimes taken to be a multivariate normal distribution. For simplicity here, the following assumptions are made: the means are zero; their components are independent; the components have the same standard deviation . The data are also subject to errors, and the errors in are also assumed to be independent with zero mean and standard deviation . Under these assumptions the Tikhonov-regularized solution is the most probable solution given the data and the a priori distribution of , according to Bayes' theorem. [32]

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. [33]

See also

Notes

  1. In statistics, the method is known as ridge regression, in machine learning it and its modifications are known as weight decay, and with multiple independent discoveries, it is also variously known as the Tikhonov–Miller method, the Phillips–Twomey method, the constrained linear inversion method, L2 regularization, and the method of linear regularization. It is related to the Levenberg–Marquardt algorithm for non-linear least-squares problems.

Related Research Articles

<span class="mw-page-title-main">Pauli matrices</span> Matrices important in quantum mechanics and the study of spin

In mathematical physics and mathematics, the Pauli matrices are a set of three 2 × 2 complex matrices that are Hermitian, involutory and unitary. Usually indicated by the Greek letter sigma, they are occasionally denoted by tau when used in connection with isospin symmetries.

<span class="mw-page-title-main">Least squares</span> Approximation method in statistics

The method of least squares is a parameter estimation method in regression analysis based on minimizing the sum of the squares of the residuals made in the results of each individual equation.

In statistics, maximum likelihood estimation (MLE) is a method of estimating the parameters of an assumed probability distribution, given some observed data. This is achieved by maximizing a likelihood function so that, under the assumed statistical model, the observed data is most probable. The point in the parameter space that maximizes the likelihood function is called the maximum likelihood estimate. The logic of maximum likelihood is both intuitive and flexible, and as such the method has become a dominant means of statistical inference.

<span class="mw-page-title-main">Projection (linear algebra)</span> Idempotent linear transformation from a vector space to itself

In linear algebra and functional analysis, a projection is a linear transformation from a vector space to itself such that . That is, whenever is applied twice to any vector, it gives the same result as if it were applied once. It leaves its image unchanged. This definition of "projection" formalizes and generalizes the idea of graphical projection. One can also consider the effect of a projection on a geometrical object by examining the effect of the projection on points in the object.

In physics, the Hamilton–Jacobi equation, named after William Rowan Hamilton and Carl Gustav Jacob Jacobi, is an alternative formulation of classical mechanics, equivalent to other formulations such as Newton's laws of motion, Lagrangian mechanics and Hamiltonian mechanics.

In statistics, the theory of minimum norm quadratic unbiased estimation (MINQUE) was developed by C. R. Rao. MINQUE is a theory alongside other estimation methods in estimation theory, such as the method of moments or maximum likelihood estimation. Similar to the theory of best linear unbiased estimation, MINQUE is specifically concerned with linear regression models. The method was originally conceived to estimate heteroscedastic error variance in multiple linear regression. MINQUE estimators also provide an alternative to maximum likelihood estimators or restricted maximum likelihood estimators for variance components in mixed effects models. MINQUE estimators are quadratic forms of the response variable and are used to estimate a linear function of the variances.

In statistics, ordinary least squares (OLS) is a type of linear least squares method for choosing the unknown parameters in a linear regression model by the principle of least squares: minimizing the sum of the squares of the differences between the observed dependent variable in the input dataset and the output of the (linear) function of the independent variable.

<span class="mw-page-title-main">Regularization (mathematics)</span> Technique to make a model more generalizable and transferable

In mathematics, statistics, finance, computer science, particularly in machine learning and inverse problems, regularization is a process that changes the result answer to be "simpler". It is often used to obtain results for ill-posed problems or to prevent overfitting.

In mathematics and economics, transportation theory or transport theory is a name given to the study of optimal transportation and allocation of resources. The problem was formalized by the French mathematician Gaspard Monge in 1781.

Bayesian linear regression is a type of conditional modeling in which the mean of one variable is described by a linear combination of other variables, with the goal of obtaining the posterior probability of the regression coefficients and ultimately allowing the out-of-sample prediction of the regressandconditional on observed values of the regressors. The simplest and most widely used version of this model is the normal linear model, in which given is distributed Gaussian. In this model, and under a particular choice of prior probabilities for the parameters—so-called conjugate priors—the posterior can be found analytically. With more arbitrarily chosen priors, the posteriors generally have to be approximated.

In statistics, Bayesian multivariate linear regression is a Bayesian approach to multivariate linear regression, i.e. linear regression where the predicted outcome is a vector of correlated random variables rather than a single scalar random variable. A more general treatment of this approach can be found in the article MMSE estimator.

Non-linear least squares is the form of least squares analysis used to fit a set of m observations with a model that is non-linear in n unknown parameters (m ≥ n). It is used in some forms of nonlinear regression. The basis of the method is to approximate the model by a linear one and to refine the parameters by successive iterations. There are many similarities to linear least squares, but also some significant differences. In economic theory, the non-linear least squares method is applied in (i) the probit regression, (ii) threshold regression, (iii) smooth regression, (iv) logistic link regression, (v) Box–Cox transformed regressors ().

In statistics, principal component regression (PCR) is a regression analysis technique that is based on principal component analysis (PCA). More specifically, PCR is used for estimating the unknown regression coefficients in a standard linear regression model.

<span class="mw-page-title-main">Normal-inverse-gamma distribution</span>

In probability theory and statistics, the normal-inverse-gamma distribution is a four-parameter family of multivariate continuous probability distributions. It is the conjugate prior of a normal distribution with unknown mean and variance.

<span class="mw-page-title-main">Stokes' theorem</span> Theorem in vector calculus

Stokes' theorem, also known as the Kelvin–Stokes theorem after Lord Kelvin and George Stokes, the fundamental theorem for curls or simply the curl theorem, is a theorem in vector calculus on . Given a vector field, the theorem relates the integral of the curl of the vector field over some surface, to the line integral of the vector field around the boundary of the surface. The classical theorem of Stokes can be stated in one sentence: The line integral of a vector field over a loop is equal to the surface integral of its curl over the enclosed surface. It is illustrated in the figure, where the direction of positive circulation of the bounding contour ∂Σ, and the direction n of positive flux through the surface Σ, are related by a right-hand-rule. For the right hand the fingers circulate along ∂Σ and the thumb is directed along n.

Linear least squares (LLS) is the least squares approximation of linear functions to data. It is a set of formulations for solving statistical problems involved in linear regression, including variants for ordinary (unweighted), weighted, and generalized (correlated) residuals. Numerical methods for linear least squares include inverting the matrix of the normal equations and orthogonal decomposition methods.

In statistics, the matrix t-distribution is the generalization of the multivariate t-distribution from vectors to matrices. The matrix t-distribution shares the same relationship with the multivariate t-distribution that the matrix normal distribution shares with the multivariate normal distribution. For example, the matrix t-distribution is the compound distribution that results from sampling from a matrix normal distribution having sampled the covariance matrix of the matrix normal from an inverse Wishart distribution.

De-sparsified lasso contributes to construct confidence intervals and statistical tests for single or low-dimensional components of a large parameter vector in high-dimensional model.

<span class="mw-page-title-main">Manifold regularization</span>

In machine learning, Manifold regularization is a technique for using the shape of a dataset to constrain the functions that should be learned on that dataset. In many machine learning problems, the data to be learned do not cover the entire input space. For example, a facial recognition system may not need to classify any possible image, but only the subset of images that contain faces. The technique of manifold learning assumes that the relevant subset of data comes from a manifold, a mathematical structure with useful properties. The technique also assumes that the function to be learned is smooth: data with different labels are not likely to be close together, and so the labeling function should not change quickly in areas where there are likely to be many data points. Because of this assumption, a manifold regularization algorithm can use unlabeled data to inform where the learned function is allowed to change quickly and where it is not, using an extension of the technique of Tikhonov regularization. Manifold regularization algorithms can extend supervised learning algorithms in semi-supervised learning and transductive learning settings, where unlabeled data are available. The technique has been used for applications including medical imaging, geographical imaging, and object recognition.

The quaternion estimator algorithm (QUEST) is an algorithm designed to solve Wahba's problem, that consists of finding a rotation matrix between two coordinate systems from two sets of observations sampled in each system respectively. The key idea behind the algorithm is to find an expression of the loss function for the Wahba's problem as a quadratic form, using the Cayley–Hamilton theorem and the Newton–Raphson method to efficiently solve the eigenvalue problem and construct a numerically stable representation of the solution.

References

  1. 1 2 Hilt, Donald E.; Seegrist, Donald W. (1977). Ridge, a computer program for calculating ridge regression estimates. doi:10.5962/bhl.title.68934.[ page needed ]
  2. 1 2 Gruber, Marvin (1998). Improving Efficiency by Shrinkage: The James--Stein and Ridge Regression Estimators. CRC Press. p. 2. ISBN   978-0-8247-0156-7.
  3. Kennedy, Peter (2003). A Guide to Econometrics (Fifth ed.). Cambridge: The MIT Press. pp. 205–206. ISBN   0-262-61183-X.
  4. Gruber, Marvin (1998). Improving Efficiency by Shrinkage: The James–Stein and Ridge Regression Estimators. Boca Raton: CRC Press. pp. 7–15. ISBN   0-8247-0156-9.
  5. Hoerl, Arthur E.; Kennard, Robert W. (1970). "Ridge Regression: Biased Estimation for Nonorthogonal Problems". Technometrics. 12 (1): 55–67. doi:10.2307/1267351. JSTOR   1267351.
  6. Hoerl, Arthur E.; Kennard, Robert W. (1970). "Ridge Regression: Applications to Nonorthogonal Problems". Technometrics. 12 (1): 69–82. doi:10.2307/1267352. JSTOR   1267352.
  7. Beck, James Vere; Arnold, Kenneth J. (1977). Parameter Estimation in Engineering and Science. James Beck. p. 287. ISBN   978-0-471-06118-2.
  8. Jolliffe, I. T. (2006). Principal Component Analysis. Springer Science & Business Media. p. 178. ISBN   978-0-387-22440-4.
  9. For the choice of in practice, see Khalaf, Ghadban; Shukur, Ghazi (2005). "Choosing Ridge Parameter for Regression Problems". Communications in Statistics – Theory and Methods . 34 (5): 1177–1182. doi:10.1081/STA-200056836. S2CID   122983724.
  10. van Wieringen, Wessel (2021-05-31). "Lecture notes on ridge regression". arXiv: 1509.09169 [stat.ME].
  11. Tikhonov, Andrey Nikolayevich (1943). "Об устойчивости обратных задач" [On the stability of inverse problems]. Doklady Akademii Nauk SSSR . 39 (5): 195–198. Archived from the original on 2005-02-27.
  12. Tikhonov, A. N. (1963). "О решении некорректно поставленных задач и методе регуляризации". Doklady Akademii Nauk SSSR. 151: 501–504.. Translated in "Solution of incorrectly formulated problems and the regularization method". Soviet Mathematics. 4: 1035–1038.
  13. Tikhonov, A. N.; V. Y. Arsenin (1977). Solution of Ill-posed Problems. Washington: Winston & Sons. ISBN   0-470-99124-0.
  14. Tikhonov, Andrey Nikolayevich; Goncharsky, A.; Stepanov, V. V.; Yagola, Anatolij Grigorevic (30 June 1995). Numerical Methods for the Solution of Ill-Posed Problems. Netherlands: Springer Netherlands. ISBN   0-7923-3583-X . Retrieved 9 August 2018.
  15. Tikhonov, Andrey Nikolaevich; Leonov, Aleksandr S.; Yagola, Anatolij Grigorevic (1998). Nonlinear ill-posed problems. London: Chapman & Hall. ISBN   0-412-78660-5 . Retrieved 9 August 2018.
  16. Phillips, D. L. (1962). "A Technique for the Numerical Solution of Certain Integral Equations of the First Kind". Journal of the ACM. 9: 84–97. doi: 10.1145/321105.321114 . S2CID   35368397.
  17. Hoerl, Arthur E. (1962). "Application of Ridge Analysis to Regression Problems". Chemical Engineering Progress. 58 (3): 54–59.
  18. Foster, M. (1961). "An Application of the Wiener-Kolmogorov Smoothing Theory to Matrix Inversion". Journal of the Society for Industrial and Applied Mathematics. 9 (3): 387–392. doi:10.1137/0109031.
  19. Hoerl, A. E.; R. W. Kennard (1970). "Ridge regression: Biased estimation for nonorthogonal problems". Technometrics. 12 (1): 55–67. doi:10.1080/00401706.1970.10488634.
  20. Hoerl, Roger W. (2020-10-01). "Ridge Regression: A Historical Context". Technometrics. 62 (4): 420–425. doi:10.1080/00401706.2020.1742207. ISSN   0040-1706.
  21. Ng, Andrew Y. (2004). Feature selection, L1 vs. L2 regularization, and rotational invariance (PDF). Proc. ICML.
  22. R.-E. Fan; K.-W. Chang; C.-J. Hsieh; X.-R. Wang; C.-J. Lin (2008). "LIBLINEAR: A library for large linear classification". Journal of Machine Learning Research . 9: 1871–1874.
  23. Guan, Naiyang; Tao, Dacheng; Luo, Zhigang; Yuan, Bo (2012). "Online nonnegative matrix factorization with robust stochastic approximation". IEEE Transactions on Neural Networks and Learning Systems. 23 (7): 1087–1099. doi:10.1109/TNNLS.2012.2197827. PMID   24807135. S2CID   8755408.
  24. Koch, Lukas (2022). "Post-hoc regularisation of unfolded cross-section measurements". Journal of Instrumentation. 17 (10): P10021. arXiv: 2207.02125 . doi:10.1088/1748-0221/17/10/P10021.
  25. Lavrentiev, M. M. (1967). Some Improperly Posed Problems of Mathematical Physics. New York: Springer.
  26. Hansen, Per Christian (Jan 1, 1998). Rank-Deficient and Discrete Ill-Posed Problems: Numerical Aspects of Linear Inversion (1st ed.). Philadelphia, USA: SIAM. ISBN   978-0-89871-403-6.
  27. P. C. Hansen, "The L-curve and its use in the numerical treatment of inverse problems",
  28. Wahba, G. (1990). "Spline Models for Observational Data". CBMS-NSF Regional Conference Series in Applied Mathematics. Society for Industrial and Applied Mathematics. Bibcode:1990smod.conf.....W.
  29. Golub, G.; Heath, M.; Wahba, G. (1979). "Generalized cross-validation as a method for choosing a good ridge parameter" (PDF). Technometrics. 21 (2): 215–223. doi:10.1080/00401706.1979.10489751.
  30. Tarantola, Albert (2005). Inverse Problem Theory and Methods for Model Parameter Estimation (1st ed.). Philadelphia: Society for Industrial and Applied Mathematics (SIAM). ISBN   0-89871-792-2 . Retrieved 9 August 2018.
  31. Greenberg, Edward; Webster, Charles E. Jr. (1983). Advanced Econometrics: A Bridge to the Literature. New York: John Wiley & Sons. pp. 207–213. ISBN   0-471-09077-8.
  32. Vogel, Curtis R. (2002). Computational methods for inverse problems. Philadelphia: Society for Industrial and Applied Mathematics. ISBN   0-89871-550-4.
  33. Amemiya, Takeshi (1985). Advanced Econometrics . Harvard University Press. pp.  60–61. ISBN   0-674-00560-0.

Further reading