Skip to main content
. 2020 Jul 29;20(15):4214. doi: 10.3390/s20154214
Algorithm 1. AdaBoost training procedure
  • Given example images (xi,yi), i=1,,n, where yi=0, 1 for negative and positive examples, respectively.

  • Initialize the weights w1,i=12m,12l for yi=0, 1, for m negative and l positive samples, respectively.

    For t=1,,T:

    Step 1. Weight normalization
    wt,i=wt,i/j=1nwt,j (3)
    Step 2. For each feature j, a classifier hj is trained, whose error is calculated with respect to the weight, which enables the algorithm to emphasize on the most incorrectly classified instances in order to address them in further steps:
    ej=iwi|hj(xiyi)| (4)

    Step 3. Select the classifier that exhibits the smallest error.

    Step 4. Update the weights
    wt+1,i=wt,iβt1ci (5)
    where
    ci={0correctly classified examples1otherwise (6)
    and
    βt=et1et (7)
  • The final strong classifier is given by:
    hj(x)={1t=1Ttht(x) 12t=1Tt0otherwise (8)