Safekipedia

Ridge regression

Discoverer · ages 10+Adapted from Wikipedia

Ridge regression, also known as Tikhonov regularization (named for Andrey Tikhonov), is a method for estimating the coefficients of multiple-regression models when the variables are highly correlated with one another. It has been used in many fields, including econometrics, chemistry, and engineering.

It is a widely used method of regularization for ill-posed problem inverse problems. It is especially helpful for reducing the problem of multicollinearity in linear regression, which often happens in models with large numbers of parameters. In general, the method gives better efficiency when estimating parameters, in exchange for a tolerable amount of bias (see bias–variance tradeoff).

The theory was first introduced by Hoerl and Kennard in 1970. They published it in two papers in the journal Technometrics: "Ridge regressions: biased estimation of nonorthogonal problems" and "Ridge regressions: applications in nonorthogonal problems."

Ridge regression was developed as a possible solution to the imprecision of least squares estimators when linear regression models have independent variables that are highly correlated with each other. By creating a ridge regression estimator (RR), it gives a more precise estimate of the ridge parameters. Its variance and mean square estimator are often smaller than those of the least squares estimators derived earlier.

Overview

When solving ordinary least squares problems, a near-singular moment matrix causes trouble. Adding positive numbers to the diagonals of the matrix fixes this and lowers its condition number. The ridge estimator has an extra term, λ𝐈, in its calculation. Here 𝐘 is the regressand or response vector, 𝐗 is the design matrix, 𝐈 is the identity matrix, and λ ≥ 0 is the ridge (or Tikhonov) regularization parameter, which shifts the diagonals of the moment matrix.

This estimator solves the least squares problem subject to the constraint 𝜷𝖳𝜷 = c. This can be written as a Lagrangian minimization, which shows that λ is the Lagrange multiplier of the constraint. There is a one-to-one relationship between c and λ. Since c is not known in practice, λ is set heuristically or found with additional data-fitting strategies, see Determination of the Tikhonov parameter below. As λ approaches 0, the constraint eventually becomes non-binding, and the ridge estimator approaches the minimum-norm ordinary least squares estimator, using the pseudoinverse of 𝐗.

Determination of the Tikhonov parameter

The best value of the regularization parameter λ is usually unknown, so it has to be estimated. A common way to choose it from the data is through cross-validation or a plug-in procedure. Grace Wahba proved that the best choice, in the sense of generalized cross-validation, makes a certain score as small as possible. That score uses the residual sum of squares and the effective number of degrees of freedom.

The plug-in method uses a formula for λ that depends on unknown values. In practice, these values are estimated using the usual least-squares results, which gives a "plug-in estimator." This approach can give predictions that are, on average, more accurate than the basic least-squares method. Other ways to choose the parameter include the discrepancy principle, the L-curve method, and restricted maximum likelihood.

History

Ridge regression was discovered in many different settings. It became well known through its use with integral equations, in the work of Andrey Tikhonov and David L. Phillips, so some authors call it Tikhonov–Phillips regularization. Arthur E. Hoerl studied the simpler, finite-dimensional case using a statistical approach, and Manus Foster described the method as a Wiener–Kolmogorov (Kriging) filter. Following Hoerl, statisticians call it ridge regression, named after a method called ridge analysis, where "ridge" refers to the path leading to the highest point under certain limits.

Tikhonov regularization for linear equations

Suppose we know a real matrix A and a vector 𝐛, and we want to find a vector 𝐱 so that A𝐱 = 𝐛. The vectors 𝐱 and 𝐛 may be different sizes, and A may not be square. The standard approach is ordinary least squares regression. However, if no 𝐱 works, or if more than one 𝐱 works, the problem is called ill posed. In these cases, ordinary least squares can lead to an overdetermined or underdetermined system of equations. Many real-world effects act like low-pass filters, so solving the problem backwards acts like a high-pass filter. This can amplify noise, because eigenvalues that were smallest in the forward direction become largest in reverse. Ordinary least squares tries to make the sum of squared residuals as small as possible, measured using the Euclidean norm.

To prefer a solution with good properties, a regularization term is added to this minimization, using a Tikhonov matrix Γ. Often Γ is a multiple of the identity matrix, which favors solutions with smaller norms. This is called L2 regularization. Sometimes other operators, such as a difference operator or a weighted Fourier operator, are used to encourage smoothness when the underlying values are expected to be mostly continuous. This makes the problem easier to solve directly. The answer can be written using augmented matrices, and for a complex matrix the transpose is replaced by the Hermitian transpose. L2 regularization is also used outside of linear regression, such as in classification with logistic regression or support vector machines, and in matrix factorization. Because Tikhonov regularization adds a simple term to the problem, it can even be applied after an unregularized fit, as long as the likelihood function can be approximated well and the change is small. For more general cases, the method can use a Mahalanobis distance, a covariance matrix, an expected value, a Cholesky factorization, and a whitening filter.

Lavrentyev regularization

In some situations, a method proposed by Mikhail Lavrentyev can avoid using the transpose of a matrix. For example, when a matrix is symmetric and positive definite, its inverse can be used to set up a weighted measure. This leads to a problem that is almost the same as the original one, apart from a constant term. The best answer to this problem can be written with a direct formula, and it is the same as the answer to the generalized Tikhonov problem.

The Lavrentyev regularization, when it can be used, works better than the original Tikhonov regularization. Its matrix can be better conditioned, which means it has a smaller condition number than the Tikhonov matrix.

Regularization in Hilbert space

Problems that are hard to solve accurately usually come from breaking integral equations into smaller, separate pieces. Tikhonov regularization can also be described in the original setting, which has infinitely many dimensions.

In this setting, A can be seen as a compact operator acting on Hilbert spaces, and x and b are elements in the domain and range of A. The combined operator is then a self-adjoint bounded invertible operator.

Relation to singular-value decomposition and Wiener filter

When the setting Γ=αI is used, this least-squares answer can be studied in a special way using singular-value decomposition, a mathematical way of breaking a table of numbers into simpler parts. This shows how the Tikhonov parameter α affects the condition number of the problem. For the more general case, a similar idea can be worked out using a generalized singular-value decomposition.

The method is also related to the Wiener filter. Its answer is built as a sum over the rank of the matrix A, with weights that depend on the singular values and on α.

Relation to probabilistic formulation

When all the uncertainties follow a bell-shaped pattern (called Gaussian), the probabilistic form of an inverse problem uses grids of numbers that describe how uncertain the model parameters and the observed values are. In a simple special case, where these grids are diagonal and the same in every direction, the equations of inverse theory become the equations described above. In that case, α is the ratio of the two uncertainty sizes.

Main article: Bayesian interpretation of regularization

Further information: Minimum mean square error § Linear MMSE estimator for linear observation process

At first, the choice of answer to this regularized problem may seem made up, and the matrix Γ does seem rather arbitrary. But the method can be explained from a Bayesian point of view. For a problem like this, some extra assumptions must be added to get one unique answer. Statistically, the prior probability distribution of x is sometimes taken to be a multivariate normal distribution. To keep things simple, these assumptions are made: the averages are zero, the parts are independent, and they have the same standard deviation σx. The data also contain errors, which are assumed to be independent, with zero average 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.

If the assumption of normality is replaced with assumptions of homoscedasticity and uncorrelated errors, and zero average is still assumed, then the Gauss–Markov theorem shows that the solution is the minimal unbiased linear estimator.

Quiz time!

5 questions about Ridge regression

Question 1 of 5

What is ridge regression especially helpful for?

Keep exploring

This article is a child-friendly adaptation of the Wikipedia article on Ridge regression, available under CC BY-SA 4.0.