SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Performs basic logistic regression on a matrix of predictor variables and a vector of observations. More...
#include <rw/analytics/logregress.h>
Public Member Functions | |
RWLogisticRegression () | |
RWLogisticRegression (const RWGenMat< double > predictorData, const RWMathVec< bool > obsVector, const RWRegressionCalc< double, bool > &calcObject, InterceptOption interceptOpt=addIntercept) | |
RWLogisticRegression (const RWGenMat< double > predictorData, const RWMathVec< bool > obsVector, InterceptOption interceptOpt=addIntercept) | |
RWLogisticRegression (const RWLogisticRegression &rhs) | |
RWLogisticRegression & | operator= (const RWLogisticRegression &rhs) |
RWGenMat< double > | paramDispersionMatrix () const |
RWTValVector< RWLogisticRegressionParam > | parameterEstimates () const |
RWMathVec< double > | predictedProbSuccess () const |
RWMathVec< double > | predictedProbSuccess (const RWGenMat< double > &m) const |
double | predictedProbSuccess (const RWMathVec< double > &v) const |
RWMathVec< double > | residuals () const |
RWMathVec< double > | variance () const |
![]() | |
void | addInterceptParameter () |
void | addObservation (const RWMathVec< double > &, bool) |
void | addObservations (const RWGenMat< double > &, const RWMathVec< bool > &) |
void | addPredictor (const RWMathVec< double > &) |
void | addPredictors (const RWGenMat< double > &) |
const RWRegressionCalc< double, bool > & | calcMethod () const |
bool | fail () const |
bool | hasInterceptParameter () const |
size_t | numObservations () const |
size_t | numParameters () const |
size_t | numPredictors () const |
RWMathVec< bool > | observationVector () |
const RWMathVec< bool > | observationVector () const |
const RWMathVec< double > | parameters () const |
RWGenMat< double > | predictorMatrix () |
const RWGenMat< double > | predictorMatrix () const |
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) |
void | setCalcMethod (const RWRegressionCalc< double, bool > &c, bool recalculate=true) |
void | setRegressionData (const RWGenMat< double > &r, const RWMathVec< bool > &o, InterceptOption interceptOpt=addIntercept) |
Additional Inherited Members | |
![]() | |
enum | InterceptOption |
RWLogisticRegression is the class for performing basic logistic regression, described 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 RWRegression class. It can have three possible values:
For a more detailed discussion of the intercept option, see the Business Analysis Module User's Guide.
|
inline |
Constructs an empty logistic regression object. Behavior is undefined.
|
inline |
Constructs a copy of rhs.
|
inline |
Constructs a regression object with predictor matrix predictorData and observation vector obsVector. The interceptOpt parameter indicates whether or not the model contains an intercept parameter. The default parameter calculation method is iterative least squares.
|
inline |
Constructs a regression object with predictor matrix predictorData and observation vector obsVector. The interceptOpt parameter indicates whether or not the model contains an intercept parameter. Parameter calculation is done using the method calcObject. Methods currently available include iterative least squares and an algorithm based on the Levenberg-Marquardt approach.
|
inline |
Assigns rhs to self.
RWGenMat< double > RWLogisticRegression::paramDispersionMatrix | ( | ) | const |
Returns the parameter variance-covariance matrix.
RWTValVector< RWLogisticRegressionParam > RWLogisticRegression::parameterEstimates | ( | ) | const |
Returns the list of estimated parameters.
RWMathVec< double > RWLogisticRegression::predictedProbSuccess | ( | ) | const |
Returns the model's predicted success probabilities for the input predictor data.
RWMathVec< double > RWLogisticRegression::predictedProbSuccess | ( | const RWGenMat< double > & | m | ) | const |
Returns the model's predicted success probabilities for the input predictor data.
double RWLogisticRegression::predictedProbSuccess | ( | const RWMathVec< double > & | v | ) | const |
Returns the success probabilities predicted for the predictor data used to construct the model.
RWMathVec< double > RWLogisticRegression::residuals | ( | ) | const |
Returns the vector of differences between the probabilities of success predicted by the model and those predicted by the observed value.
|
inline |
Returns the variance estimate for each observation. If is the predicted probability of success for the ith observation, then .
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |