yat
0.14.5pre
|
naive fitting. More...
#include <yat/regression/NaiveWeighted.h>
Public Member Functions | |
NaiveWeighted (void) | |
The default constructor. | |
virtual | ~NaiveWeighted (void) |
The destructor. | |
void | fit (const utility::VectorBase &x, const utility::VectorBase &y, const utility::VectorBase &w) |
double | predict (const double x) const |
double | s2 (const 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. More... | |
naive fitting.
|
virtual |
This function computes the best-fit for the naive model from vectors x and y, by minimizing . The weight is proportional to the inverse of the variance for
Implements theplu::yat::regression::OneDimensionalWeighted.
|
virtual |
Function predicting value using the naive model, i.e. a weighted average.
Implements theplu::yat::regression::OneDimensionalWeighted.
|
inherited |
The prediction error is defined as expected squared deviation a new data point (with weight w) will be from the model value and is typically divided into the conditional variance ( see s2() ) given and the squared standard error ( see standard_error2() ) of the model estimation in .
|
inherited |
r2 is defined as or the fraction of the variance explained by the regression model.
|
virtual |
Rescaling all weights, both in fit and the passed w, results in the same returned value.
Implements theplu::yat::regression::OneDimensionalWeighted.
|
virtual |
Implements theplu::yat::regression::OneDimensionalWeighted.
|
protectedinherited |
Averager for pair of x and y
|
protectedinherited |
Chi-squared.
Chi-squared is defined as the