yat
0.8.3pre
|
linear regression. More...
#include <yat/regression/LinearWeighted.h>
Public Member Functions | |
LinearWeighted (void) | |
The default constructor. | |
virtual | ~LinearWeighted (void) |
The destructor. | |
double | alpha (void) const |
double | alpha_var (void) const |
double | beta (void) const |
double | beta_var (void) const |
void | fit (const utility::VectorBase &x, const utility::VectorBase &y, const utility::VectorBase &w) |
double | predict (const double x) const |
double | s2 (double w=1) const |
double | standard_error2 (const double x) const |
double | prediction_error2 (const double x, const double w=1.0) const |
double | r2 (void) const |
Protected Attributes | |
statistics::AveragerPairWeighted | ap_ |
double | chisq_ |
Chi-squared. |
linear regression.
double theplu::yat::regression::LinearWeighted::alpha | ( | void | ) | const |
is estimated as
@return the parameter \form#174
double theplu::yat::regression::LinearWeighted::alpha_var | ( | void | ) | const |
double theplu::yat::regression::LinearWeighted::beta | ( | void | ) | const |
is estimated as
@return the parameter \form#178
double theplu::yat::regression::LinearWeighted::beta_var | ( | void | ) | const |
|
virtual |
This function computes the best-fit linear regression coefficients of the model from vectors x and y, by minimizing , where is the weighted average. By construction and are independent.
Implements theplu::yat::regression::OneDimensionalWeighted.
|
virtual |
Function predicting value using the linear model:
Implements theplu::yat::regression::OneDimensionalWeighted.
|
inherited |
The prediction error is defined as expected squared deviation a new data point (with weight @a w) will be from the model value \form#214 and is typically divided into the conditional variance ( see s2() ) given \form#62 and the squared standard error ( see standard_error2() ) of the model estimation in \form#62.
@return expected prediction error for a new data point in @a x with weight @a w.
|
inherited |
r2 is defined as or the fraction of the variance explained by the regression model.
|
virtual |
Noise level for points with weight w.
Implements theplu::yat::regression::OneDimensionalWeighted.
|
virtual |
estimated error .
Implements theplu::yat::regression::OneDimensionalWeighted.
|
protectedinherited |
Averager for pair of x and y
|
protectedinherited |
Chi-squared.
Chi-squared is defined as the