Constrained least squares
In constrained least squares one solves a linear least squares problem with an additional constraint on the solution.[1][2] This means, the unconstrained equation [math]\displaystyle{ \mathbf {X} \boldsymbol {\beta} = \mathbf {y} }[/math] must be fit as closely as possible (in the least squares sense) while ensuring that some other property of [math]\displaystyle{ \boldsymbol {\beta} }[/math] is maintained.
There are often special-purpose algorithms for solving such problems efficiently. Some examples of constraints are given below:
- Equality constrained least squares: the elements of [math]\displaystyle{ \boldsymbol {\beta} }[/math] must exactly satisfy [math]\displaystyle{ \mathbf {L} \boldsymbol {\beta} = \mathbf {d} }[/math] (see Ordinary least squares).
- Stochastic (linearly) constrained least squares: the elements of [math]\displaystyle{ \boldsymbol {\beta} }[/math] must satisfy [math]\displaystyle{ \mathbf {L} \boldsymbol {\beta} = \mathbf {d} + \mathbf {\nu} }[/math], where [math]\displaystyle{ \mathbf {\nu} }[/math] is a vector of random variables such that [math]\displaystyle{ \operatorname{E}(\mathbf {\nu}) = \mathbf{0} }[/math] and [math]\displaystyle{ \operatorname{E}(\mathbf {\nu} \mathbf {\nu}^{\rm T}) = \tau^{2}\mathbf{I} }[/math]. This effectively imposes a prior distribution for [math]\displaystyle{ \boldsymbol {\beta} }[/math] and is therefore equivalent to Bayesian linear regression.[3]
- Regularized least squares: the elements of [math]\displaystyle{ \boldsymbol {\beta} }[/math] must satisfy [math]\displaystyle{ \| \mathbf {L} \boldsymbol {\beta} - \mathbf {y} \| \le \alpha }[/math] (choosing [math]\displaystyle{ \alpha }[/math] in proportion to the noise standard deviation of y prevents over-fitting).
- Non-negative least squares (NNLS): The vector [math]\displaystyle{ \boldsymbol {\beta} }[/math] must satisfy the vector inequality [math]\displaystyle{ \boldsymbol {\beta} \geq \boldsymbol{0} }[/math] defined componentwise—that is, each component must be either positive or zero.
- Box-constrained least squares: The vector [math]\displaystyle{ \boldsymbol {\beta} }[/math] must satisfy the vector inequalities [math]\displaystyle{ \boldsymbol{b}_\ell \leq \boldsymbol{\beta} \leq \boldsymbol{b}_u }[/math], each of which is defined componentwise.
- Integer-constrained least squares: all elements of [math]\displaystyle{ \boldsymbol {\beta} }[/math] must be integers (instead of real numbers).
- Phase-constrained least squares: all elements of [math]\displaystyle{ \boldsymbol {\beta} }[/math] must be real numbers, or multiplied by the same complex number of unit modulus.
If the constraint only applies to some of the variables, the mixed problem may be solved using separable least squares by letting [math]\displaystyle{ \mathbf {X} = [\mathbf {X_1} \mathbf {X_2} ] }[/math] and [math]\displaystyle{ \mathbf {\beta}^{\rm T} = [\mathbf {\beta_1}^{\rm T} \mathbf {\beta_2}^{\rm T}] }[/math] represent the unconstrained (1) and constrained (2) components. Then substituting the least-squares solution for [math]\displaystyle{ \mathbf {\beta_1} }[/math], i.e.
- [math]\displaystyle{ \hat{\boldsymbol {\beta}}_1 = \mathbf {X}_1^+ (\mathbf {y} - \mathbf {X}_2 \boldsymbol {\beta}_2) }[/math]
(where + indicates the Moore–Penrose pseudoinverse) back into the original expression gives (following some rearrangement) an equation that can be solved as a purely constrained problem in [math]\displaystyle{ \mathbf {\beta}_2 }[/math].
- [math]\displaystyle{ \mathbf{P} \mathbf {X}_2 \boldsymbol {\beta}_2 = \mathbf{P}\mathbf {y}, }[/math]
where [math]\displaystyle{ \mathbf{P}:=\mathbf{I}-\mathbf {X}_1 \mathbf {X}_1^+ }[/math] is a projection matrix. Following the constrained estimation of [math]\displaystyle{ \hat{\boldsymbol \beta}_2 }[/math] the vector [math]\displaystyle{ \hat{\boldsymbol {\beta}}_1 }[/math] is obtained from the expression above.
See also
References
- ↑ Amemiya, Takeshi (1985). "Model 1 with Linear Constraints". Advanced Econometrics. Oxford: Basil Blackwell. pp. 20–26. ISBN 0-631-15583-X.
- ↑ Boyd, Stephen; Vandenberghe, Lieven (2018). Introduction to Applied Linear Algebra: Vectors, Matrices, and Least Squares. Cambridge University Press. ISBN 978-1-316-51896-0. https://books.google.com/books?id=IApaDwAAQBAJ&q=%22Constrained+least+squares%22.
- ↑ Fomby, Thomas B.; Hill, R. Carter; Johnson, Stanley R. (1988). "Use of Prior Information". Advanced Econometric Methods (Corrected softcover ed.). New York: Springer-Verlag. pp. 80–121. ISBN 0-387-96868-7.
Original source: https://en.wikipedia.org/wiki/Constrained least squares.
Read more |