NMath Reference Guide

## Double |

Class DoubleComplexCholeskyLeastSq solves least square problems by using
the Cholesky factorization to solve the normal equations.

Inheritance Hierarchy

Syntax

The DoubleComplexCholeskyLeastSq type exposes the following members.

Constructors

Name | Description | |
---|---|---|

DoubleComplexCholeskyLeastSq | Constructs a DoubleComplexCholeskyLeastSq instance with all sizes zero. | |

DoubleComplexCholeskyLeastSq(DoubleComplexMatrix) | Constructs a DoubleComplexCholeskyLeastSq instance from the given matrix. |

Properties

Name | Description | |
---|---|---|

Cols | Gets the number of columns in the matrix. | |

IsGood | Gets a boolean value which is true if the Cholesky factorization succeeded and may be used to solve least square problems; otherwise false. | |

Rows | Gets the number of rows in the matrix. |

Methods

Name | Description | |
---|---|---|

Clone | Creates a deep copy of this least squares instance. | |

Factor | Factors a given matrix so that it may be used to solve least squares problems. | |

OnSerializing | processing following deserialization | |

ResidualNormSqr | Computes the 2-norm squared of the residual vector. | |

ResidualVector | Computes and returns the residual vector. | |

Solve | Computes the solution to the least squares problem Ax = b. |

Remarks

The normal equations for the least squares problem
Ax = b are:
where A' denotes the transpose of the matrix A.
If A has full rank, then A'A is symmetric
positive definite (and, in fact, the converse is true). Thus, the
Cholesky factorization may be used to solve the normal equations.
Note this implies that this method will fail if A is
rank deficiennt.

C#

`A'Ax = A'b`

See Also