SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Calculates linear regression parameters using QR decomposition. More...
#include <rw/analytics/lsqqr.h>
Public Member Functions | |
RWLeastSqQRCalc () | |
virtual void | addPredToBaseCalc (const RWAddPredictors< double, double > &dataChange) |
virtual void | calc (const RWGenMat< double > &r, const RWMathVec< double > &o) |
virtual RWRegressionCalc< double, double > * | clone () const |
virtual bool | fail () const |
virtual RWCString | name () const |
virtual RWMathVec< double > | parameters () const |
virtual void | removePredFromBaseCalc (const RWRemovePredictors< double, double > &dataChange) |
virtual void | setBaseCalc (const RWGenMat< double > &, const RWMathVec< double > &) |
Public Member Functions inherited from RWRegressionCalc< double, double > | |
RWRegressionCalc () | |
virtual void | addObsToBaseCalc (const RWAddObservations< double, double > &dataChange) |
virtual void | removeObsFromBaseCalc (const RWRemoveObservations< double, double > &dataChange) |
Class RWLeastSqQRCalc implements the calculation of linear regression parameters using QR decomposition, as described in Section 5.5.1.1, "RWLeastSqQRCalc," in the Business Analysis Module User's Guide.
RWLeastSqQRCalc::RWLeastSqQRCalc | ( | ) |
Constructs an empty RWLeastSqQRCalc object.
|
virtual |
Expands the regression model to include new predictor variables. This method has the option of using results from the base calculation to calculate the coefficients for the larger predictor set. Consequently, this method can be called only when a base calculation has been set using setBaseCalc(). The input variable contains the data for the added predictor variables. The default implementation simply recalculates the parameters from scratch using the calc() method.
Reimplemented from RWRegressionCalc< double, double >.
|
virtual |
Calculates the parameters for the regression model. Invoking this method does not affect the state of any existing base calculation.
Implements RWRegressionCalc< double, double >.
|
inlinevirtual |
Allocates and creates a clone, or exact copy, of the current instance, and returns a pointer to the copy. Caller is responsible for deleting the returned object.
Implements RWRegressionCalc< double, double >.
|
inlinevirtual |
Returns true
if the calculation failed.
Implements RWRegressionCalc< double, double >.
|
inlinevirtual |
Returns the name of the calculation method.
Implements RWRegressionCalc< double, double >.
|
virtual |
Returns the parameters from the last calculation performed. If the calculation failed, and this method is called, an exception of type RWInternalErr is thrown.
Implements RWRegressionCalc< double, double >.
|
virtual |
Shrinks the regression model to exclude previously used predictor variables. This method offers the option of using results from the base calculation to calculate the coefficients for the smaller predictor set. Consequently, this method can be called only when a base calculation has been set using setBaseCalc(). The input variable indicates the indices of the columns to be removed from the regression matrix used in the base calculation. The default implementation simply recalculates the parameters from scratch using the calc() method.
Reimplemented from RWRegressionCalc< double, double >.
|
virtual |
Calculates the coefficients for the input regression data and sets the base calculation to this calculation. Deriving classes need not override this method if they do not store base calculation results. The default implementation calls the calc() method.
Reimplemented from RWRegressionCalc< double, double >.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |