Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Functions
Statistics functions

Various statistical functions. More...

Functions

template<typename IteratorType >
static DoubleReal sum (IteratorType begin, IteratorType end)
 Calculates the sum of a range of values. More...
 
template<typename IteratorType >
static DoubleReal mean (IteratorType begin, IteratorType end)
 Calculates the mean of a range of values. More...
 
template<typename IteratorType >
static DoubleReal median (IteratorType begin, IteratorType end, bool sorted=FALSE)
 Calculates the median of a range of values. More...
 
template<typename IteratorType >
static DoubleReal quantile (IteratorType begin, IteratorType end, UInt quantile, bool sorted=FALSE)
 Calculates the quantile of a range of values. More...
 
template<typename IteratorType1 , typename IteratorType2 >
static DoubleReal meanSquareError (IteratorType1 begin_a, IteratorType1 end_a, IteratorType2 begin_b, IteratorType2 end_b)
 Calculates the mean square error for the values in [begin_a, end_a) and [begin_b, end_b) More...
 
template<typename IteratorType1 , typename IteratorType2 >
static DoubleReal classificationRate (IteratorType1 begin_a, IteratorType1 end_a, IteratorType2 begin_b, IteratorType2 end_b)
 Calculates the classification rate for the values in [begin_a, end_a) and [begin_b, end_b) More...
 
template<typename IteratorType1 , typename IteratorType2 >
static DoubleReal matthewsCorrelationCoefficient (IteratorType1 begin_a, IteratorType1 end_a, IteratorType2 begin_b, IteratorType2 end_b)
 Calculates the Matthews correlation coefficient for the values in [begin_a, end_a) and [begin_b, end_b) More...
 
template<typename IteratorType1 , typename IteratorType2 >
static DoubleReal 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, end_b) More...
 
template<typename IteratorType1 , typename IteratorType2 >
static DoubleReal rankCorrelationCoefficient (IteratorType1 begin_a, IteratorType1 end_a, IteratorType2 begin_b, IteratorType2 end_b)
 calculates the rank correlation coefficient for the values in [begin_a, end_a) and [begin_b, end_b) More...
 

Detailed Description

Various statistical functions.

These functions are defined in OpenMS/MATH/STATISTICS/StatisticFunctions.h .

Function Documentation

static DoubleReal OpenMS::Math::classificationRate ( IteratorType1  begin_a,
IteratorType1  end_a,
IteratorType2  begin_b,
IteratorType2  end_b 
)
static

Calculates the classification rate for the values in [begin_a, end_a) and [begin_b, end_b)

Calculates the classification rate for the data given by the two iterator ranges.

Exceptions
Exception::InvalidRangeis thrown if the iterator ranges are not of the same length or empty.
static DoubleReal OpenMS::Math::matthewsCorrelationCoefficient ( IteratorType1  begin_a,
IteratorType1  end_a,
IteratorType2  begin_b,
IteratorType2  end_b 
)
static

Calculates the Matthews correlation coefficient for the values in [begin_a, end_a) and [begin_b, end_b)

Calculates the Matthews correlation coefficient for the data given by the two iterator ranges. The values in [begin_a, end_a) have to be the predicted labels and the values in [begin_b, end_b) have to be the real labels.

Exceptions
Exception::InvalidRangeis thrown if the iterator ranges are not of the same length or empty.
static DoubleReal OpenMS::Math::mean ( IteratorType  begin,
IteratorType  end 
)
static
static DoubleReal OpenMS::Math::meanSquareError ( IteratorType1  begin_a,
IteratorType1  end_a,
IteratorType2  begin_b,
IteratorType2  end_b 
)
static

Calculates the mean square error for the values in [begin_a, end_a) and [begin_b, end_b)

Calculates the mean square error for the data given by the two iterator ranges.

Exceptions
Exception::InvalidRangeis thrown if the iterator ranges are not of the same length or empty.
static DoubleReal OpenMS::Math::median ( IteratorType  begin,
IteratorType  end,
bool  sorted = FALSE 
)
static

Calculates the median of a range of values.

Parameters
beginStart of range
endEnd of range (past-the-end iterator)
sortedIs the range already sorted? If not, it will be sorted.
Exceptions
Exception::InvalidRangeis thrown if the range is empty
static DoubleReal OpenMS::Math::pearsonCorrelationCoefficient ( IteratorType1  begin_a,
IteratorType1  end_a,
IteratorType2  begin_b,
IteratorType2  end_b 
)
static

Calculates the Pearson correlation coefficient for the values in [begin_a, end_a) and [begin_b, end_b)

Calculates the linear correlation coefficient for the data given by the two iterator ranges.

If one of the ranges contains only the same values 'nan' is returned.

Exceptions
Exception::InvalidRangeis thrown if the iterator ranges are not of the same length or empty.

Referenced by FeatureFinderAlgorithmPicked< PeakType, FeatureType >::checkFeatureQuality_(), FeatureFinderAlgorithmPicked< PeakType, FeatureType >::cropFeature_(), ModelFitter< PeakType, FeatureType >::evaluate_(), MaxLikeliFitter1D::fitOffset_(), and FeatureFinderAlgorithmPicked< PeakType, FeatureType >::isotopeScore_().

static DoubleReal OpenMS::Math::quantile ( IteratorType  begin,
IteratorType  end,
UInt  quantile,
bool  sorted = FALSE 
)
static

Calculates the quantile of a range of values.

Parameters
beginStart of range
endEnd of range (past-the-end iterator)
sortedIs the range already sorted? If not, it will be sorted.
Exceptions
Exception::InvalidRangeis thrown if the range is empty or a quantile over 100 is given
static DoubleReal OpenMS::Math::rankCorrelationCoefficient ( IteratorType1  begin_a,
IteratorType1  end_a,
IteratorType2  begin_b,
IteratorType2  end_b 
)
static

calculates the rank correlation coefficient for the values in [begin_a, end_a) and [begin_b, end_b)

Calculates the rank correlation coefficient for the data given by the two iterator ranges.

If one of the ranges contains only the same values 'nan' is returned.

Exceptions
Exception::InvalidRangeis thrown if the iterator ranges are not of the same length or empty.

References OpenMS::Math::computeRank().

Referenced by ModelFitter< PeakType, FeatureType >::evaluate_().

static DoubleReal OpenMS::Math::sum ( IteratorType  begin,
IteratorType  end 
)
static

OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:25 using doxygen 1.8.5