Penalty function as number of leaves in histogram. More...
Public Member Functions | |
PenLeaves (double b) | |
cxsc::real | operator() (const AdaptiveHistogram *const adh, int deltaLeaf) const |
the penalty function. |
Penalty function as number of leaves in histogram.
real subpavings::PenLeaves::operator() | ( | const AdaptiveHistogram *const | adh, |
int | deltaLeaf | ||
) | const [virtual] |
the penalty function.
adh | is the histogram object to calculate the penalty on. |
deltaLeaf | change in number leaves to take into account. |
Implements subpavings::PenObj.
{
real penalty;
penalty = beta*(adh->getSubPaving()->getNumberLeaves()) + deltaLeaf;
return penalty;
}