Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWLogisticRegression


RWLogisticRegression RWRegression<double,RWBoolean>

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

Synopsis

#include <rw/analytics/logregress.h>
RWMathVec<RWBoolean> o;
RWGenMat<double> p;
RWLogisticRegression lr(p, o);

Description

RWLogisticRegression is the class for performing basic logistic regression, described in Section 3.3. RWLogisticRegression receives data input in the form of a matrix of values for the predictor variables, and a vector of values for the observations. In addition, an intercept option must be specified. The interception option is an enumeration type defined in the regression class. It can have three possible values:

For a more detailed discussion of the intercept option, see Section 5.2.2.

Example

Public Enumerations

enum InterceptOption {noIntercept, intercept, addIntercept}

Public Constructors

RWLogisticRegression();
RWLogisticRegression(const RWLogisticRegression<T>& d);
RWLogisticRegression(const RWGenMat<double>& predictorData, 
                     const RWMathVec<RWBoolean>& obsVector,
                     InterceptOption intOpt=addIntercept);
RWLogisticRegression(const RWGenMat<double>& data, 
                  const RWMathVec<RWBoolean>& y, 
                  const RWRegressionCalc<double,RWBoolean>& c,
                  InterceptOption intOpt=addIntercept);

Public Member Functions

void 
addInterceptParameter();
void 
addObservation(const RWMathVec<double>&
              observedPredictorValues, RWBoolean observation);
void 
addObservations(const RWGenMat<double>& 
                observedPredictorValues, 
                const RWMathVec<RWBoolean>& observations);
void 
addPredictor(const RWMathVec<double>& predictorValues);
void 
addPredictors(const RWGenMat<double>& predictorValues);
const RWRegressionCalc<double,RWBoolean>& 
calcMethod() const;
RWBoolean 
fail() const;
RWBoolean 
hasInterceptParameter() const;
size_t 
numObservations() const;
size_t 
numParameters() const;
size_t 
numPredictors() const;
const RWMathVec<RWBoolean> 
observationVector() const;
RWMathVec<RWBoolean> 
observationVector();
RWGenMat<double> 
paramDispersionMatrix() const;
RWTValVector<RWLogisticRegressionParam> 
parameterEstimates() const;
const RWMathVec<double> 
parameters() const;
RWMathVec<double> 
predictedProbSuccess() const;
double 
predictedProbSuccess(const RWMathVec<double>& v) const;
RWMathVec<double> 
predictedProbSuccess(const RWGenMat<double>& m) const;
const RWGenMat<double> 
predictorMatrix() const;
RWGenMat<double> 
predictorMatrix();

NOTE:If you use this function to modify the predictor data, you must call reCalculateParameters().
void 
reCalculateParameters();
const RWGenMat<double> 
regressionMatrix() const;
void 
removeInterceptParameter();
void 
removeObservations(size_t startingIndex,size_t numToRemove);
void 
removePredictors(size_t startingIndex, size_t numToRemove);
RWMathVec<double> 
residuals() const;
void 
setCalcMethod(const RWRegressionCalc<double,RWBoolean>& c,
              RWBoolean recalculate=TRUE);
void
setRegressionData(const RWGenMat<T>& r, const RWMathVec<S>& o,
                  InterceptOption interceptOpt=addIntercept);
RWMathVec<double> 
variance() const;

Public Member Operator

RWLogisticRegression& 
operator=(const RWLogisticRegression& r);


Previous fileTop of DocumentContentsIndexNext file

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