Learn R Programming

boostr (version 1.0.0)

adaboostReweighter: Reweighter function for the Adaboost.M1 algorithm

Description

Implements a slightly modified version of the reweighter described in the Adaboost.M1 algorithm.

Usage

adaboostReweighter(prediction, response, weights, ...)

Arguments

prediction
a vector of predictions.
response
a vector whose $ith$ component is the true response for the $ith$ component of prediction.
weights
a vector of weights. They don't necessarily need to sum to 1.
...
implemented to allow reweighter to accept its output as its input.

Value

For internal bookkeeping, this function is inherits from the 'reweighter' class. It returns a named list with components
weights
the updated weights calculated from the input weights, prediction and response.
alpha
performance measure of estimator to be used by adaboostAggregator.

Details

The modification of the reweighter comes in to play when $\epsilon = 0$. This is when the esimator correctly classifies every observation in the learning set. Consequently, we're supposed to define $ \alpha = log(1-\epsilon) - log(\epsilon) $ However, this is $+\infty$, which is not a number R is used to working with. To work around this, we have to create a conditional statement that sets alpha <- log(.Machine$double.xmax) and let the algorithm proceed as originally described. The effect of this modification is the following:
  1. the update that's supposed to be made to weights, which is a function of alpha, effectively keeps weights as they were before.
  2. if you pair this reweighter with adaboostAggregator then the estimator associated to this very large alpha now has tremendous weight inside the weighted sum in the aggregator. This isn't, necessarily, a bad thing -- the estimator classified every observation in data correctly.

See Also

Other adaboost: adaboostAggregator

Other reweighters: arcfsReweighter; arcx4Reweighter; boost, boost.function, boost.list; vanillaBagger