OpenMS  2.8.0
Classes | Namespaces | Functions
StatisticFunctions.h File Reference
#include <vector>
#include <OpenMS/CONCEPT/Exception.h>
#include <OpenMS/CONCEPT/Types.h>
#include <algorithm>
#include <cmath>
#include <iterator>
#include <numeric>
Include dependency graph for StatisticFunctions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SummaryStatistics< T >
 Helper class to gather (and dump) some statistics from a e.g. vector<double>. More...
 

Namespaces

 OpenMS
 Main OpenMS namespace.
 
 OpenMS::Math
 Math namespace.
 

Functions

template<typename IteratorType >
static void checkIteratorsNotNULL (IteratorType begin, IteratorType end)
 Helper function checking if two iterators are not equal. More...
 
template<typename IteratorType >
static void checkIteratorsEqual (IteratorType begin, IteratorType end)
 Helper function checking if two iterators are equal. More...
 
template<typename IteratorType1 , typename IteratorType2 >
static void checkIteratorsAreValid (IteratorType1 begin_b, IteratorType1 end_b, IteratorType2 begin_a, IteratorType2 end_a)
 Helper function checking if an iterator and a co-iterator both have a next element. More...
 
template<typename IteratorType >
static double sum (IteratorType begin, IteratorType end)
 Calculates the sum of a range of values. More...
 
template<typename IteratorType >
static double mean (IteratorType begin, IteratorType end)
 Calculates the mean of a range of values. More...
 
template<typename IteratorType >
static double median (IteratorType begin, IteratorType end, bool sorted=false)
 Calculates the median of a range of values. More...
 
template<typename IteratorType >
double MAD (IteratorType begin, IteratorType end, double median_of_numbers)
 median absolute deviation (MAD) More...
 
template<typename IteratorType >
double MeanAbsoluteDeviation (IteratorType begin, IteratorType end, double mean_of_numbers)
 mean absolute deviation (MeanAbsoluteDeviation) More...
 
template<typename IteratorType >
static double quantile1st (IteratorType begin, IteratorType end, bool sorted=false)
 Calculates the first quantile of a range of values. More...
 
template<typename IteratorType >
static double quantile3rd (IteratorType begin, IteratorType end, bool sorted=false)
 Calculates the third quantile of a range of values. More...
 
template<typename IteratorType >
static double variance (IteratorType begin, IteratorType end, double mean=std::numeric_limits< double >::max())
 Calculates the variance of a range of values. More...
 
template<typename IteratorType >
static double sd (IteratorType begin, IteratorType end, double mean=std::numeric_limits< double >::max())
 Calculates the standard deviation of a range of values. More...
 
template<typename IteratorType >
static double absdev (IteratorType begin, IteratorType end, double mean=std::numeric_limits< double >::max())
 Calculates the absolute deviation of a range of values. More...
 
template<typename IteratorType1 , typename IteratorType2 >
static double covariance (IteratorType1 begin_a, IteratorType1 end_a, IteratorType2 begin_b, IteratorType2 end_b)
 Calculates the covariance of two ranges of values. More...
 
template<typename IteratorType1 , typename IteratorType2 >
static double 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 double 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 double 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 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, end_b) More...
 
template<typename Value >
static void computeRank (std::vector< Value > &w)
 Replaces the elements in vector w by their ranks. More...
 
template<typename IteratorType1 , typename IteratorType2 >
static double 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...