Skip to main content
. 2022 Sep 30;10(10):1920. doi: 10.3390/healthcare10101920
Algorithm 1. SAMME Algorithm
  Step 1. Initialize the observation weights wi=1n, i=1,2,, n.
  Step 2. For m=1 to M:
  Step 2.1. fit a classifier T(m)(x) to the training data using weights wi.
  Step 2.2. compute:
  err(m)=i=1nwi(ciT(m)(xi))/i=1nwi.
  Step 2.3. compute:
  α(m)=log1err(m)err(m)+log(K1).
  Step 2.4. set:
  wiwi.exp(α(m)(ciT(m)(xi)), i=1, 2, , n.
  Step 2.5. re-normalize wi.
  Step 3. Output
  C(x)=argmaxkm=1M(α(m)(T(m)(x)=k).
  SAMME.R algorithm:
  Step 1. Initialize the observation weights wi=1n, i=1,2,, n.
  Step 2. For m=1 to M:
  Step 2.1. fit a classifier T(m)(x)
  to the training data using weights wi.
  Step 2.2. obtain the weighted class probability estimates:
  Pk(m)(x)=Probw(c=kx), k=1, 2, , K
  Step 2.3. set:
  hk(m)(x)(K1)(logpkm(x)1/Kklogpk(m)(x)),k=1,2,,K.
  Step 2.4. set:
  wiwi.exp (K1KyiTlogp(m)(xi), i=1, 2, , n.
  Step 2.5. re-normalize wi.
  Step 3. Output
  C(x)=argmaxkm=1Mhk(m)(x).