Linear model for transformations. More...
#include <OpenMS/ANALYSIS/MAPMATCHING/TransformationModelLinear.h>
Public Member Functions | |
TransformationModelLinear (const DataPoints &data, const Param ¶ms) | |
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 Param & | getParameters () const |
Gets the (actual) parameters. More... | |
Static Public Member Functions | |
static void | getDefaultParameters (Param ¶ms) |
Gets the default parameters. More... | |
Static Public Member Functions inherited from TransformationModel | |
static void | getDefaultParameters (Param ¶ms) |
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, double > | DataPoint |
Coordinate pair. More... | |
typedef std::vector< DataPoint > | DataPoints |
Vector of coordinate pairs. More... | |
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 ( on ) is performed.
Without data, the model can be specified by giving the parameters slope
and intercept
explicitly.
TransformationModelLinear | ( | const DataPoints & | data, |
const Param & | params | ||
) |
Constructor.
IllegalArgument | is thrown if neither data points nor explicit parameters (slope/intercept) are given. |
Destructor.
Evaluates the model at the given value.
Reimplemented from TransformationModel.
|
static |
Gets the default parameters.
void invert | ( | ) |
Computes the inverse.
DivisionByZero | is thrown if the slope is zero. |
|
protected |
Was the model estimated from data?
|
protected |
|
protected |
Parameters of the linear model.
|
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 |