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

RWLogisticRegression


RWLogisticRegression RWRegression<double,bool>

Local Index

Members

Synopsis

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

Description

RWLogisticRegression is the class for performing basic logistic regression, described in Section 3.3, "Logistic Regression," in the Business Analysis Module User's Guide 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, "Intercept Option," in the Business Analysis Module User's Guide.

Example

Public Enumerations

enum InterceptOption {noIntercept, intercept, addIntercept}

Public Constructors

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

Public Member Functions

void 
addInterceptParameter();
void 
addObservation(const RWMathVec<double>&
     observedPredictorValues, bool observation);
void 
addObservations(const RWGenMat<double>& 
                observedPredictorValues, 
                const RWMathVec<bool>& observations);
void 
addPredictor(const RWMathVec<double>& predictorValues);
void 
addPredictors(const RWGenMat<double>& predictorValues);
const RWRegressionCalc<double,bool>& 
calcMethod() const;
bool 
fail() const;
bool 
hasInterceptParameter() const;
size_t 
numObservations() const;
size_t 
numParameters() const;
size_t 
numPredictors() const;
const RWMathVec<bool> 
observationVector() const;
RWMathVec<bool> 
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,bool>& c,
              bool 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 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.