Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TransformationModelBSpline Class Reference

B-spline model for transformations. More...

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

Inheritance diagram for TransformationModelBSpline:
TransformationModel

Public Member Functions

 TransformationModelBSpline (const DataPoints &data, const Param &params)
 Constructor. More...
 
 ~TransformationModelBSpline ()
 Destructor. More...
 
DoubleReal evaluate (const DoubleReal value) const
 Evaluates the model at the given value. More...
 
- Public Member Functions inherited from TransformationModel
 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 &params) const
 Gets the (actual) parameters. More...
 

Static Public Member Functions

static void getDefaultParameters (Param &params)
 Gets the default parameters. More...
 
- Static Public Member Functions inherited from TransformationModel
static void getDefaultParameters (Param &params)
 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_
 
- Protected Attributes inherited from TransformationModel
Param params_
 Parameters. More...
 

Additional Inherited Members

- Public Types inherited from TransformationModel
typedef std::pair< DoubleReal,
DoubleReal
DataPoint
 Coordinate pair. More...
 
typedef std::vector< DataPointDataPoints
 Vector of coordinate pairs. More...
 

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

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

Finds quantile values.

Parameters
xData vector to find quantiles in
quantilesQuantiles to find (values between 0 and 1)
resultsResulting 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.11.1 Documentation generated on Thu Nov 14 2013 11:19:26 using doxygen 1.8.5