Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

TransformationModelBSpline Class Reference
[MapAlignment]

B-spline model for transformations. More...

#include <OpenMS/ANALYSIS/MAPMATCHING/TransformationModel.h>

Inheritance diagram for TransformationModelBSpline:
TransformationModel

List of all members.

Public Member Functions

 TransformationModelBSpline (const DataPoints &data, const Param &params)
 Constructor.
 ~TransformationModelBSpline ()
 Destructor.
DoubleReal evaluate (const DoubleReal value) const
 Evaluates the model at the given value.

Static Public Member Functions

static void getDefaultParameters (Param &params)
 Gets the default parameters.

Protected Member Functions

void getQuantiles_ (const gsl_vector *x, const std::vector< double > &quantiles, gsl_vector *results)
 Finds quantile values.
void computeFit_ ()
 Computes the B-spline fit.
void computeLinear_ (const double pos, double &slope, double &offset, double &sd_err)
 Computes the linear extrapolation.

Protected Attributes

gsl_vector * x_
 Vectors for B-spline computation.
gsl_vector * y_
gsl_vector * w_
gsl_vector * bsplines_
gsl_vector * coeffs_
gsl_matrix * cov_
 Covariance matrix.
gsl_bspline_workspace * workspace_
 B-spline workspace.
size_t size_
 Number of data points and coefficients.
size_t ncoeffs_
double xmin_
double xmax_
double slope_min_
 Parameters for linear extrapolation.
double slope_max_
double offset_min_
double offset_max_
double sd_err_left_
 Fitting errors of linear extrapolation.
double sd_err_right_

Detailed Description

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).


Constructor & Destructor Documentation

TransformationModelBSpline ( const DataPoints data,
const Param params 
)

Constructor.

Exceptions:
IllegalArgument is thrown if not enough data points are given or if the required parameter num_breakpoints is missing.

Destructor.


Member Function Documentation

void computeFit_ (  )  [protected]

Computes the B-spline fit.

void computeLinear_ ( const double  pos,
double slope,
double offset,
double sd_err 
) [protected]

Computes the linear extrapolation.

DoubleReal evaluate ( const DoubleReal  value  )  const [virtual]

Evaluates the model at the given value.

Reimplemented from TransformationModel.

static void getDefaultParameters ( Param params  )  [static]

Gets the default parameters.

Reimplemented from TransformationModel.

void getQuantiles_ ( const gsl_vector *  x,
const std::vector< double > &  quantiles,
gsl_vector *  results 
) [protected]

Finds quantile values.

Parameters:
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!)

Member Data Documentation

gsl_vector * bsplines_ [protected]
gsl_vector * coeffs_ [protected]
gsl_matrix* cov_ [protected]

Covariance matrix.

size_t ncoeffs_ [protected]
double offset_max_ [protected]
double offset_min_ [protected]
double sd_err_left_ [protected]

Fitting errors of linear extrapolation.

double sd_err_right_ [protected]
size_t size_ [protected]

Number of data points and coefficients.

double slope_max_ [protected]
double slope_min_ [protected]

Parameters for linear extrapolation.

gsl_vector * w_ [protected]
gsl_bspline_workspace* workspace_ [protected]

B-spline workspace.

gsl_vector* x_ [protected]

Vectors for B-spline computation.

double xmax_ [protected]
double xmin_ [protected]
gsl_vector * y_ [protected]

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:49 using doxygen 1.7.1