Jump to content

Iteratively reweighted least squares: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
create article per AFC IP User:68.101.160.213
 
L1 minimization for sparse recovery: rm unsourced claim of disutility
 
(118 intermediate revisions by 71 users not shown)
Line 1: Line 1:
{{for|International lunar research station|International Lunar Research Station}}
== Iteratively Re-weighted Least Squares ==
{{Short description|Method for solving certain optimization problems}}
{{afc maybe|I'm not too good with math so can someone (preferably an expert on the subject) verify this?}}
{{Regression bar}}
The method of iteratively re-weighted least squares (IRLS) is a numerical algorithm for minimizing any specified objective function using a standard [[weighted least squares]] method such as [[Gaussian elimination]]. Whereas techniques are widely available and highly optimized for weighted least squares, there are few techniques for minimization of other objective functions.
The method of '''iteratively reweighted least squares''' ('''IRLS''') is used to solve certain optimization problems with [[objective function]]s of the form of a [[p-norm|''p''-norm]]:


<math display="block">\mathop{\operatorname{arg\,min}}_{\boldsymbol\beta} \sum_{i=1}^n \big| y_i - f_i (\boldsymbol\beta) \big|^p, </math>
The IRLS is commonly used to perform [[robust regression]] with an [[M-estimator]], as a way of mitigating the influence of outliers in an otherwise normally distributed data set. For example, by minimizing the least absolute error rather than the least square error.


by an [[iterative method]] in which each step involves solving a [[weighted least squares]] problem of the form:<ref name=Burrus>C. Sidney Burrus, ''[https://web.archive.org/web/20221017041048/https://cnx.org/exports/92b90377-2b34-49e4-b26f-7fe572db78a1@12.pdf/iterative-reweighted-least-squares-12.pdf Iterative Reweighted Least Squares]''</ref>
===The Method===
Starting with a diagonal weighting matrix equal to the [[identity matrix]] ''W'' = ''I'' and a linear problem ''A x = b'', the (weighted) linear equation is formed.
:<math>W A x = W b</math>
The least squares solution of this equation is then found using standard linear algebra methods. The residuals are calculated.
:<math>r = b - A x</math>
Using some function ''f(r)'' of the residuals, the weighting matrix is re-calculated, e.g. with ''f(r) = 1/|r|''
:<math>W = diag( 1 / |r| )</math>
With these new weights, the weighted least squares equation is re-solved and the residuals are re-calculated. The process can be iterated many times.


<math display="block">\boldsymbol\beta^{(t+1)} = \underset{\boldsymbol\beta} {\operatorname{arg\,min}} \sum_{i=1}^n w_i (\boldsymbol\beta^{(t)}) \big| y_i - f_i (\boldsymbol\beta) \big|^2. </math>
The solution to which this iterative process converges is the minimizer of an objective function related to the function ''f(r)''. With ''f(r) = 1/|r|'' the objective is the least absolute deviation <math>SUM{|r_i|}</math>.


IRLS is used to find the [[maximum likelihood]] estimates of a [[generalized linear model]], and in [[robust regression]] to find an [[M-estimator]], as a way of mitigating the influence of outliers in an otherwise normally-distributed data set, for example, by minimizing the [[least absolute errors]] rather than the [[least squares|least square errors]].
=== Sources ===

* [http://sepwww.stanford.edu/public/docs/sep103/antoine2/paper_html/index.html Stanford Lecture Notes on the IRLS algorithm by Antoine Guitton]
One of the advantages of IRLS over [[linear programming]] and [[convex programming]] is that it can be used with [[Gauss–Newton]] and [[Levenberg–Marquardt]] numerical algorithms.
* [http://www.nrbook.com/a/bookcpdf/c15-7.pdf Robust Estimation in Numerical Recipes in C by Press et al]

== Examples ==

=== ''L''<sub>1</sub> minimization for sparse recovery ===
IRLS can be used for '''[[L1 norm|''ℓ''<sub>1</sub>]]''' minimization and smoothed '''[[Lp quasi-norm|''ℓ''<sub>p</sub>]]''' minimization, ''p''&nbsp;<&nbsp;1, in [[compressed sensing]] problems. It has been proved that the algorithm has a linear rate of convergence for ''ℓ''<sub>1</sub> norm and superlinear for ''ℓ''<sub>''t''</sub> with ''t''&nbsp;<&nbsp;1, under the [[restricted isometry property]], which is generally a sufficient condition for sparse solutions.<ref>{{Cite conference
| last1 = Chartrand | first1 = R.
| last2 = Yin | first2 = W.
| title = Iteratively reweighted algorithms for compressive sensing
| book-title = IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2008
| pages = 3869–3872
| date = March 31 – April 4, 2008
| doi = 10.1109/ICASSP.2008.4518498
}}
</ref><ref>{{Cite journal | last1 = Daubechies | first1 = I. | last2 = Devore | first2 = R. | last3 = Fornasier | first3 = M. | last4 = Güntürk | first4 = C. S. N. | title = Iteratively reweighted least squares minimization for sparse recovery | doi = 10.1002/cpa.20303 | journal = Communications on Pure and Applied Mathematics | volume = 63 | pages = 1–38 | year = 2010 | arxiv = 0807.0575 }}</ref>

=== ''L<sup>p</sup>'' norm linear regression ===
To find the parameters '''''β'''''&nbsp;=&nbsp;(''β''<sub>1</sub>, …,''β''<sub>''k''</sub>)<sup>T</sup> which minimize the [[Lp space|''L<sup>p</sup>'' norm]] for the [[linear regression]] problem,

<math display="block">
\underset{\boldsymbol \beta}{ \operatorname{arg\,min} }
\big\| \mathbf y - X \boldsymbol \beta \|_p
=
\underset{\boldsymbol \beta}{ \operatorname{arg\,min} }
\sum_{i=1}^n \left| y_i - X_i \boldsymbol\beta \right|^p ,
</math>

the IRLS algorithm at step ''t''&nbsp;+&nbsp;1 involves solving the [[Linear least squares (mathematics)#Weighted linear least squares|weighted linear least squares]] problem:<ref>{{cite book
|chapter=6.8.1 Solutions that Minimize Other Norms of the Residuals
|title=Matrix algebra
|last=Gentle |first=James
|isbn=978-0-387-70872-0
|doi=10.1007/978-0-387-70873-7
|publisher=Springer |location=New York
|year=2007
|series=Springer Texts in Statistics
}}</ref>

<math display="block">
\boldsymbol\beta^{(t+1)}
=
\underset{\boldsymbol\beta}{ \operatorname{arg\,min} }
\sum_{i=1}^n w_i^{(t)} \left| y_i - X_i \boldsymbol\beta \right|^2
=
(X^{\rm T} W^{(t)} X)^{-1} X^{\rm T} W^{(t)} \mathbf{y},
</math>

where ''W''<sup>(''t'')</sup> is the [[diagonal matrix]] of weights, usually with all elements set initially to:

<math display="block">w_i^{(0)} = 1</math>

and updated after each iteration to:

<math display="block">w_i^{(t)} = \big|y_i - X_i \boldsymbol \beta ^{(t)} \big|^{p-2}.</math>

In the case ''p''&nbsp;=&nbsp;1, this corresponds to [[least absolute deviation]] regression (in this case, the problem would be better approached by use of [[linear programming]] methods,<ref name=Pfeil>William A. Pfeil,
''[http://www.wpi.edu/Pubs/E-project/Available/E-project-050506-091720/unrestricted/IQP_Final_Report.pdf Statistical Teaching Aids]'', Bachelor of Science thesis, [[Worcester Polytechnic Institute]], 2006</ref> so the result would be exact) and the formula is:

<math display="block">w_i^{(t)} = \frac{1}{\big|y_i - X_i \boldsymbol \beta ^{(t)} \big|}.</math>

To avoid dividing by zero, [[Regularization (mathematics)|regularization]] must be done, so in practice the formula is:

<math display="block">w_i^{(t)} = \frac 1 {\max\left\{\delta, \left|y_i - X_i \boldsymbol \beta ^{(t)} \right|\right\} }.</math>

where <math>\delta</math> is some small value, like 0.0001.<ref name=Pfeil /> Note the use of <math>\delta</math> in the weighting function is equivalent to the [[Huber loss]] function in robust estimation. <ref name=Fox_and_Weisberg> Fox, J.; Weisberg, S. (2013),''[http://users.stat.umn.edu/~sandy/courses/8053/handouts/robust.pdf Robust Regression]'', Course Notes, University of Minnesota</ref>

== See also ==
* [[Feasible generalized least squares]]
* [[Weiszfeld's algorithm]] (for approximating the [[geometric median]]), which can be viewed as a special case of IRLS

== Notes ==
{{Reflist}}

== References ==
* [https://web.archive.org/web/20070810222123/http://www.mai.liu.se/~akbjo/LSPbook.html Numerical Methods for Least Squares Problems by Åke Björck] (Chapter 4: Generalized Least Squares Problems.)
* [http://graphics.stanford.edu/~jplewis/lscourse/SLIDES.pdf Practical Least-Squares for Computer Graphics. SIGGRAPH Course 11]

== External links ==

* [https://stemblab.github.io/irls/ Solve under-determined linear systems iteratively]

{{DEFAULTSORT:Iteratively Reweighted Least Squares}}
[[Category:Least squares]]

Latest revision as of 07:47, 4 June 2024

The method of iteratively reweighted least squares (IRLS) is used to solve certain optimization problems with objective functions of the form of a p-norm:

by an iterative method in which each step involves solving a weighted least squares problem of the form:[1]

IRLS is used to find the maximum likelihood estimates of a generalized linear model, and in robust regression to find an M-estimator, as a way of mitigating the influence of outliers in an otherwise normally-distributed data set, for example, by minimizing the least absolute errors rather than the least square errors.

One of the advantages of IRLS over linear programming and convex programming is that it can be used with Gauss–Newton and Levenberg–Marquardt numerical algorithms.

Examples

[edit]

L1 minimization for sparse recovery

[edit]

IRLS can be used for 1 minimization and smoothed p minimization, p < 1, in compressed sensing problems. It has been proved that the algorithm has a linear rate of convergence for 1 norm and superlinear for t with t < 1, under the restricted isometry property, which is generally a sufficient condition for sparse solutions.[2][3]

Lp norm linear regression

[edit]

To find the parameters β = (β1, …,βk)T which minimize the Lp norm for the linear regression problem,

the IRLS algorithm at step t + 1 involves solving the weighted linear least squares problem:[4]

where W(t) is the diagonal matrix of weights, usually with all elements set initially to:

and updated after each iteration to:

In the case p = 1, this corresponds to least absolute deviation regression (in this case, the problem would be better approached by use of linear programming methods,[5] so the result would be exact) and the formula is:

To avoid dividing by zero, regularization must be done, so in practice the formula is:

where is some small value, like 0.0001.[5] Note the use of in the weighting function is equivalent to the Huber loss function in robust estimation. [6]

See also

[edit]

Notes

[edit]
  1. ^ C. Sidney Burrus, Iterative Reweighted Least Squares
  2. ^ Chartrand, R.; Yin, W. (March 31 – April 4, 2008). "Iteratively reweighted algorithms for compressive sensing". IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2008. pp. 3869–3872. doi:10.1109/ICASSP.2008.4518498.
  3. ^ Daubechies, I.; Devore, R.; Fornasier, M.; Güntürk, C. S. N. (2010). "Iteratively reweighted least squares minimization for sparse recovery". Communications on Pure and Applied Mathematics. 63: 1–38. arXiv:0807.0575. doi:10.1002/cpa.20303.
  4. ^ Gentle, James (2007). "6.8.1 Solutions that Minimize Other Norms of the Residuals". Matrix algebra. Springer Texts in Statistics. New York: Springer. doi:10.1007/978-0-387-70873-7. ISBN 978-0-387-70872-0.
  5. ^ a b William A. Pfeil, Statistical Teaching Aids, Bachelor of Science thesis, Worcester Polytechnic Institute, 2006
  6. ^ Fox, J.; Weisberg, S. (2013),Robust Regression, Course Notes, University of Minnesota

References

[edit]
[edit]