OpenMS
|
This class offers functions to perform least-squares fits to a straight line model, \( Y(c,x) = c_0 + c_1 x \). More...
#include <OpenMS/ML/REGRESSION/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, \( Y(c,x) = c_0 + c_1 x \).
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