Skip to main content
. 2022 Jun 12;12(6):404. doi: 10.3390/bios12060404
Algorithm 1. Weighted voting scheme.
Input:
Ci: Classifier
Lj: Labels of Data Set
m: Ensemble Size
n: the Number of Labels
Output:
the predicted class yj from a single classifier Ci
the predicted class y*
for i = 1: m
   for j = 1: n
      compute pCiLj, the probability assigned by Ci to class Lj
   μ = arg maxL=1,,r pCiLj
   yCi = yμ
for j = 1: n
   y(Lj) = { i = 1,…,m: yCi == yLj}
   if y(Lj) ==
      gLj = 0
   else
      for i in y(Lj) do
         ωCi = maxj=1,,n pCiLj
      gLj= i=1mωCi,
μ = arg maxL=1,,r gLj
y* = yμ
   return y*