B-spline model for transformations. More...
#include <OpenMS/ANALYSIS/MAPMATCHING/TransformationModel.h>
Public Member Functions | |
TransformationModelBSpline (const DataPoints &data, const Param ¶ms) | |
Constructor. More... | |
~TransformationModelBSpline () | |
Destructor. More... | |
DoubleReal | evaluate (const DoubleReal value) const |
Evaluates the model at the given value. More... | |
![]() | |
TransformationModel () | |
Constructor. More... | |
TransformationModel (const TransformationModel::DataPoints &, const Param &) | |
Alternative constructor (derived classes should implement this one!) More... | |
virtual | ~TransformationModel () |
Destructor. More... | |
void | getParameters (Param ¶ms) const |
Gets the (actual) parameters. More... | |
Static Public Member Functions | |
static void | getDefaultParameters (Param ¶ms) |
Gets the default parameters. More... | |
![]() | |
static void | getDefaultParameters (Param ¶ms) |
Gets the default parameters. More... | |
Protected Member Functions | |
void | getQuantiles_ (const gsl_vector *x, const std::vector< double > &quantiles, gsl_vector *results) |
Finds quantile values. More... | |
void | computeFit_ () |
Computes the B-spline fit. More... | |
void | computeLinear_ (const double pos, double &slope, double &offset, double &sd_err) |
Computes the linear extrapolation. More... | |
Protected Attributes | |
gsl_vector * | x_ |
Vectors for B-spline computation. More... | |
gsl_vector * | y_ |
gsl_vector * | w_ |
gsl_vector * | bsplines_ |
gsl_vector * | coeffs_ |
gsl_matrix * | cov_ |
Covariance matrix. More... | |
gsl_bspline_workspace * | workspace_ |
B-spline workspace. More... | |
size_t | size_ |
Number of data points and coefficients. More... | |
size_t | ncoeffs_ |
double | xmin_ |
double | xmax_ |
double | slope_min_ |
Parameters for linear extrapolation. More... | |
double | slope_max_ |
double | offset_min_ |
double | offset_max_ |
double | sd_err_left_ |
Fitting errors of linear extrapolation. More... | |
double | sd_err_right_ |
![]() | |
Param | params_ |
Parameters. More... | |
Additional Inherited Members | |
![]() | |
typedef std::pair< DoubleReal, DoubleReal > | DataPoint |
Coordinate pair. More... | |
typedef std::vector< DataPoint > | DataPoints |
Vector of coordinate pairs. More... | |
B-spline model for transformations.
In the range of the data points, the transformation is evaluated from a cubic smoothing spline fit to the points. The number of breakpoints is given as a parameter (num_breakpoints
). Outside of this range, linear extrapolation through the last point with the slope of the spline at that point is used.
Positioning of the breakpoints is controlled by the parameter break_positions
. Valid choices are "uniform" (equidistant spacing on the data range) and "quantiles" (equal numbers of data points in every interval).
TransformationModelBSpline | ( | const DataPoints & | data, |
const Param & | params | ||
) |
Constructor.
IllegalArgument | is thrown if not enough data points are given or if the required parameter num_breakpoints is missing. |
Destructor.
|
protected |
Computes the B-spline fit.
|
protected |
Computes the linear extrapolation.
|
virtual |
Evaluates the model at the given value.
Reimplemented from TransformationModel.
|
static |
Gets the default parameters.
|
protected |
Finds quantile values.
x | Data vector to find quantiles in |
quantiles | Quantiles to find (values between 0 and 1) |
results | Resulting quantiles (vector must be already allocated to the correct size!) |
|
protected |
|
protected |
|
protected |
Covariance matrix.
|
protected |
|
protected |
|
protected |
|
protected |
Fitting errors of linear extrapolation.
|
protected |
|
protected |
Number of data points and coefficients.
|
protected |
|
protected |
Parameters for linear extrapolation.
|
protected |
|
protected |
B-spline workspace.
|
protected |
Vectors for B-spline computation.
|
protected |
|
protected |
|
protected |
OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:26 using doxygen 1.8.5 |