Gadget
Public Member Functions | List of all members
LogWeightRegression Class Reference

This is the class used to fit a weighted log linear regression line to compare 2 vectors. More...

#include <regressionline.h>

Inheritance diagram for LogWeightRegression:
Inheritance graph
Collaboration diagram for LogWeightRegression:
Collaboration graph

Public Member Functions

 LogWeightRegression (LineType ltype)
 This is the default LogWeightRegression constructor. More...
 
 ~LogWeightRegression ()
 This is the default LogWeightRegression destructor. More...
 
virtual void storeVectors (const DoubleVector &modData, const DoubleVector &obsData)
 This is the function that stores 2 vectors that will be compared using a log linear regression line. More...
 
- Public Member Functions inherited from LogLinearRegression
 LogLinearRegression (LineType ltype)
 This is the default LogLinearRegression constructor. More...
 
 ~LogLinearRegression ()
 This is the default LogLinearRegression destructor. More...
 
- Public Member Functions inherited from Regression
 Regression ()
 This is the default Regression constructor. More...
 
 Regression (LineType ltype)
 This is the Regression constructor for a regression line of a specified LineType. More...
 
virtual ~Regression ()
 This is the default Regression destructor. More...
 
void 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. More...
 
void setIntercept (double intercept)
 This function will set the intercept of the regression line. More...
 
void setSlope (double slope)
 This function will set the slope of the regression line. More...
 
void setWeights (const DoubleVector &weights)
 This function will set the weights that can be used to fit the regression line. More...
 
int getError ()
 This function will check to see if an error has occured. More...
 
double getSSE ()
 This function will return the sum of squares of errors calculated when fitting the regression line. More...
 
double getIntercept ()
 This function will return the intercept of the regression line. More...
 
double getSlope ()
 This function will return the slope of the regression line. More...
 
LineType getType () const
 This function will return the fit type for the regression line. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Regression
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...
 
- Protected Attributes inherited from Regression
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...
 

Detailed Description

This is the class used to fit a weighted log linear regression line to compare 2 vectors.

Constructor & Destructor Documentation

◆ LogWeightRegression()

LogWeightRegression::LogWeightRegression ( LineType  ltype)

This is the default LogWeightRegression constructor.

Parameters
ltypeis the LineType of the regression line

◆ ~LogWeightRegression()

LogWeightRegression::~LogWeightRegression ( )
inline

This is the default LogWeightRegression destructor.

Member Function Documentation

◆ storeVectors()

void LogWeightRegression::storeVectors ( const DoubleVector modData,
const DoubleVector obsData 
)
virtual

This is the function that stores 2 vectors that will be compared using a log linear regression line.

Parameters
modDatais the DoubleVector containing the modelled data
obsDatais the DoubleVector containing the observed data

Reimplemented from LogLinearRegression.


The documentation for this class was generated from the following files: