simpleLinearRegression.hpp
Go to the documentation of this file.
31 SimpleLinearRegression(): chi_sq_(0.0), cov00_(0.0), cov01_(0.0), cov11_(0.0), c0_(0.0), c1_(0.0) {};
34 void estimate(const std::vector<double>& x,const std::vector<double>& y,const std::vector<double>& w);
double operator()(double) const
evaluates the linear regression model for x
Definition: simpleLinearRegression.cpp:8
std::ostream & operator<<(std::ostream &s, julian::SimpleLinearRegression &r)
Overloads stream operator.
Definition: simpleLinearRegression.cpp:46
double getIntercept()
returns intercept
Definition: simpleLinearRegression.cpp:20
Definition: cadHoliday.cpp:3
double c1_
Slope of linear regression.
Definition: simpleLinearRegression.hpp:47
Class implements simple linear regression.
Definition: simpleLinearRegression.hpp:29
double chi_sq_
The sum of squares of the residuals from the best-fit line.
Definition: simpleLinearRegression.hpp:42
void estimate(const std::vector< double > &x, const std::vector< double > &y)
estimates the parameters basing on provided data
Definition: simpleLinearRegression.cpp:26
double cov00_
Variance of the slope estimate.
Definition: simpleLinearRegression.hpp:43
double cov01_
Covariance of the slope/intercept estimates.
Definition: simpleLinearRegression.hpp:44
double cov11_
Variance of the intercept estimate.
Definition: simpleLinearRegression.hpp:45
Class uses Curiously Recurring Template Pattern to implement polymorphic copy construction in every d...
Definition: regression.hpp:60
double c0_
Intercept of linear regression.
Definition: simpleLinearRegression.hpp:46
double getSlope()
returns slope
Definition: simpleLinearRegression.cpp:14
std::vector< double > getCoefficient() const
return coefficients of the regression
Definition: simpleLinearRegression.cpp:40
File contains interface of regressions.