Numerically stabilised general linear least squares. More...
#include <qle/math/stabilisedglls.hpp>
Public Types | |
enum | Method { None , MaxAbs , MeanStdDev } |
Public Member Functions | |
template<class xContainer , class yContainer , class vContainer > | |
StabilisedGLLS (const xContainer &x, const yContainer &y, const vContainer &v, const Method method=MeanStdDev) | |
const Array & | transformedCoefficients () const |
const Array & | transformedResiduals () const |
const Array & | transformedStandardErrors () const |
const Array & | transformedError () const |
const Array & | xMultiplier () const |
Transformation parameters (u => (u + shift) * multiplier for u = x, y) More... | |
const Array & | xShift () const |
const Real | yMultiplier () const |
const Real | yShift () const |
Size | size () const |
Size | dim () const |
template<class xType , class vContainer > | |
Real | eval (xType x, vContainer &v, typename boost::enable_if< typename boost::is_arithmetic< xType >::type >::type *=0) |
evaluate regression function in terms of original x, y More... | |
template<class xType , class vContainer > | |
Real | eval (xType x, vContainer &v, typename boost::disable_if< typename boost::is_arithmetic< xType >::type >::type *=0) |
evaluate regression function in terms of original x, y More... | |
Protected Member Functions | |
template<class xContainer , class yContainer , class vContainer > | |
void | calculate (xContainer x, yContainer y, vContainer v, typename boost::enable_if< typename boost::is_arithmetic< typename xContainer::value_type >::type >::type *=0) |
template<class xContainer , class yContainer , class vContainer > | |
void | calculate (xContainer x, yContainer y, vContainer v, typename boost::disable_if< typename boost::is_arithmetic< typename xContainer::value_type >::type >::type *=0) |
Protected Attributes | |
Array | a_ |
Array | err_ |
Array | residuals_ |
Array | standardErrors_ |
Array | xMultiplier_ |
Array | xShift_ |
Real | yMultiplier_ |
Real | yShift_ |
Method | method_ |
QuantLib::ext::shared_ptr< GeneralLinearLeastSquares > | glls_ |
Numerically stabilised general linear least squares.
The input data is linearly transformed before performing the linear least squares fit. The linear least squares fit on the transformed data is done using the GeneralLinearLeastSquares class.
Definition at line 51 of file stabilisedglls.hpp.
enum Method |
StabilisedGLLS | ( | const xContainer & | x, |
const yContainer & | y, | ||
const vContainer & | v, | ||
const Method | method = MeanStdDev |
||
) |
Definition at line 102 of file stabilisedglls.hpp.
const Array & transformedCoefficients | ( | ) | const |
Definition at line 61 of file stabilisedglls.hpp.
const Array & transformedResiduals | ( | ) | const |
Definition at line 62 of file stabilisedglls.hpp.
const Array & transformedStandardErrors | ( | ) | const |
Definition at line 63 of file stabilisedglls.hpp.
const Array & transformedError | ( | ) | const |
Definition at line 64 of file stabilisedglls.hpp.
const Array & xMultiplier | ( | ) | const |
Transformation parameters (u => (u + shift) * multiplier for u = x, y)
Definition at line 67 of file stabilisedglls.hpp.
const Array & xShift | ( | ) | const |
Definition at line 68 of file stabilisedglls.hpp.
const Real yMultiplier | ( | ) | const |
const Real yShift | ( | ) | const |
Definition at line 70 of file stabilisedglls.hpp.
Size size | ( | ) | const |
Definition at line 72 of file stabilisedglls.hpp.
Size dim | ( | ) | const |
Definition at line 73 of file stabilisedglls.hpp.
Real eval | ( | xType | x, |
vContainer & | v, | ||
typename boost::enable_if< typename boost::is_arithmetic< xType >::type >::type * | = 0 |
||
) |
evaluate regression function in terms of original x, y
Definition at line 248 of file stabilisedglls.hpp.
Real eval | ( | xType | x, |
vContainer & | v, | ||
typename boost::disable_if< typename boost::is_arithmetic< xType >::type >::type * | = 0 |
||
) |
evaluate regression function in terms of original x, y
Definition at line 260 of file stabilisedglls.hpp.
|
protected |
Definition at line 110 of file stabilisedglls.hpp.
|
protected |
Definition at line 171 of file stabilisedglls.hpp.
|
protected |
Definition at line 85 of file stabilisedglls.hpp.
|
protected |
Definition at line 85 of file stabilisedglls.hpp.
|
protected |
Definition at line 85 of file stabilisedglls.hpp.
|
protected |
Definition at line 85 of file stabilisedglls.hpp.
|
protected |
Definition at line 85 of file stabilisedglls.hpp.
|
protected |
Definition at line 85 of file stabilisedglls.hpp.
|
protected |
Definition at line 86 of file stabilisedglls.hpp.
|
protected |
Definition at line 86 of file stabilisedglls.hpp.
|
protected |
Definition at line 87 of file stabilisedglls.hpp.
|
protected |
Definition at line 88 of file stabilisedglls.hpp.