AdaBoost (Adaptive Boosting) is a popular boosting algorithm that combines multiple weak classifiers to create a strong classifier.
The algorithm works by iteratively adjusting the weights of the training instances and focusing more on the misclassified instances in each iteration using a weighted sampled distribution.

AdaBoost

Assume we have some data \(\{(x_{i}, y_{i} )\}_{i=1}^{n}\) with $y_{i}$ being a binary column $\in {-1, 1}$.

  1. Initialize the weights of the training instances:

    $w_i^{(1)} = \frac{1}{n}$ for $i = 1, \dots, n$

  2. For each iteration from 1 to $t$:

    a. Train a decision tree classifier $h_t(x_i)$ on the training data with weights $w_i^{(t)}$.

    b. Calculate the error of the weak classifier:

    $\epsilon_t = \sum_{i=1}^n w_i^{(t)} I(y_i \neq h_t(x_i))$

    c. Calculate the weight of the weak classifier $h_t(x)$:

    $\alpha_t = \frac{1}{2} \ln(\frac{1 - \epsilon_t}{\epsilon_t})$

    d. Update the weights of the training instances:

    $w_i^{(t+1)} = \frac{w_i^{(t)} e^{-\alpha_t y_i h_t(x_i)}}{Z_{t}}$
    , where $Z_t$ is a normalization factor → $Z_t = \sum_{i=1}^n w_i^{(t)} e^{-\alpha_t y_i h_t(x_i)}$

  3. Output the final strong classifier:

    $H(x) = \text{sign}\left(\sum_{t=1}^T \alpha_t h_t(x)\right)$