![]() |
sablib
|
Smoothing using penalized Spline(P-Spline). More...
Go to the source code of this file.
Functions | |
| const std::vector< double > | sablib::PSpline (const std::vector< double > &y, const unsigned int knots_num, const unsigned int degree=3, const unsigned int s=2, const double lambda=1.0) |
| Smoothes the input data using P-Splines (Penalized B-Splines). | |
Smoothing using penalized Spline(P-Spline).
References:
Definition in file pspline.h.
| const std::vector< double > sablib::PSpline | ( | const std::vector< double > & | y, |
| const unsigned int | knots_num, | ||
| const unsigned int | degree = 3, | ||
| const unsigned int | s = 2, | ||
| const double | lambda = 1.0 ) |
Smoothes the input data using P-Splines (Penalized B-Splines).
This function applies a B-Spline basis with a difference penalty on the coefficients to achieve smoothing of the input data.
| y | The input data points to be smoothed. |
| knots_num | The number of internal knots for the B-Spline basis. |
| degree | The degree of the B-Spline basis (default is 3, cubic spline). |
| s | The order of the difference penalty (default is 2). |
| lambda | The smoothing parameter (default is 1.0). Larger values result in smoother curves. |
| std::invalid_argument | One or more parameters are wrong. |
Definition at line 15 of file pspline.cpp.
References sablib::BSpline< Scalar >::DesignMatrix(), and sablib::BSpline< Scalar >::Interpolate().