73 if (&source ==
this)
return *
this;
92 std::vector<float> real_data;
93 real_data.reserve(
set.size());
94 std::vector<float> model_data;
95 model_data.reserve(
set.size());
97 for (
Size i = 0; i <
set.size(); ++i)
99 real_data.push_back(
set[i].getIntensity());
107 for (offset = offset_min; offset <= offset_max; offset += offset_step)
114 for (
Size i = 0; i <
set.size(); ++i)
121 if (correlation > max_correlation)
123 max_correlation = correlation;
130 return max_correlation;
const LinearInterpolation & getInterpolation() const
Returns the interpolation class.
Definition: InterpolationModel.h:113
MaxLikeliFitter1D()
default constructor
Definition: MaxLikeliFitter1D.h:54
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:83
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method...
Definition: MaxLikeliFitter1D.h:133
Abstract base class for all 1D-model fitters using maximum likelihood optimization.
Definition: MaxLikeliFitter1D.h:47
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
KeyType const & getOffset() const
Accessor. "Offset" is the point (in "outside" units) which corresponds to "Data[0]".
Definition: LinearInterpolation.h:388
virtual Fitter1D & operator=(const Fitter1D &source)
assignment operator
MaxLikeliFitter1D(const MaxLikeliFitter1D &source)
copy constructor
Definition: MaxLikeliFitter1D.h:60
Abstract class for 1D-models that are approximated using linear interpolation.
Definition: InterpolationModel.h:54
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method...
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:509
virtual MaxLikeliFitter1D & operator=(const MaxLikeliFitter1D &source)
assignment operator
Definition: MaxLikeliFitter1D.h:71
~MaxLikeliFitter1D() override
destructor
Definition: MaxLikeliFitter1D.h:66
IntensityType getIntensity(const PositionType &pos) const override
access model predicted intensity at position pos
Definition: InterpolationModel.h:101
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
Abstract base class for all 1D-dimensional model fitter.
Definition: Fitter1D.h:58
virtual void setOffset(CoordinateType offset)
set the offset of the model
Definition: InterpolationModel.h:133
KeyType supportMin() const
Lower boundary of the support, in "outside" coordinates.
Definition: LinearInterpolation.h:459
std::vector< PeakType > RawDataArrayType
Peak type data container type using for the temporary storage of the input data.
Definition: Fitter1D.h:75