36#ifndef STK_ADDITIVEBSPLINEREGRESSION_H
37#define STK_ADDITIVEBSPLINEREGRESSION_H
55template <
class YArray,
class XArray,
class Weights = VectorX>
146template <
class YArray,
class XArray,
class Weights>
150 ,
int nbControlPoints
155 , nbControlPoints_(nbControlPoints)
158 , coefs_(
p_x, nbControlPoints_, degree_, position_)
168template <
class YArray,
class XArray,
class Weights>
171 ,
int nbControlPoints
176 , nbControlPoints_(nbControlPoints)
179 , coefs_(&x, nbControlPoints_, degree_, position_)
186template <
class YArray,
class XArray,
class Weights>
189 coefs_.setData(
p_x_, nbControlPoints_, degree_, position_);
199template <
class YArray,
class XArray,
class Weights>
213 controlPoints_.move(
reg.x());
218template <
class YArray,
class XArray,
class Weights>
231 controlPoints_ =
reg.x();
236template <
class YArray,
class XArray,
class Weights>
249template <
class YArray,
class XArray,
class Weights>
In this file we define the AdditiveBSplineCoefficients class.
In this file we define the Interface base class IRegression.
In this file we define and implement the class MultiLeastSQquare.
In this file we define the class MultiLeastSQquare using lapack.
ArrayXX const & coefficients() const
give the computed coefficients of the B-spline curves.
Compute an additive BSpline, multivalued, regression function using BSpline basis.
Regress::KnotsPosition KnotsPosition
int nbControlPoints() const
YArray const & controlPoints() const
int nbControlPoints_
number of control points of the B-spline curve.
AdditiveBSplineCoefficients< XArray > coefs_
Coefficients of the regression matrix.
virtual bool initializeStep()
compute the coefficients of the BSpline basis.
virtual bool predictionStep()
Compute the predicted outputs.
AdditiveBSplineRegression(YArray const *p_y, XArray const *p_x, int nbControlPoints, int degree=3, KnotsPosition const &position=Regress::uniformKnotsPositions_)
Constructor.
KnotsPosition position_
method of position of the knots of the B-spline curve
YArray controlPoints_
Estimated control points of the B-spline curve.
int degree_
degree of the B_Spline curve
virtual YArray extrapolate(XArray const &x) const
IRegression< YArray, XArray, Weights > Base
ArrayXX const & coefficients() const
This is a matrix of size (p_x_->range(), 0:lastControlPoints).
virtual bool regressionStep()
Compute the regression function.
virtual ~AdditiveBSplineRegression()
virtual destructor.
virtual int computeNbFreeParameter() const
Interface base class for Regression methods.
virtual bool run()
run the computations.
YArray residuals_
Container of the residuals.
YArray predicted_
Container of the predicted output.
String msg_error_
String with the last error message.
String const & error() const
get the last error message.
YArray const * p_y_
A pointer on the y data set.
XArray const * p_x_
A pointer on the x data set.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
The class MultiLeastSQquare solve the least square problem when the response b is multidimensional.
KnotsPosition
Method to use for positioning the knots for BSpline basis.
@ uniformKnotsPositions_
uniform knots
The namespace STK is the main domain space of the Statistical ToolKit project.