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

Class for penalty function 4 for AIC. More...

+ Inheritance diagram for subpavings::PenAIC4:
+ Collaboration diagram for subpavings::PenAIC4:

List of all members.

Public Member Functions

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

Detailed Description

Class for penalty function 4 for AIC.

Penalty is just some multiple of logCatK. Should have c = 0.5 to stop splitting on one point with AIC EMP, or with c=2, penalty before taking logs is (CatK)^2).


Member Function Documentation

real subpavings::PenAIC4::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, logCatk); // pen = c*logCatk

    return (rnd(penalty));
    // return c*logCatk
  }

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