This is the base class used to fit a regression line to compare 2 vectors.
More...
#include <regressionline.h>
|
void | calcSSE () |
| This function will calculate the sum of squares of errors for the regession line. More...
|
|
void | calcSSEWeights () |
| This function will calculate the weighted sum of squares of errors for the regession line. More...
|
|
void | calcSlope () |
| This function will calculate the slope of the regession line. More...
|
|
void | calcIntercept () |
| This function will calculate the intercept of the regession line. More...
|
|
void | calcSlopeIntercept () |
| This function will calculate both the slope and the intercept of the regession line. More...
|
|
|
int | error |
| This is the flag to denote whether an error has occured. More...
|
|
int | useweights |
| This is the flag to denote whether the weights should be used when calculating the fit to the regression line. More...
|
|
double | sse |
| This is the sum of squares of errors from the regression line. More...
|
|
double | a |
| This is the intercept of the regression line. More...
|
|
double | b |
| This is the slope of the regression line. More...
|
|
DoubleVector | w |
| This is the DoubleVector of weights that can be used to fit the regression line. More...
|
|
DoubleVector | x |
| This is the DoubleVector that will contain the the modelled data to be used to fit the regression line. More...
|
|
DoubleVector | y |
| This is the DoubleVector that will contain the the observed data to be used to fit the regression line. More...
|
|
LineType | linetype |
| This denotes what type of line fit is to be used for the regression line. More...
|
|
This is the base class used to fit a regression line to compare 2 vectors.
- Note
- This will always be overridden by the derived classes that actually fit the regression line
◆ Regression() [1/2]
Regression::Regression |
( |
| ) |
|
◆ Regression() [2/2]
Regression::Regression |
( |
LineType |
ltype | ) |
|
This is the Regression constructor for a regression line of a specified LineType.
- Parameters
-
ltype | is the LineType of the regression line |
◆ ~Regression()
virtual Regression::~Regression |
( |
| ) |
|
|
inlinevirtual |
◆ calcFit()
void Regression::calcFit |
( |
| ) |
|
This is the function that fits a regression line to compare the 2 vectors that have been stored, according to the LineType that has been defined.
◆ calcIntercept()
void Regression::calcIntercept |
( |
| ) |
|
|
protected |
This function will calculate the intercept of the regession line.
◆ calcSlope()
void Regression::calcSlope |
( |
| ) |
|
|
protected |
This function will calculate the slope of the regession line.
◆ calcSlopeIntercept()
void Regression::calcSlopeIntercept |
( |
| ) |
|
|
protected |
This function will calculate both the slope and the intercept of the regession line.
◆ calcSSE()
void Regression::calcSSE |
( |
| ) |
|
|
protected |
This function will calculate the sum of squares of errors for the regession line.
◆ calcSSEWeights()
void Regression::calcSSEWeights |
( |
| ) |
|
|
protected |
This function will calculate the weighted sum of squares of errors for the regession line.
◆ getError()
int Regression::getError |
( |
| ) |
|
|
inline |
This function will check to see if an error has occured.
- Returns
- error
◆ getIntercept()
double Regression::getIntercept |
( |
| ) |
|
|
inline |
This function will return the intercept of the regression line.
- Returns
- a
◆ getSlope()
double Regression::getSlope |
( |
| ) |
|
|
inline |
This function will return the slope of the regression line.
- Returns
- b
◆ getSSE()
double Regression::getSSE |
( |
| ) |
|
This function will return the sum of squares of errors calculated when fitting the regression line.
- Returns
- sse
◆ getType()
This function will return the fit type for the regression line.
- Returns
- fittype
◆ setIntercept()
void Regression::setIntercept |
( |
double |
intercept | ) |
|
|
inline |
This function will set the intercept of the regression line.
- Parameters
-
intercept | is the intercept of the regression line |
◆ setSlope()
void Regression::setSlope |
( |
double |
slope | ) |
|
|
inline |
This function will set the slope of the regression line.
- Parameters
-
slope | is the slope of the regession line |
◆ setWeights()
This function will set the weights that can be used to fit the regression line.
- Parameters
-
◆ storeVectors()
This is the intercept of the regression line.
This is the slope of the regression line.
◆ error
This is the flag to denote whether an error has occured.
◆ linetype
This denotes what type of line fit is to be used for the regression line.
◆ sse
This is the sum of squares of errors from the regression line.
◆ useweights
int Regression::useweights |
|
protected |
This is the flag to denote whether the weights should be used when calculating the fit to the regression line.
This is the DoubleVector of weights that can be used to fit the regression line.
This is the DoubleVector that will contain the the modelled data to be used to fit the regression line.
This is the DoubleVector that will contain the the observed data to be used to fit the regression line.
The documentation for this class was generated from the following files: