 |
OpenMS
3.0.0
|
|
Go to the documentation of this file.
97 enum MODELTYPE { LINEAR, LINEAR_WEIGHTED, QUADRATIC, QUADRATIC_WEIGHTED, SIZE_OF_MODELTYPE };
98 static const std::string names_of_modeltype[];
106 static MODELTYPE nameToEnum(
const std::string& name);
113 static const std::string& enumToName(
MODELTYPE mt);
130 static void setRANSACSeed(
int seed);
140 static void setCoefficientLimits(
double offset,
double scale,
double power);
159 bool isTrained()
const;
164 double getRT()
const;
178 double predict(
double mz)
const;
191 static Size findNearest(
const std::vector<MZTrafoModel>& tms,
double rt);
199 return left < right.
rt_;
203 return left.
rt_ < right;
207 return left.
rt_ < right.
rt_;
232 double rt_left = -std::numeric_limits<double>::max(),
233 double rt_right = std::numeric_limits<double>::max()
260 bool train(std::vector<double> error_mz,
261 std::vector<double> theo_mz,
262 std::vector<double> weights,
277 void getCoefficients(
double& intercept,
double& slope,
double& power);
295 void setCoefficients(
double intercept,
double slope,
double power);
static double limit_scale_
acceptable boundary for the estimated scale; if estimated scale is larger (absolute) the model does n...
Definition: MZTrafoModel.h:75
const std::string & toString(const DriftTimeUnit value)
MODELTYPE
Definition: MZTrafoModel.h:97
A simple struct to carry all the parameters required for a RANSAC run.
Definition: RANSAC.h:58
std::vector< double > coeff_
Model coefficients (for both linear and quadratic models), estimated from the data.
Definition: MZTrafoModel.h:68
A more convenient string class.
Definition: String.h:58
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
bool use_ppm_
during training, model is build on absolute or relative(ppm) predictions. predict(),...
Definition: MZTrafoModel.h:69
static int ransac_seed_
seed used for all RANSAC invocations
Definition: MZTrafoModel.h:73
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
bool operator()(const double &left, const MZTrafoModel &right) const
Definition: MZTrafoModel.h:197
Create and apply models of a mass recalibration function.
Definition: MZTrafoModel.h:64
static double limit_offset_
acceptable boundary for the estimated offset; if estimated offset is larger (absolute) the model does...
Definition: MZTrafoModel.h:74
double rt_
retention time associated to the model (i.e. where the calibrant data was taken from)
Definition: MZTrafoModel.h:70
Comparator by position. As this class has dimension 1, this is basically an alias for MZLess.
Definition: MZTrafoModel.h:195
bool operator()(const MZTrafoModel &left, const MZTrafoModel &right) const
Definition: MZTrafoModel.h:205
static Math::RANSACParam * ransac_params_
global pointer, init to NULL at startup; set class-global RANSAC params
Definition: MZTrafoModel.h:72
A helper class, holding all calibration points.
Definition: CalibrationData.h:64
static double limit_power_
acceptable boundary for the estimated power; if estimated power is larger (absolute) the model does n...
Definition: MZTrafoModel.h:76
bool operator()(const MZTrafoModel &left, const double &right) const
Definition: MZTrafoModel.h:201