STK++ 0.9.13
|
Compute an additive BSpline, multivalued, regression function using BSpline basis. More...
#include <STK_AdditiveBSplineRegression.h>
Public Types | |
typedef IRegression< YArray, XArray, 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 weighted regression. | |
virtual bool | predictionStep () |
Compute the predicted outputs. | |
virtual int | computeNbFreeParameter () const |
![]() | |
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 | |
AdditiveBSplineCoefficients< XArray > | 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 an additive BSpline, multivalued, regression function using BSpline basis.
Definition at line 56 of file STK_AdditiveBSplineRegression.h.
typedef IRegression<YArray, XArray, Weights> STK::AdditiveBSplineRegression< YArray, XArray, Weights >::Base |
Definition at line 59 of file STK_AdditiveBSplineRegression.h.
typedef Regress::KnotsPosition STK::AdditiveBSplineRegression< YArray, XArray, Weights >::KnotsPosition |
Definition at line 60 of file STK_AdditiveBSplineRegression.h.
STK::AdditiveBSplineRegression< YArray, XArray, Weights >::AdditiveBSplineRegression | ( | YArray const * | p_y, |
XArray const * | p_x, | ||
int | nbControlPoints, | ||
int | degree = 3 , |
||
KnotsPosition const & | position = Regress::uniformKnotsPositions_ |
||
) |
Constructor.
p_y | p-dimensional array of output to fit |
p_x | d-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 147 of file STK_AdditiveBSplineRegression.h.
STK::AdditiveBSplineRegression< YArray, XArray, Weights >::AdditiveBSplineRegression | ( | YArray const & | y, |
XArray const & | x, | ||
int | nbControlPoints, | ||
int | degree = 3 , |
||
KnotsPosition const & | position = Regress::uniformKnotsPositions_ |
||
) |
Constructor.
y | p-dimensional array of output to fit |
x | d-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 169 of file STK_AdditiveBSplineRegression.h.
|
inlinevirtual |
|
inline |
This is a matrix of size (p_x_->range(), 0:lastControlPoints).
Definition at line 102 of file STK_AdditiveBSplineRegression.h.
References STK::AdditiveBSplineCoefficients< Array >::coefficients(), and STK::AdditiveBSplineRegression< YArray, XArray, Weights >::coefs_.
|
inlineprotectedvirtual |
Implements STK::IRegression< YArray, XArray, Weights >.
Definition at line 135 of file STK_AdditiveBSplineRegression.h.
References STK::AdditiveBSplineRegression< YArray, XArray, Weights >::controlPoints_.
|
inline |
Definition at line 98 of file STK_AdditiveBSplineRegression.h.
References STK::AdditiveBSplineRegression< YArray, XArray, Weights >::controlPoints_.
|
inline |
Definition at line 94 of file STK_AdditiveBSplineRegression.h.
References STK::AdditiveBSplineRegression< YArray, XArray, Weights >::degree_.
|
virtual |
x
. Given the data set x
will compute the values x | the input data set |
Implements STK::IRegression< YArray, XArray, Weights >.
Definition at line 250 of file STK_AdditiveBSplineRegression.h.
References STK::MultidimRegression< Array, Weight >::coefs_.
|
protectedvirtual |
compute the coefficients of the BSpline basis.
This method will be called in the base class IRegression::run()
Reimplemented from STK::IRegression< YArray, XArray, Weights >.
Definition at line 187 of file STK_AdditiveBSplineRegression.h.
References STK::MultidimRegression< Array, Weight >::coefs_, STK::IRunnerBase::msg_error_, and STK::IRunnerSupervised< YArray_, XArray_, Weights_ >::p_x_.
|
inline |
Definition at line 96 of file STK_AdditiveBSplineRegression.h.
References STK::AdditiveBSplineRegression< YArray, XArray, Weights >::nbControlPoints_.
|
protectedvirtual |
Compute the predicted outputs.
Implements STK::IRegression< YArray, XArray, Weights >.
Definition at line 237 of file STK_AdditiveBSplineRegression.h.
References STK::MultidimRegression< Array, Weight >::coefs_, and STK::IRegression< Array, Array, Weight >::predicted_.
|
protectedvirtual |
Compute the regression function.
Implements STK::IRegression< YArray, XArray, Weights >.
Definition at line 200 of file STK_AdditiveBSplineRegression.h.
References STK::MultidimRegression< Array, Weight >::coefs_, STK::IRunnerBase::error(), STK::IRunnerBase::msg_error_, STK::IRunnerSupervised< YArray_, XArray_, Weights_ >::p_y_, and STK::IRegression< YArray, XArray, Weights >::run().
|
protectedvirtual |
Compute the weighted regression.
weights | weights of the samples |
Implements STK::IRegression< YArray, XArray, Weights >.
Definition at line 219 of file STK_AdditiveBSplineRegression.h.
References STK::MultidimRegression< Array, Weight >::coefs_, STK::IRunnerBase::error(), STK::IRunnerBase::msg_error_, STK::IRunnerSupervised< YArray_, XArray_, Weights_ >::p_y_, and STK::IRegression< YArray, XArray, Weights >::run().
|
protected |
Coefficients of the regression matrix.
Definition at line 119 of file STK_AdditiveBSplineRegression.h.
Referenced by STK::AdditiveBSplineRegression< YArray, XArray, Weights >::coefficients().
|
protected |
Estimated control points of the B-spline curve.
Definition at line 121 of file STK_AdditiveBSplineRegression.h.
Referenced by STK::AdditiveBSplineRegression< YArray, XArray, Weights >::computeNbFreeParameter(), and STK::AdditiveBSplineRegression< YArray, XArray, Weights >::controlPoints().
|
protected |
degree of the B_Spline curve
Definition at line 115 of file STK_AdditiveBSplineRegression.h.
Referenced by STK::AdditiveBSplineRegression< YArray, XArray, Weights >::degree().
|
protected |
number of control points of the B-spline curve.
Definition at line 113 of file STK_AdditiveBSplineRegression.h.
Referenced by STK::AdditiveBSplineRegression< YArray, XArray, Weights >::nbControlPoints().
|
protected |
method of position of the knots of the B-spline curve
Definition at line 117 of file STK_AdditiveBSplineRegression.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.