STK++ 0.9.13
|
Compute a BSpline, multi-valued, regression function using BSpline basis. More...
#include <STK_BSplineRegression.h>
Public Types | |
typedef IRegression< YArray, XVector, Weights > | Base |
typedef Regress::KnotsPosition | KnotsPosition |
Public Attributes | |
YArray | predicted_ |
Container of the predicted output. | |
YArray | residuals_ |
Container of the residuals. | |
Protected Member Functions | |
virtual bool | initializeStep () |
Compute the coefficients of the BSpline basis. | |
virtual bool | regressionStep () |
Compute the regression function. | |
virtual bool | regressionStep (Weights const &weights) |
Compute the regression function. | |
virtual bool | predictionStep () |
Compute the predicted outputs by the regression function. | |
virtual int | computeNbFreeParameter () const |
Compute the number of parameter of the regression function. | |
![]() | |
IRegression () | |
Default constructor. | |
IRegression (ArrayBase< YArray > const *p_y, ArrayBase< XArray > const *p_x) | |
constructor | |
IRegression (ArrayBase< YArray > const &y, ArrayBase< XArray > const &x) | |
Constructor. | |
virtual bool | finalizeStep () |
perform any computation needed after the call of the regression method. | |
bool | residualsStep () |
Compute the residuals of the model. | |
![]() | |
IRunnerSupervised () | |
default constructor | |
IRunnerSupervised (YArray const *const &p_y, XArray const *const &p_x) | |
constructor | |
IRunnerSupervised (YArray const &y, XArray const &x) | |
default constructor | |
IRunnerSupervised (IRunnerSupervised const &runner) | |
copy constructor | |
~IRunnerSupervised () | |
destructor | |
virtual void | updateY () |
update the runner when y data set is set. | |
virtual void | updateX () |
update the runner when x data set is set. | |
virtual void | update () |
update the runner. | |
![]() | |
IRunnerBase () | |
default constructor | |
IRunnerBase (IRunnerBase const &runner) | |
copy constructor | |
virtual | ~IRunnerBase () |
destructor | |
Protected Attributes | |
int | nbControlPoints_ |
number of control points of the B-spline curve. | |
int | degree_ |
degree of the B_Spline curve | |
KnotsPosition | position_ |
method of position of the knots of the B-spline curve | |
BSplineCoefficients< XVector > | coefs_ |
Coefficients of the regression matrix. | |
YArray | controlPoints_ |
Estimated control points of the B-spline curve. | |
![]() | |
YArray | predicted_ |
Container of the predicted output. | |
YArray | residuals_ |
Container of the residuals. | |
![]() | |
YArray const * | p_y_ |
A pointer on the y data set. | |
XArray const * | p_x_ |
A pointer on the x data set. | |
![]() | |
String | msg_error_ |
String with the last error message. | |
bool | hasRun_ |
true if run has been used, false otherwise | |
Additional Inherited Members | |
![]() | |
typedef IRunnerSupervised< YArray, XArray, Weights > | Base |
Compute a BSpline, multi-valued, regression function using BSpline basis.
Definition at line 51 of file STK_BSplineRegression.h.
typedef IRegression<YArray, XVector, Weights> STK::BSplineRegression< YArray, XVector, Weights >::Base |
Definition at line 54 of file STK_BSplineRegression.h.
typedef Regress::KnotsPosition STK::BSplineRegression< YArray, XVector, Weights >::KnotsPosition |
Definition at line 55 of file STK_BSplineRegression.h.
STK::BSplineRegression< YArray, XVector, Weights >::BSplineRegression | ( | YArray const * | p_y, |
XVector const * | p_x, | ||
int const & | nbControlPoints, | ||
int const & | degree = 3 , |
||
KnotsPosition const & | position = Regress::uniformKnotsPositions_ |
||
) |
Constructor.
p_y | d-dimensional array of output to fit |
p_x | uni-dimensional array of predictor |
nbControlPoints | number of control points of the spline |
degree | degree of the BSpline basis |
position | position of the knots to used |
Definition at line 129 of file STK_BSplineRegression.h.
|
inlinevirtual |
Definition at line 84 of file STK_BSplineRegression.h.
References STK::IBasis< Data, Coefs >::coefficients(), and STK::BSplineRegression< YArray, XVector, Weights >::coefs_.
|
inlineprotectedvirtual |
Compute the number of parameter of the regression function.
Implements STK::IRegression< YArray, XArray, Weights >.
Definition at line 124 of file STK_BSplineRegression.h.
References STK::BSplineRegression< YArray, XVector, Weights >::controlPoints_.
Definition at line 80 of file STK_BSplineRegression.h.
References STK::BSplineRegression< YArray, XVector, Weights >::controlPoints_.
|
inline |
Definition at line 76 of file STK_BSplineRegression.h.
References STK::BSplineRegression< YArray, XVector, Weights >::degree_.
|
virtual |
x
. Given the data set x
will compute the values x | the input data set |
Definition at line 195 of file STK_BSplineRegression.h.
References STK::MultidimRegression< Array, Weight >::coefs_.
|
protectedvirtual |
Compute the coefficients of the BSpline basis.
This method is triggered by the base class IRegression::run()
Reimplemented from STK::IRegression< YArray, XArray, Weights >.
Definition at line 148 of file STK_BSplineRegression.h.
References STK::MultidimRegression< Array, Weight >::coefs_.
Definition at line 82 of file STK_BSplineRegression.h.
References STK::BSplineRegression< YArray, XVector, Weights >::coefs_, and STK::BSplineCoefficients< Data >::knots().
|
inline |
Definition at line 78 of file STK_BSplineRegression.h.
References STK::BSplineRegression< YArray, XVector, Weights >::nbControlPoints_.
|
protectedvirtual |
Compute the predicted outputs by the regression function.
This method is triggered by the base class IRegression::run()
after initializeStep()
Implements STK::IRegression< YArray, XArray, Weights >.
Definition at line 182 of file STK_BSplineRegression.h.
References STK::MultidimRegression< Array, Weight >::coefs_, and STK::IRegression< Array, Array, Weight >::predicted_.
|
protectedvirtual |
Compute the regression function.
This method is triggered by the base class IRegression::run()
after initializeStep()
Implements STK::IRegression< YArray, XArray, Weights >.
Definition at line 152 of file STK_BSplineRegression.h.
References STK::MultidimRegression< Array, Weight >::coefs_, STK::invert(), STK::IRunnerSupervised< YArray_, XArray_, Weights_ >::p_y_, STK::ArrayBase< Derived >::symmetrize(), and STK::ArrayBase< Derived >::transpose().
|
protectedvirtual |
Compute the regression function.
This method is triggered by the base class IRegression::run(weights)
after initializeStep()
weights | the weights of the samples |
Implements STK::IRegression< YArray, XArray, Weights >.
Definition at line 167 of file STK_BSplineRegression.h.
References STK::MultidimRegression< Array, Weight >::coefs_, STK::invert(), STK::IRunnerSupervised< YArray_, XArray_, Weights_ >::p_y_, STK::ArrayBase< Derived >::symmetrize(), and STK::ArrayBase< Derived >::transpose().
|
protected |
Coefficients of the regression matrix.
Definition at line 101 of file STK_BSplineRegression.h.
Referenced by STK::BSplineRegression< YArray, XVector, Weights >::coefficients(), and STK::BSplineRegression< YArray, XVector, Weights >::knots().
|
protected |
Estimated control points of the B-spline curve.
Definition at line 103 of file STK_BSplineRegression.h.
Referenced by STK::BSplineRegression< YArray, XVector, Weights >::computeNbFreeParameter(), and STK::BSplineRegression< YArray, XVector, Weights >::controlPoints().
|
protected |
degree of the B_Spline curve
Definition at line 97 of file STK_BSplineRegression.h.
Referenced by STK::BSplineRegression< YArray, XVector, Weights >::degree().
|
protected |
number of control points of the B-spline curve.
Definition at line 95 of file STK_BSplineRegression.h.
Referenced by STK::BSplineRegression< YArray, XVector, Weights >::nbControlPoints().
|
protected |
method of position of the knots of the B-spline curve
Definition at line 99 of file STK_BSplineRegression.h.
YArray STK::IRegression< YArray, XArray, Weights >::predicted_ |
Container of the predicted output.
Definition at line 184 of file STK_IRegression.h.
YArray STK::IRegression< YArray, XArray, Weights >::residuals_ |
Container of the residuals.
Definition at line 186 of file STK_IRegression.h.