Skip to main content
. 2023 Sep 14;14(9):1802. doi: 10.3390/genes14091802
Algorithm 2 Majority voting ensemble classifier
Input:
- L: Labeled tuples for training of each class C with selected features.
- D: Set of tuples for evaluation.
- T: Set of tuples for testing.
- N: (ML1ML2ML3, …, MLN) Set of classifier ML algorithm.
  •    1:

    for each ML classifier MLi{1,,N} do

  •    2:

          Train MLi using labeled data L

  •    3:

    end for

  •    4:

    for each ML classifier MLi{1,,N} do

  •    5:

          Test and evaluate MLi using testing data D

  •    6:

    end for

  •    7:

    for each ML classifier MLi{1,,N} do

  •    8:

          Assign weight of MLi based on the accuracy of MLi

  •    9:

    end for

  •  10:

    for each each test data ti{T} do

  •  11:

          for each ML classifier MLi{1,,N} do

  •  12:

                Find the predicted class of ti

  •  13:

          end for

  •  14:

          Aggregate vote to ensemble based on the results

  •  15:

    end for