SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Encapsulates four different model selection algorithms for linear regression: forward, backward, stepwise, and exhaustive. More...
#include <rw/analytics/lnrmodsel.h>
Class RWLinRegModelSelector encapsulates four different model selection algorithms for linear regression. The algorithms are forward, backward, stepwise, and exhaustive. Refer to Chapter 4, "Model Selection," in the Business Analysis Module User's Guide for more details about model selection and differences between the four algorithms.
The template parameter F
determines the model evaluation criterion object used during model selection search. In the synopsis above, the F statistic is used as the model evaluation criterion. You can substitute your own model evaluation object, provided that it defines the operator()
method in the same way as the class RWLinRegressFStatistic.
An instance of the class RWLinRegModelSelector is constructed with a linear regression and a choice of model selection algorithm. At any time, the user may change the selection algorithm or the specific linear regression model. The class provides results of model selection search, including the indices of the predictor variables that were selected, the parameter values for the selected indices, and the model evaluation criterion for the selected predictor variables.
To be used as a template parameter for RWLinRegModelSelector, a class F
must implement the following interface:
The following example performs forward selection search on a linear regression model, where the model evaluation criterion is the F statistic.
|
inline |
Default constructor. Behavior undefined.
|
inline |
Copy constructor.
|
inline |
Constructs a model selector using the search method s.
|
inline |
Assignment operator.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |