| OpenMS 2.5.0

Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
QuadraticRegression Class Reference

`#include <OpenMS/MATH/STATISTICS/QuadraticRegression.h>`

## Public Member Functions

| QuadraticRegression ()
template<typename Iterator >
void | computeRegression (Iterator x_begin, Iterator x_end, Iterator y_begin)
template<typename Iterator >
void | computeRegressionWeighted (Iterator x_begin, Iterator x_end, Iterator y_begin, Iterator w_begin)
double | eval (double x) const
double | getA () const
double | getB () const
| A = the intercept. More...
double | getC () const
| B*X. More...
double | getChiSquared () const
| C*X^2. More...

## Static Public Member Functions

static double | eval (double A, double B, double C, double x)

## Protected Attributes

double | a_
double | b_
double | c_
double | chi_squared_

## Constructor & Destructor Documentation

## ◆ QuadraticRegression()

QuadraticRegression | ( |  | ) |

## Member Function Documentation

## ◆ computeRegression()

void computeRegression | ( | Iterator | x_begin,
|  | Iterator | x_end,
|  | Iterator | y_begin
| ) |  |

compute the quadratic regression over 2D points

## ◆ computeRegressionWeighted()

void computeRegressionWeighted | ( | Iterator | x_begin,
|  | Iterator | x_end,
|  | Iterator | y_begin,
|  | Iterator | w_begin
| ) |  |

compute the weighted quadratic regression over 2D points

References QuadraticRegression::a_, QuadraticRegression::b_, QuadraticRegression::c_, QuadraticRegression::chi_squared_, and OpenMS::Math::iteratorRange2Wm5Vectors().

## ◆ eval() [1/2]

double eval | ( | double | x | ) | const

evaluate the quadratic function

## ◆ eval() [2/2]

static double eval | ( | double | A,
|  | double | B,
|  | double | C,
|  | double | x
| ) |  |

static

evaluate using external coefficients

## ◆ getA()

double getA | ( |  | ) | const

## ◆ getB()

double getB | ( |  | ) | const

A = the intercept.

## ◆ getC()

double getC | ( |  | ) | const

B*X.

## ◆ getChiSquared()

double getChiSquared | ( |  | ) | const

C*X^2.

## Member Data Documentation

## ◆ a_

double a_

protected

Referenced by QuadraticRegression::computeRegressionWeighted().

## ◆ b_

double b_

protected

Referenced by QuadraticRegression::computeRegressionWeighted().

## ◆ c_

double c_

protected

Referenced by QuadraticRegression::computeRegressionWeighted().

## ◆ chi_squared_

double chi_squared_

protected

Referenced by QuadraticRegression::computeRegressionWeighted().