STK++ 0.9.13
|
The class MultiLeastSQquare solve the least square problem when the response b is multidimensional. More...
#include <STK_MultiLeastSquare.h>
Public Types | |
typedef ILeastSquare< MultiLeastSquare< ArrayB, ArrayA > > | Base |
Public Member Functions | |
MultiLeastSquare (ArrayB const &b, ArrayA const &a, bool isBref=false, bool isAref=false) | |
constructor | |
virtual | ~MultiLeastSquare () |
Destructor. | |
bool | runImpl () |
compute the multidimensional regression | |
template<class Weights > | |
bool | runImpl (Weights const &weights) |
compute the weighted multidimensional regression | |
![]() | |
virtual | ~ILeastSquare () |
Destructor. | |
Integer const & | rank () const |
ArrayA const & | a () const |
ArrayB const & | b () const |
ArrayB const & | x () const |
virtual bool | run () |
Compute the Least-Square solution. | |
bool | run (VecWeights const &weights) |
Compute the weighted Least-Square solution. | |
bool | run (Weights const &weights) |
![]() | |
String const & | error () const |
get the last error message. | |
![]() | |
Derived & | asDerived () |
static cast : return a reference of this with a cast to the derived class. | |
Derived const & | asDerived () const |
static cast : return a const reference of this with a cast to the derived class. | |
Derived * | asPtrDerived () |
static cast : return a ptr on a Derived of this with a cast to the derived class. | |
Derived const * | asPtrDerived () const |
static cast : return a ptr on a constant Derived of this with a cast to the derived class. | |
Derived * | clone () const |
create a leaf using the copy constructor of the Derived class. | |
Derived * | clone (bool isRef) const |
create a leaf using the copy constructor of the Derived class and a flag determining if the clone is a reference or not. | |
Additional Inherited Members | |
![]() | |
typedef hidden::AlgebraTraits< MultiLeastSquare< ArrayB, ArrayA > >::ArrayB | ArrayB |
typedef hidden::AlgebraTraits< MultiLeastSquare< ArrayB, ArrayA > >::ArrayA | ArrayA |
![]() | |
ILeastSquare (ArrayB const &b, ArrayA const &a, bool isBref=false, bool isAref=false) | |
Default constructor. | |
ILeastSquare (ExprBase< OtherArrayB > const &b, ExprBase< OtherArrayA > const &a) | |
template constructor | |
![]() | |
IRunnerBase () | |
default constructor | |
IRunnerBase (IRunnerBase const &runner) | |
copy constructor | |
virtual | ~IRunnerBase () |
destructor | |
virtual void | update () |
update the runner. | |
![]() | |
IRecursiveTemplate () | |
constructor. | |
~IRecursiveTemplate () | |
destructor. | |
![]() | |
ArrayB | b_ |
Array or vector of the left hand side. | |
ArrayA | a_ |
Array of the right hand side. | |
ArrayB | x_ |
Array of the solution (a vector if b is a vector, a matrix otherwise) | |
Integer | rank_ |
rank of matrix A | |
![]() | |
String | msg_error_ |
String with the last error message. | |
bool | hasRun_ |
true if run has been used, false otherwise | |
The class MultiLeastSQquare solve the least square problem when the response b is multidimensional.
The class MultiLeastSquare allows to solve the least-square problem
It computes the minimum-norm solution to a real linear least squares problem: minimize 2-norm(| b - A*x |) using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient.
Definition at line 80 of file STK_MultiLeastSquare.h.
typedef ILeastSquare<MultiLeastSquare<ArrayB, ArrayA> > STK::MultiLeastSquare< ArrayB, ArrayA >::Base |
Definition at line 83 of file STK_MultiLeastSquare.h.
|
inline |
constructor
b,a | the left hand side and the right hand side of the least square problem. |
isBref,isAref | are the left hand side and the right hand side references ? |
Definition at line 92 of file STK_MultiLeastSquare.h.
|
inlinevirtual |
compute the multidimensional regression
Definition at line 104 of file STK_MultiLeastSquare.h.
References STK::IRegression< YArray, XArray, Weights >::run(), and STK::ArrayBase< Derived >::transpose().
compute the weighted multidimensional regression
Definition at line 123 of file STK_MultiLeastSquare.h.
References STK::IRegression< YArray, XArray, Weights >::run(), STK_STATIC_ASSERT_ONE_DIMENSION_ONLY, and STK::ArrayBase< Derived >::transpose().