ArticleslgStudy

mathematics

Regularized least squares

Regularized least squares is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Regularized least squares rather than just read about it. In short: Regularized least squares (RLS) is a family of methods for solving the least-squares problem while using regularization to further constrain the resulting solution. RLS is used for two main reasons.

Key takeaways

  • Regularized least squares belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Regularized least squares to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Regularized least squares from memory before moving on to harder problems.

Reference excerpt

Regularized least squares (RLS) is a family of methods for solving the least-squares problem while using regularization to further constrain the resulting solution. RLS is used for two main reasons. The first comes up when the number of variables in the linear system exceeds the number of observations. In such settings, the ordinary least-squares problem is ill-posed and is therefore impossible to fit because the associated optimization problem has infinitely many solutions. RLS allows the introduction of further constraints that uniquely determine the solution. The second reason for using RLS arises when the learned model suffers from poor generalization. RLS can be used in such cases to improve the generalizability of the model by constraining it at training time. This constraint can either force the solution to be "sparse" in some way or to reflect other prior knowledge about the problem such as information about correlations between features. A Bayesian understanding of this can be reached by showing that RLS methods are often equivalent to priors on the solution to the least-squares problem.

General formulation Consider a learning setting given by a probabilistic space ( X × Y , ρ ( X , Y ) ) {\displaystyle (X\times Y,\rho (X,Y))} , Y ∈ R {\displaystyle Y\in R} . Let S = { x i , y i } i = 1 n {\displaystyle S=\{x_{i},y_{i}\}_{i=1}^{n}} denote a training set of n {\displaystyle n} pairs i.i.d. with respect to the joint distribution ρ {\displaystyle \rho } . Let V : Y × R → [ 0 ; ∞ ) {\displaystyle V:Y\times R\to [0;\infty )} be a loss function. Define F {\displaystyle F} as the space of the functions such that expected risk:

ε ( f ) = ∫ V ( y , f ( x ) ) d ρ ( x , y ) {\displaystyle \varepsilon (f)=\int V(y,f(x))\,d\rho (x,y)}

is well defined. The main goal is to minimize the expected risk:

inf f ∈ F ε ( f ) {\displaystyle \inf _{f\in F}\varepsilon (f)}

Since the problem cannot be solved exactly there is a need to specify how to measure the quality of a solution. A good learning algorithm should provide an estimator with a small risk. As the joint distribution ρ {\displaystyle \rho } is typically unknown, the empirical risk is taken. For regularized least squares the square loss function is introduced:

ε ( f ) = 1 n ∑ i = 1 n V ( y i , f ( x i ) ) = 1 n ∑ i = 1 n ( y i − f ( x i ) ) 2 {\displaystyle \varepsilon (f)={\frac {1}{n}}\sum _{i=1}^{n}V(y_{i},f(x_{i}))={\frac {1}{n}}\sum _{i=1}^{n}(y_{i}-f(x_{i}))^{2}}

However, if the functions are from a relatively unconstrained space, such as the set of square-integrable functions on X {\displaystyle X} , this approach may overfit the training data, and lead to poor generalization. Thus, it should somehow constrain or penalize the complexity of the function f {\displaystyle f} . In RLS, this is accomplished by choosing functions from a reproducing kernel Hilbert space (RKHS) H {\displaystyle {\mathcal {H}}} , and adding a regularization term to the objective function, proportional to the norm of the function in H {\displaystyle {\mathcal {H}}} :

inf f ∈ F ε ( f ) + λ R ( f ) , λ > 0 {\displaystyle \inf _{f\in F}\varepsilon (f)+\lambda R(f),\lambda >0}

Kernel formulation

Definition of RKHS A RKHS can be defined by a symmetric positive-definite kernel function K ( x , z ) {\displaystyle K(x,z)} with the reproducing property:

⟨ K x , f ⟩ H = f ( x ) , {\displaystyle \langle K_{x},f\rangle _{\mathcal {H}}=f(x),}

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Regularized least squares

Start with the simplest possible case. Write down what Regularized least squares claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Regularized least squares before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Regularized least squares ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Regularized least squares

In research
Regularized least squares appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Regularized least squares in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Regularized least squares is common in secondary-school and first-year university syllabi. It links to neighbouring topics Inverse problems, Least squares, Linear algebra, so understanding it makes those chapters shorter.
In everyday life
Look for Regularized least squares outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Regularized least squares in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Regularized least squares means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Regularized least squares out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Regularized least squares in simple terms?

Regularized least squares (RLS) is a family of methods for solving the least-squares problem while using regularization to further constrain the resulting solution. RLS is used for two main reasons.

Why does Regularized least squares matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Regularized least squares?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Regularized least squares.

Tags

  • Inverse problems
  • Least squares
  • Linear algebra

Keep exploring