MRS  1.0
A C++ Class Library for Statistical Set Processing
subpavings::PenAIC5 Class Reference

Class for penalty function 5 for AIC. More...

+ Inheritance diagram for subpavings::PenAIC5:
+ Collaboration diagram for subpavings::PenAIC5:

List of all members.

Public Member Functions

 PenAIC5 (double cc)
cxsc::real operator() (const AdaptiveHistogram *const adh, int deltaLeaf) const
 the penalty function.

Detailed Description

Class for penalty function 5 for AIC.

Penalty is just some multiple of logCatK. Should have c = 1 to stop splitting on one point with AIC EMP.


Member Function Documentation

real subpavings::PenAIC5::operator() ( const AdaptiveHistogram *const  adh,
int  deltaLeaf 
) const [virtual]

the penalty function.

Parameters:
adhis the histogram object to calculate the penalty on.
deltaLeafchange in number leaves to take into account.
Returns:
the penalty as a cxsc::real.

Implements subpavings::PenObj.

  {
    dotprecision penalty(0.0);

    int k = adh->getRootLeaves() + deltaLeaf - 1; // leaves-1
    double logCatk= lCk(k);

    accumulate(penalty, c*k, log(2.0)); // pen = c*k*log(2)

    return (rnd(penalty));
    // return c*k*log(2)
  }

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends