Linear model for transformations. More...
#include <OpenMS/ANALYSIS/MAPMATCHING/TransformationModel.h>
Public Member Functions | |
| TransformationModelLinear (const DataPoints &data, const Param ¶ms) | |
| Constructor. | |
| ~TransformationModelLinear () | |
| Destructor. | |
| virtual DoubleReal | evaluate (const DoubleReal value) const |
| Evaluates the model at the given value. | |
| void | getParameters (DoubleReal &slope, DoubleReal &intercept) const |
| Gets the "real" parameters. | |
| void | invert () |
| Computes the inverse. | |
Static Public Member Functions | |
| static void | getDefaultParameters (Param ¶ms) |
| Gets the default parameters. | |
Protected Attributes | |
| DoubleReal | slope_ |
| Parameters of the linear model. | |
| DoubleReal | intercept_ |
| bool | data_given_ |
| Was the model estimated from data? | |
| bool | symmetric_ |
| Use symmetric regression? | |
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.
| virtual 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 getParameters | ( | DoubleReal & | slope, | |
| DoubleReal & | intercept | |||
| ) | const |
Gets the "real" parameters.
| void invert | ( | ) |
Computes the inverse.
| DivisionByZero | is thrown if the slope is zero. |
bool data_given_ [protected] |
Was the model estimated from data?
DoubleReal intercept_ [protected] |
DoubleReal slope_ [protected] |
Parameters of the linear model.
bool symmetric_ [protected] |
Use symmetric regression?
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:49 using doxygen 1.7.1 |