Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWRegressionCalc<T,S>



Data Type and Member Function Indexes
(exclusive of constructors and destructors)

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 Analytics.h++. 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 RWBoolean for logistic regression).

If you want to provide your own parameter calculation algorithm as an alternative to those already available in Analytics.h++, 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 
RWBoolean 
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 DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.