SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWRegressionModelSelector< T, S, F > Class Template Reference

The base class for the model selection classes for linear or logistic regression. More...

#include <rw/analytics/regsel.h>

Public Member Functions

 RWRegressionModelSelector ()
 
 RWRegressionModelSelector (const RWRegression< T, S > &reg, RWSearchMethod s)
 
 RWRegressionModelSelector (const RWRegressionModelSelector< T, S, F > &rhs)
 
virtual ~RWRegressionModelSelector ()
 
const RWRegressionCalc< T, S > & calcMethod () const
 
evalFunctionForSelected () const
 
bool fail () const
 
RWCString failMessage () const
 
RWRegressionModelSelector< T, S, F > & operator= (const RWRegressionModelSelector< T, S, F > &rhs)
 
RWSearchMethod searchMethod () const
 
const RWBitVecselectedParamIndices () const
 
const RWBitVecselectedParamIndices (RWSearchMethod s)
 
const RWMathVec< T > & selectedParamValues () const
 
void setCalcMethod (const RWRegressionCalc< T, S > &c)
 
void setRegression (const RWRegression< T, S > &r)
 
void setSearchMethod (RWSearchMethod s)
 

Detailed Description

template<class T, class S, class F>
class RWRegressionModelSelector< T, S, F >

This is the base class for the model selection classes for linear or logistic regression. The template parameters are:

  • T, the predictor variable type
  • S, the observation variable type
  • F, the Functor for evaluating the particular set of predictors under consideration

Constructor & Destructor Documentation

◆ RWRegressionModelSelector() [1/3]

template<class T , class S , class F >
RWRegressionModelSelector< T, S, F >::RWRegressionModelSelector ( )
inline

Default constructor. Behavior undefined.

◆ RWRegressionModelSelector() [2/3]

template<class T , class S , class F >
RWRegressionModelSelector< T, S, F >::RWRegressionModelSelector ( const RWRegressionModelSelector< T, S, F > & rhs)

Copy constructor.

◆ RWRegressionModelSelector() [3/3]

template<class T , class S , class F >
RWRegressionModelSelector< T, S, F >::RWRegressionModelSelector ( const RWRegression< T, S > & reg,
RWSearchMethod s )
inline

Construct a selector for the given regression and search method. Once the object is constructed the search is done and it may be queried for parameter indices and so on.

◆ ~RWRegressionModelSelector()

template<class T , class S , class F >
virtual RWRegressionModelSelector< T, S, F >::~RWRegressionModelSelector ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ calcMethod()

template<class T , class S , class F >
const RWRegressionCalc< T, S > & RWRegressionModelSelector< T, S, F >::calcMethod ( ) const
inline

Returns the parameter estimate calculation method currently in use by the model selector.

◆ evalFunctionForSelected()

template<class T , class S , class F >
T RWRegressionModelSelector< T, S, F >::evalFunctionForSelected ( ) const
inline

Returns the value of the evaluation function F for the selected parameters.

◆ fail()

template<class T , class S , class F >
bool RWRegressionModelSelector< T, S, F >::fail ( ) const
inline

Returns true if the search failed.

◆ failMessage()

template<class T , class S , class F >
RWCString RWRegressionModelSelector< T, S, F >::failMessage ( ) const
inline

Returns an error message if the search fails, that is, if fail() returns true.

◆ operator=()

template<class T , class S , class F >
RWRegressionModelSelector< T, S, F > & RWRegressionModelSelector< T, S, F >::operator= ( const RWRegressionModelSelector< T, S, F > & rhs)

Assignment operator.

◆ searchMethod()

template<class T , class S , class F >
RWSearchMethod RWRegressionModelSelector< T, S, F >::searchMethod ( ) const
inline

Returns the search method currently in use by the model selector.

◆ selectedParamIndices() [1/2]

template<class T , class S , class F >
const RWBitVec & RWRegressionModelSelector< T, S, F >::selectedParamIndices ( ) const
inline

Returns the indices of the parameters selected by the currently set search calculation methods.

◆ selectedParamIndices() [2/2]

template<class T , class S , class F >
const RWBitVec & RWRegressionModelSelector< T, S, F >::selectedParamIndices ( RWSearchMethod s)
inline

Returns the parameters selected by the model's selector using the search method s.

◆ selectedParamValues()

template<class T , class S , class F >
const RWMathVec< T > & RWRegressionModelSelector< T, S, F >::selectedParamValues ( ) const
inline

Returns the currently selected parameters.

◆ setCalcMethod()

template<class T , class S , class F >
void RWRegressionModelSelector< T, S, F >::setCalcMethod ( const RWRegressionCalc< T, S > & c)

Sets the calculation method used to calculate parameter estimates for the models searched.

◆ setRegression()

template<class T , class S , class F >
void RWRegressionModelSelector< T, S, F >::setRegression ( const RWRegression< T, S > & r)

Sets the full regression model from which the subset of predictors is selected.

◆ setSearchMethod()

template<class T , class S , class F >
void RWRegressionModelSelector< T, S, F >::setSearchMethod ( RWSearchMethod s)
inline

Sets the search method used.

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.