Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

Math


Detailed Description

Math functions and classes.


Classes

class  BilinearInterpolation
 Provides access to bilinearly interpolated values (and derivatives) from discrete data points. Values beyond the given range of data points are implicitly taken as zero. More...
class  LinearInterpolation
 Provides access to linearly interpolated values (and derivatives) from discrete data points. Values beyond the given range of data points are implicitly taken as zero. More...
class  BasicStatistics
 Calculates some basic statistical parameters of a distribution: sum, mean, variance, and provides the normal approximation. More...
class  Histogram
 Representation of a histogram. More...
class  LinearRegression
 This class offers functions to perform least-squares fits to a straight line model, $ Y(c,x) = c_0 + c_1 x $. More...
class  ROCCurve
 ROCCurves show the tradeoff in sensitivity and specitivity for binary classifiers using different cutoff values. More...

Functions

static double ceil_decimal (double x, int decPow)
 rounds x up to the next decimal power 10 ^ decPow
static double round_decimal (double x, int decPow)
 rounds x to the next decimal power 10 ^ decPow
static double intervalTransformation (double x, double left1, double right1, double left2, double right2)
 transforms point x of interval [left1,right1] into interval [left2,right2]
double linear2log (double x)
 Transforms a number from linear to log10 scale. Avoids negative logarithms by adding 1.
double log2linear (double x)
 Transforms a number from log10 to to linear scale. Subtracts the 1 added by linear2log(double).
bool isOdd (UInt x)
 Returns true if the given interger is odd.
template<typename IteratorType1, typename IteratorType2>
static DoubleReal meanSquareError (IteratorType1 begin_a, const IteratorType1 end_a, IteratorType2 begin_b, const IteratorType2 end_b)
 Calculates the mean square error for the values in [begin_a, end_a) and [begin_b, end_b).
template<typename IteratorType1, typename IteratorType2>
static Real classificationRate (IteratorType1 begin_a, const IteratorType1 end_a, IteratorType2 begin_b, const IteratorType2 end_b)
 Calculates the classification rate for the values in [begin_a, end_a) and [begin_b, end_b).
template<typename IteratorType1, typename IteratorType2>
static DoubleReal matthewsCorrelationCoefficient (IteratorType1 begin_a, const IteratorType1 end_a, IteratorType2 begin_b, const IteratorType2 end_b)
 Calculates the Matthews Correlation Coefficient for the values in [begin_a, end_a) and [begin_b, end_b).
template<typename IteratorType1, typename IteratorType2>
static DoubleReal pearsonCorrelationCoefficient (IteratorType1 begin_a, IteratorType1 end_a, IteratorType2 begin_b, IteratorType2 end_b) throw (Exception::InvalidRange)
 calculates the pearson correlation coefficient for the values in [begin_a, end_a) and [begin_b, end_b)


Function Documentation

static double OpenMS::Math::ceil_decimal ( double  x,
int  decPow 
) [inline, static]

rounds x up to the next decimal power 10 ^ decPow

			e.g.: (123.0 , 1)  => 130
			      (123.0 , 2)  => 200
					  (0.123 ,-2)  => 0.13 ( 10^-2 = 0.01 )
			

static Real OpenMS::Math::classificationRate ( IteratorType1  begin_a,
const IteratorType1  end_a,
IteratorType2  begin_b,
const IteratorType2  end_b 
) [inline, 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. If one of the ranges contains a smaller number of values the rest of the longer range is omitted.

static double OpenMS::Math::intervalTransformation ( double  x,
double  left1,
double  right1,
double  left2,
double  right2 
) [inline, static]

transforms point x of interval [left1,right1] into interval [left2,right2]

bool OpenMS::Math::isOdd ( UInt  x  )  [inline]

Returns true if the given interger is odd.

double OpenMS::Math::linear2log ( double  x  )  [inline]

Transforms a number from linear to log10 scale. Avoids negative logarithms by adding 1.

Parameters:
x The number to transform

double OpenMS::Math::log2linear ( double  x  )  [inline]

Transforms a number from log10 to to linear scale. Subtracts the 1 added by linear2log(double).

Parameters:
x The number to transform

static DoubleReal OpenMS::Math::matthewsCorrelationCoefficient ( IteratorType1  begin_a,
const IteratorType1  end_a,
IteratorType2  begin_b,
const IteratorType2  end_b 
) [inline, 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. If one of the ranges contains a smaller number of values the rest of the longer range is omitted. 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.

Formerly called mcc, renamed for obvious reason.

static DoubleReal OpenMS::Math::meanSquareError ( IteratorType1  begin_a,
const IteratorType1  end_a,
IteratorType2  begin_b,
const IteratorType2  end_b 
) [inline, 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. If one of the ranges contains a smaller number of values the rest of the longer range is omitted.

static DoubleReal OpenMS::Math::pearsonCorrelationCoefficient ( IteratorType1  begin_a,
IteratorType1  end_a,
IteratorType2  begin_b,
IteratorType2  end_b 
) throw (Exception::InvalidRange) [inline, 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 the iterator ranges are not of the same length or empty an exception is thrown.

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

static double OpenMS::Math::round_decimal ( double  x,
int  decPow 
) [inline, static]

rounds x to the next decimal power 10 ^ decPow

			e.g.: (123.0 , 1)  => 120
			      (123.0 , 2)  => 100
			


Generated Tue Apr 1 15:36:40 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1