OpenMS
QuadraticRegression Class Reference

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

Collaboration diagram for QuadraticRegression:
[legend]

Public Member Functions

 QuadraticRegression ()
 
void computeRegression (std::vector< double >::const_iterator x_begin, std::vector< double >::const_iterator x_end, std::vector< double >::const_iterator y_begin)
 
void computeRegressionWeighted (std::vector< double >::const_iterator x_begin, std::vector< double >::const_iterator x_end, std::vector< double >::const_iterator y_begin, std::vector< double >::const_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()

Member Function Documentation

◆ computeRegression()

void computeRegression ( std::vector< double >::const_iterator  x_begin,
std::vector< double >::const_iterator  x_end,
std::vector< double >::const_iterator  y_begin 
)

compute the quadratic regression over 2D points

◆ computeRegressionWeighted()

void computeRegressionWeighted ( std::vector< double >::const_iterator  x_begin,
std::vector< double >::const_iterator  x_end,
std::vector< double >::const_iterator  y_begin,
std::vector< double >::const_iterator  w_begin 
)

compute the weighted quadratic regression over 2D points

◆ eval() [1/2]

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

evaluate using external coefficients

◆ eval() [2/2]

double eval ( double  x) const

evaluate the quadratic function

◆ 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

◆ b_

double b_
protected

◆ c_

double c_
protected

◆ chi_squared_

double chi_squared_
protected