ArticleslgStudy

computer science

Levenberg–Marquardt algorithm

Levenberg–Marquardt algorithm is a computer science 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 Levenberg–Marquardt algorithm rather than just read about it. In short: In mathematics and computing, the Levenberg–Marquardt algorithm (LMA or just LM), also known as the damped least-squares (DLS) method, is used to solve non-linear least squares problems. These minimization problems arise especially in least squares curve fitting.

Levenberg–Marquardt algorithm — main illustration
Levenberg–Marquardt algorithm — illustration

Key takeaways

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

Reference excerpt

In mathematics and computing, the Levenberg–Marquardt algorithm (LMA or just LM), also known as the damped least-squares (DLS) method, is used to solve non-linear least squares problems. These minimization problems arise especially in least squares curve fitting. The LMA interpolates between the Gauss–Newton algorithm (GNA) and the method of gradient descent. The LMA is more robust than the GNA, which means that in many cases it finds a solution even if it starts very far off the final minimum. For well-behaved functions and reasonable starting parameters, the LMA tends to be slower than the GNA. LMA can also be viewed as Gauss–Newton using a trust region approach. The algorithm was first published in 1944 by Kenneth Levenberg, while working at the Frankford Army Arsenal. It was rediscovered in 1963 by Donald Marquardt, who worked as a statistician at DuPont, and independently by Girard, Wynne and Morrison. The LMA is used in many software applications for solving generic curve-fitting problems. By using the Gauss–Newton algorithm it often converges faster than first-order methods. However, like other iterative optimization algorithms, the LMA finds only a local minimum, which is not necessarily the global minimum.

The problem The primary application of the Levenberg–Marquardt algorithm is in the least-squares curve fitting problem: given a set of m {\displaystyle m} empirical pairs ( x i , y i ) {\displaystyle \left(x_{i},y_{i}\right)} of independent and dependent variables, find the parameters ⁠ β {\displaystyle {\boldsymbol {\beta }}} ⁠ of the model curve f ( x , β ) {\displaystyle f{\left(x,{\boldsymbol {\beta }}\right)}} so that the sum of the squares of the deviations S ( β ) {\displaystyle S{\left({\boldsymbol {\beta }}\right)}} is minimized:

β ^ ∈ argmin β ⁡ S ( β ) ≡ argmin β ⁡ ∑ i = 1 m [ y i − f ( x i , β ) ] 2 , {\displaystyle {\hat {\boldsymbol {\beta }}}\in \mathop {\operatorname {argmin} } _{\boldsymbol {\beta }}S{\left({\boldsymbol {\beta }}\right)}\equiv \mathop {\operatorname {argmin} } _{\boldsymbol {\beta }}\sum _{i=1}^{m}\left[y_{i}-f{\left(x_{i},{\boldsymbol {\beta }}\right)}\right]^{2},} which is assumed to be non-empty.

The solution Like other numeric minimization algorithms, the Levenberg–Marquardt algorithm is an iterative procedure. To start a minimization, the user has to provide an initial guess for the parameter vector ⁠ β {\displaystyle {\boldsymbol {\beta }}} ⁠. In cases with only one minimum, an uninformed standard guess like β T = ( 1 , 1 , … , 1 ) {\displaystyle {\boldsymbol {\beta }}^{\text{T}}={\begin{pmatrix}1,\ 1,\ \dots ,\ 1\end{pmatrix}}} will work fine; in cases with multiple minima, the algorithm converges to the global minimum only if the initial guess is already somewhat close to the final solution. In each iteration step, the parameter vector ⁠ β {\displaystyle {\boldsymbol {\beta }}} ⁠ is replaced by a new estimate ⁠ β + δ {\displaystyle {\boldsymbol {\beta }}+{\boldsymbol {\delta }}} ⁠. To determine ⁠ δ {\displaystyle {\boldsymbol {\delta }}} ⁠, the function f ( x i , β + δ ) {\displaystyle f{\left(x_{i},{\boldsymbol {\beta }}+{\boldsymbol {\delta }}\right)}} is approximated by its linearization:

… excerpt ends here. Continue reading the full article.

Illustrations

Levenberg–Marquardt algorithm: Better fit
Better fit
Levenberg–Marquardt algorithm: Best fit
Best fit

Worked examples

Example 1 — a first encounter with Levenberg–Marquardt algorithm

Start with the simplest possible case. Write down what Levenberg–Marquardt algorithm claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, 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 Levenberg–Marquardt algorithm 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 Levenberg–Marquardt algorithm 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 Levenberg–Marquardt algorithm

In research
Levenberg–Marquardt algorithm appears in computer science 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 Levenberg–Marquardt algorithm 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
Levenberg–Marquardt algorithm is common in secondary-school and first-year university syllabi. It links to neighbouring topics Least squares, Optimization algorithms and methods, Statistical algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Levenberg–Marquardt algorithm 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.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Levenberg–Marquardt algorithm” →

Affiliate

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

How to study Levenberg–Marquardt algorithm in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Levenberg–Marquardt algorithm 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 Levenberg–Marquardt algorithm out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Levenberg–Marquardt algorithm in simple terms?

In mathematics and computing, the Levenberg–Marquardt algorithm (LMA or just LM), also known as the damped least-squares (DLS) method, is used to solve non-linear least squares problems. These minimization problems arise especially in least squares curve fitting.

Why does Levenberg–Marquardt algorithm matter?

Because it connects several computer science 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 Levenberg–Marquardt algorithm?

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 Levenberg–Marquardt algorithm.

Tags

  • Least squares
  • Optimization algorithms and methods
  • Statistical algorithms

Keep exploring