Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Business Analysis Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWRegressionCalc<T,S>


Does not inherit

Local Index

Members

Synopsis

#include <rw/analytics/regcalc.h>

Abstract base class

Description

The abstract base class RWRegressionCalc<T,S> defines the interface for the regression parameter calculation objects used in Linear Algebra Module. Classes derived from RWRegressionCalc<T,S> include RWLeastSqQRCalc, RWLeastSqQRPvtCalc, and RWLeastSqSVDCalc for linear regression, and RWLogisticIterLSQ and RWLogisticLevenbergMarquardt for logistic regression. The template parameter T specifies the datatype for elements in the predictor matrix (usually double), and the template parameter S specifies the datatype for elements in the observation vector (usually double for linear regression and bool for logistic regression).

If you want to provide your own parameter calculation algorithm as an alternative to those already available in Linear Algebra Module, it is useful to understand the interface to RWRegressionCalc<T,S>. Otherwise, once you have provided an implementation class derived from RWRegressionCalc<T,S>, you can use that implementation simply by calling the method RWLinearRegression::setCalcMethod() or the method RWLogisticRegression::setCalcMethod() with an instance of the implementation class.

Public Constructor

RWRegressionCalc();

Public Member Functions

virtual 
void 
addObsToBaseCalc(const RWAddObservations<T,S>& r);
virtual 
void
addPredToBaseCalc(const RWAddPredictors<T,S>& r);
virtual 
void
calc(const RWGenMat<T>& xdata, RWMathVec<S> ydata)=0;
virtual 
RWRegressionCalc<T,S>* 
clone() const = 0;
virtual 
bool 
fail() const = 0;
virtual 
RWCString 
name() const = 0;
virtual
RWMathVec<T>
parameters() const = 0;
virtual 
void
removeObsFromBaseCalc(const RWRemoveObservations<T,S>& r);
virtual 
void
removePredFromBaseCalc(const RWRemovePredictors<T,S>& r);
virtual 
void
setBaseCalc(const RWGenMat<T>& xdata, 
            const RWMathVec<S>& ydata);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.