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

Linear model for transformations. More...

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

Inheritance diagram for TransformationModelLinear:
TransformationModel

Public Member Functions

 TransformationModelLinear (const DataPoints &data, const Param &params)
 Constructor. More...
 
 ~TransformationModelLinear ()
 Destructor. More...
 
virtual double evaluate (double value) const
 Evaluates the model at the given value. More...
 
void getParameters (double &slope, double &intercept) const
 Gets the "real" parameters. More...
 
void invert ()
 Computes the inverse. More...
 
- Public Member Functions inherited from TransformationModel
 TransformationModel ()
 Constructor. More...
 
 TransformationModel (const TransformationModel::DataPoints &, const Param &)
 
virtual ~TransformationModel ()
 Destructor. More...
 
const ParamgetParameters () 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 Attributes

double slope_
 Parameters of the linear model. More...
 
double intercept_
 
bool data_given_
 Was the model estimated from data? More...
 
bool symmetric_
 Use symmetric regression? More...
 
- Protected Attributes inherited from TransformationModel
Param params_
 Parameters. More...
 

Additional Inherited Members

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

Detailed Description

Linear model for transformations.

The model can be inferred from data or specified using explicit parameters. If data is given, a least squares fit is used to find the model parameters (slope and intercept). Depending on parameter symmetric_regression, a normal regression (y on x) or symmetric regression ( $ y - x $ on $ y + x $) is performed.

Without data, the model can be specified by giving the parameters slope and intercept explicitly.

Constructor & Destructor Documentation

◆ TransformationModelLinear()

TransformationModelLinear ( const DataPoints data,
const Param params 
)

Constructor.

Exceptions
IllegalArgumentis thrown if neither data points nor explicit parameters (slope/intercept) are given.

◆ ~TransformationModelLinear()

Destructor.

Member Function Documentation

◆ evaluate()

virtual double evaluate ( double  value) const
virtual

Evaluates the model at the given value.

Reimplemented from TransformationModel.

◆ getDefaultParameters()

static void getDefaultParameters ( Param params)
static

Gets the default parameters.

◆ getParameters()

void getParameters ( double slope,
double intercept 
) const

Gets the "real" parameters.

◆ invert()

void invert ( )

Computes the inverse.

Exceptions
DivisionByZerois thrown if the slope is zero.

Member Data Documentation

◆ data_given_

bool data_given_
protected

Was the model estimated from data?

◆ intercept_

double intercept_
protected

◆ slope_

double slope_
protected

Parameters of the linear model.

◆ symmetric_

bool symmetric_
protected

Use symmetric regression?


OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:14 using doxygen 1.8.13