Class implements simple linear regression without intercept. More...
#include <regressionWithoutIntercept.hpp>
Public Member Functions | |
| void | estimate (const std::vector< double > &x, const std::vector< double > &y) |
| estimates the slope parameters (intercept = 0) basing on provided data More... | |
| void | estimate (const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &w) |
| estimates the slope parameters (intercept = 0) basing on provided data and weights More... | |
| std::vector< double > | getCoefficient () const |
| return coefficients of the regression More... | |
| double | operator() (double) const |
| evaluates the linear regression model for x More... | |
Public Member Functions inherited from julian::DeeplyCopyableRegression< RegressionWithoutIntercept > | |
| virtual Regression * | clone () const |
| virtual copy constructor More... | |
Public Member Functions inherited from julian::Regression | |
| Regression () | |
| Constructor. More... | |
| virtual | ~Regression () |
| Destructor. More... | |
Private Attributes | |
| double | chi_sq_ |
| The sum of squares of the residuals from the best-fit line. More... | |
| double | cov00_ |
| Variance of the slope estimate. More... | |
| double | cov01_ |
| Covariance of the slope/intercept estimates. More... | |
| double | cov11_ |
| Variance of the intercept estimate. More... | |
| double | c1_ |
| Slope of linear regression. More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &s, julian::RegressionWithoutIntercept &r) |
| Overloads stream operator. More... | |
Detailed Description
Class implements simple linear regression without intercept.
Simple linear regression is a linear regression model with a single explanatory variable without intercept. The parameters of the regression are calculated by minimizing the OLS. In other words class computes the best-fit linear regression coefficients
of the model
for the dataset (x, y) by minimizing the sum: 
For more information see Wikipedia
- Remarks
- Class uses algorithm implemented in GSL
Member Function Documentation
|
virtual |
estimates the slope parameters (intercept = 0) basing on provided data
Implements julian::Regression.
| void julian::RegressionWithoutIntercept::estimate | ( | const std::vector< double > & | x, |
| const std::vector< double > & | y, | ||
| const std::vector< double > & | w | ||
| ) |
estimates the slope parameters (intercept = 0) basing on provided data and weights
|
virtual |
return coefficients of the regression
The i-th term of vector represents coefficient of
Implements julian::Regression.
|
virtual |
evaluates the linear regression model for x
Implements julian::Regression.
Friends And Related Function Documentation
|
friend |
Overloads stream operator.
This overloaded operator enables to print the curve on the console.
Member Data Documentation
|
private |
Slope of linear regression.
|
private |
The sum of squares of the residuals from the best-fit line.
|
private |
Variance of the slope estimate.
|
private |
Covariance of the slope/intercept estimates.
|
private |
Variance of the intercept estimate.
The documentation for this class was generated from the following files:
- C:/Unix/home/OEM/jULIAN/src/mathematics/regressions/regressionWithoutIntercept.hpp
- C:/Unix/home/OEM/jULIAN/src/mathematics/regressions/regressionWithoutIntercept.cpp

Public Member Functions inherited from
1.8.11