0.2.0
|
Least Squares Algorithm. More...
Go to the source code of this file.
Classes | |
struct | NAV::LeastSquaresResult< SolutionVector, VarianceMatrix > |
Least Squares Uncertainties return value. More... | |
Functions | |
template<typename DerivedA , typename DerivedB > | |
Eigen::Vector< typename DerivedA::Scalar, DerivedA::ColsAtCompileTime > | NAV::solveLinearLeastSquares (const Eigen::MatrixBase< DerivedA > &H, const Eigen::MatrixBase< DerivedB > &dz) |
Finds the "least squares" solution for the equation \( \mathbf{v} = \mathbf{dz} - \mathbf{H} \mathbf{x} \). | |
template<typename DerivedA , typename DerivedB > | |
LeastSquaresResult< Eigen::Vector< typename DerivedA::Scalar, DerivedA::ColsAtCompileTime >, Eigen::Matrix< typename DerivedA::Scalar, DerivedA::ColsAtCompileTime, DerivedA::ColsAtCompileTime > > | NAV::solveLinearLeastSquaresUncertainties (const Eigen::MatrixBase< DerivedA > &H, const Eigen::MatrixBase< DerivedB > &dz) |
Finds the "least squares" solution for the equation \( \mathbf{v} = \mathbf{dz} - \mathbf{H} \mathbf{x} \). | |
template<typename DerivedA , typename DerivedW , typename DerivedB > | |
Eigen::Vector< typename DerivedA::Scalar, DerivedA::ColsAtCompileTime > | NAV::solveWeightedLinearLeastSquares (const Eigen::MatrixBase< DerivedA > &H, const Eigen::MatrixBase< DerivedW > &W, const Eigen::MatrixBase< DerivedB > &dz) |
Finds the "weighted least squares" solution. | |
template<typename DerivedA , typename DerivedW , typename DerivedB > | |
LeastSquaresResult< Eigen::Vector< typename DerivedA::Scalar, DerivedA::ColsAtCompileTime >, Eigen::Matrix< typename DerivedA::Scalar, DerivedA::ColsAtCompileTime, DerivedA::ColsAtCompileTime > > | NAV::solveWeightedLinearLeastSquaresUncertainties (const Eigen::MatrixBase< DerivedA > &H, const Eigen::MatrixBase< DerivedW > &W, const Eigen::MatrixBase< DerivedB > &dz) |
Finds the "weighted least squares" solution. | |
Least Squares Algorithm.
Eigen::Vector< typename DerivedA::Scalar, DerivedA::ColsAtCompileTime > NAV::solveLinearLeastSquares | ( | const Eigen::MatrixBase< DerivedA > & | H, |
const Eigen::MatrixBase< DerivedB > & | dz ) |
Finds the "least squares" solution for the equation \( \mathbf{v} = \mathbf{dz} - \mathbf{H} \mathbf{x} \).
\begin{equation} \label{eq:eq-LinearLeastSquares-functional} J(\mathbf{x}) \equiv \sum_{i=1}^m v_i^2 = \mathbf{v}^T \mathbf{v} = (\mathbf{dz} - \mathbf{H} \mathbf{x})^T (\mathbf{dz} - \mathbf{H} \mathbf{x}) \end{equation}
which has the solution (assuming that the inverse to \( \mathbf{H}^T \mathbf{H} \) exists)
\begin{equation} \label{eq:eq-LinearLeastSquares-solution} \mathbf{x} = \left(\mathbf{H}^T \mathbf{H} \right)^{-1} \mathbf{H}^T \mathbf{dz} \end{equation}
[in] | H | Design Matrix |
[in] | dz | Residual vector |
LeastSquaresResult< Eigen::Vector< typename DerivedA::Scalar, DerivedA::ColsAtCompileTime >, Eigen::Matrix< typename DerivedA::Scalar, DerivedA::ColsAtCompileTime, DerivedA::ColsAtCompileTime > > NAV::solveLinearLeastSquaresUncertainties | ( | const Eigen::MatrixBase< DerivedA > & | H, |
const Eigen::MatrixBase< DerivedB > & | dz ) |
Finds the "least squares" solution for the equation \( \mathbf{v} = \mathbf{dz} - \mathbf{H} \mathbf{x} \).
[in] | H | Design Matrix |
[in] | dz | Residual vector |
Eigen::Vector< typename DerivedA::Scalar, DerivedA::ColsAtCompileTime > NAV::solveWeightedLinearLeastSquares | ( | const Eigen::MatrixBase< DerivedA > & | H, |
const Eigen::MatrixBase< DerivedW > & | W, | ||
const Eigen::MatrixBase< DerivedB > & | dz ) |
Finds the "weighted least squares" solution.
\begin{equation} \label{eq:eq-WeightedLinearLeastSquares} \mathbf{x} = \left(\mathbf{H}^T \mathbf{W} \mathbf{H} \right)^{-1} \mathbf{H}^T \mathbf{W} \mathbf{dz} \end{equation}
[in] | H | Design Matrix |
[in] | W | Weight matrix |
[in] | dz | Residual vector |
LeastSquaresResult< Eigen::Vector< typename DerivedA::Scalar, DerivedA::ColsAtCompileTime >, Eigen::Matrix< typename DerivedA::Scalar, DerivedA::ColsAtCompileTime, DerivedA::ColsAtCompileTime > > NAV::solveWeightedLinearLeastSquaresUncertainties | ( | const Eigen::MatrixBase< DerivedA > & | H, |
const Eigen::MatrixBase< DerivedW > & | W, | ||
const Eigen::MatrixBase< DerivedB > & | dz ) |
Finds the "weighted least squares" solution.
[in] | H | Design Matrix |
[in] | W | Weight matrix |
[in] | dz | Residual vector |