35 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_MAXLIKELIFITTER1D_H 36 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_MAXLIKELIFITTER1D_H 74 if (&source ==
this)
return *
this;
93 std::vector<float> real_data;
94 real_data.reserve(
set.size());
95 std::vector<float> model_data;
96 model_data.reserve(
set.size());
98 for (
Size i = 0; i <
set.size(); ++i)
100 real_data.push_back(
set[i].getIntensity());
108 for (offset = offset_min; offset <= offset_max; offset += offset_step)
115 for (
Size i = 0; i <
set.size(); ++i)
122 if (correlation > max_correlation)
124 max_correlation = correlation;
131 return max_correlation;
142 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_MAXLIKELIFITTER1D_H const LinearInterpolation & getInterpolation() const
Returns the interpolation class.
Definition: InterpolationModel.h:114
MaxLikeliFitter1D()
default constructor
Definition: MaxLikeliFitter1D.h:55
QualityType fitOffset_(InterpolationModel *model, const RawDataArrayType &set, const CoordinateType stdev1, const CoordinateType stdev2, const CoordinateType offset_step)
fit an offset on the basis of the Pearson correlation coefficient
Definition: MaxLikeliFitter1D.h:84
void updateMembers_()
This method is used to update extra member variables at the end of the setParameters() method...
Definition: MaxLikeliFitter1D.h:134
Abstract base class for all 1D-model fitters using maximum likelihood optimization.
Definition: MaxLikeliFitter1D.h:48
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
KeyType const & getOffset() const
Accessor. "Offset" is the point (in "outside" units) which corresponds to "Data[0]".
Definition: LinearInterpolation.h:389
virtual Fitter1D & operator=(const Fitter1D &source)
assignment operator
IntensityType getIntensity(const PositionType &pos) const
access model predicted intensity at position pos
Definition: InterpolationModel.h:102
MaxLikeliFitter1D(const MaxLikeliFitter1D &source)
copy constructor
Definition: MaxLikeliFitter1D.h:61
Abstract class for 1D-models that are approximated using linear interpolation.
Definition: InterpolationModel.h:55
static double pearsonCorrelationCoefficient(IteratorType1 begin_a, IteratorType1 end_a, IteratorType2 begin_b, IteratorType2 end_b)
Calculates the Pearson correlation coefficient for the values in [begin_a, end_a) and [begin_b...
Definition: StatisticFunctions.h:510
virtual ~MaxLikeliFitter1D()
destructor
Definition: MaxLikeliFitter1D.h:67
virtual MaxLikeliFitter1D & operator=(const MaxLikeliFitter1D &source)
assignment operator
Definition: MaxLikeliFitter1D.h:72
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
Abstract base class for all 1D-dimensional model fitter.
Definition: Fitter1D.h:59
virtual void setOffset(CoordinateType offset)
set the offset of the model
Definition: InterpolationModel.h:134
KeyType supportMin() const
Lower boundary of the support, in "outside" coordinates.
Definition: LinearInterpolation.h:460
virtual void updateMembers_()
This method is used to update extra member variables at the end of the setParameters() method...
std::vector< PeakType > RawDataArrayType
Raw data container type using for the temporary storage of the input data.
Definition: Fitter1D.h:76