STK++ 0.9.13
STK::AICCriterion Class Reference

Derived class of Criterion for computing the AIC Criterion The AIC criteria is a penalization of the likelihood given by the formula. More...

#include <STK_PenCriterion.h>

Inheritance diagram for STK::AICCriterion:
Inheritance graph

Public Member Functions

 AICCriterion ()
 Default Constructor.
 
 AICCriterion (IStatModelBase *const p_model)
 Constructor.
 
 AICCriterion (IStatModelBase const &model)
 Constructor.
 
 AICCriterion (AICCriterion const &criterion)
 copy Constructor.
 
virtual ~AICCriterion ()
 virtual destructor.
 
AICCriterionclone () const
 clone pattern
 
virtual bool run ()
 implementation of the virtual method run
 
- Public Member Functions inherited from STK::ICriterion
virtual ~ICriterion ()
 Destructor.
 
Real constvalue () const
 
void setModel (IStatModelBase const *p_model)
 
void setModel (IStatModelBase const &model)
 
- Public Member Functions inherited from STK::IRunnerBase
String consterror () const
 get the last error message.
 

Additional Inherited Members

- Protected Member Functions inherited from STK::ICriterion
 ICriterion ()
 Default Constructor.
 
 ICriterion (IStatModelBase const *p_model)
 Constructor.
 
 ICriterion (IStatModelBase const &model)
 Constructor.
 
 ICriterion (ICriterion const &criterion)
 copy Constructor.
 
- Protected Member Functions inherited from STK::IRunnerBase
 IRunnerBase ()
 default constructor
 
 IRunnerBase (IRunnerBase const &runner)
 copy constructor
 
virtual ~IRunnerBase ()
 destructor
 
virtual void update ()
 update the runner.
 
- Protected Attributes inherited from STK::ICriterion
IStatModelBase constp_model_
 The current statistical model to use.
 
Real value_
 Computed value of the criterion.
 
- Protected Attributes inherited from STK::IRunnerBase
String msg_error_
 String with the last error message.
 
bool hasRun_
 true if run has been used, false otherwise
 

Detailed Description

Derived class of Criterion for computing the AIC Criterion The AIC criteria is a penalization of the likelihood given by the formula.

\[
-2 \cdot \ln{p(x|k)} \approx \mathrm{AIC} = {-2 \cdot \ln{L} +2 D }
\]

where $ L $ represents the likelihood of the observations and $ D $ the number of free parameter of the model.

Definition at line 97 of file STK_PenCriterion.h.

Constructor & Destructor Documentation

◆ AICCriterion() [1/4]

STK::AICCriterion::AICCriterion ( )
inline

Default Constructor.

Definition at line 101 of file STK_PenCriterion.h.

101: ICriterion() {}
ICriterion()
Default Constructor.

Referenced by clone().

◆ AICCriterion() [2/4]

STK::AICCriterion::AICCriterion ( IStatModelBase *const  p_model)
inline

Constructor.

Parameters
p_modelapointer on the current model

Definition at line 105 of file STK_PenCriterion.h.

105: ICriterion(p_model) {}

◆ AICCriterion() [3/4]

STK::AICCriterion::AICCriterion ( IStatModelBase const model)
inline

Constructor.

Parameters
modelthe current model

Definition at line 109 of file STK_PenCriterion.h.

109: ICriterion(model) {}

◆ AICCriterion() [4/4]

STK::AICCriterion::AICCriterion ( AICCriterion const criterion)
inline

copy Constructor.

Parameters
criterionthe criterion to copy

Definition at line 113 of file STK_PenCriterion.h.

113: ICriterion(criterion) {}

◆ ~AICCriterion()

virtual STK::AICCriterion::~AICCriterion ( )
inlinevirtual

virtual destructor.

Definition at line 115 of file STK_PenCriterion.h.

115{}

Member Function Documentation

◆ clone()

AICCriterion * STK::AICCriterion::clone ( ) const
inline

clone pattern

Definition at line 117 of file STK_PenCriterion.h.

117{ return new AICCriterion(*this);}
AICCriterion()
Default Constructor.

References AICCriterion().

◆ run()

bool STK::AICCriterion::run ( )
inlinevirtual

implementation of the virtual method run

Implements STK::IRunnerBase.

Definition at line 123 of file STK_PenCriterion.h.

124{
125 if (!p_model_)
127 return false;
128 }
130 return true;
131}
#define STKERROR_NO_ARG(Where, Error)
Definition STK_Macros.h:49
virtual bool run()
implementation of the virtual method run
Real value_
Computed value of the criterion.
IStatModelBase const * p_model_
The current statistical model to use.
String msg_error_
String with the last error message.
Definition STK_IRunner.h:96

References STK::IStatModelBase::computeAIC(), STK::IRunnerBase::msg_error_, STK::ICriterion::p_model_, run(), STKERROR_NO_ARG, and STK::ICriterion::value_.

Referenced by run().


The documentation for this class was generated from the following file: