Skip to contents

Weighted-error stumps G_m with alpha_m = log((1 - err_m) / err_m) and weights multiplied by exp(alpha_m) on the misclassified points (ESL Alg. 10.1, forward stagewise fitting of the exponential loss, eq 10.8).

Usage

morie_esl_adaboost(X, y, M = 50)

Arguments

X

Features.

y

Labels in -1, +1.

M

Maximum rounds.

Value

Named list: estimate (training error), stumps (1-based feature), alphas, rounds_used, prediction, margin, n, p.

References

Freund, Y. & Schapire, R. (1997). JCSS 55, 119-139.

Examples

i <- 1:40
X <- cbind(sin(i), cos(3 * i))
morie_esl_adaboost(X, ifelse(X[, 1] + X[, 2] > 0, 1, -1), M = 5)$alphas
#> [1] 1.386294 1.686399 1.433251 1.733149 1.590192