OpenMS
2.8.0
|
This class offers functions to perform least-squares fits to a straight line model, . More...
#include <OpenMS/MATH/STATISTICS/LinearRegressionWithoutIntercept.h>
Public Member Functions | |
LinearRegressionWithoutIntercept () | |
Constructor. More... | |
void | addData (double x, double y) |
adds an observation (x,y) to the regression data set. More... | |
void | addData (std::vector< double > &x, std::vector< double > &y) |
adds observations (x,y) to the regression data set. More... | |
double | getSlope () const |
returns the slope of the estimated regression line. More... | |
Private Attributes | |
double | sum_xx_ |
total variation in x More... | |
double | sum_xy_ |
sum of products More... | |
int | n_ |
number of observations More... | |
This class offers functions to perform least-squares fits to a straight line model, .
Constructor.
void addData | ( | double | x, |
double | y | ||
) |
adds an observation (x,y) to the regression data set.
x | independent variable value |
y | dependent variable value |
void addData | ( | std::vector< double > & | x, |
std::vector< double > & | y | ||
) |
adds observations (x,y) to the regression data set.
x | vector of independent variable values |
y | vector of dependent variable values |
double getSlope | ( | ) | const |
returns the slope of the estimated regression line.
|
private |
number of observations
|
private |
total variation in x
|
private |
sum of products