Skip to main content
. 2023 Jan 28;13(3):481. doi: 10.3390/diagnostics13030481
Algorithm 1: Majority Voting.
Input: n Models or classifiers, training samples with ground truth and test samples.
Output: Predicted class labels, label probability score, and performance evaluation.
Step 1. Train all n models on the same training set.
Step 2. Take a sample from test set and test it through trained model and predict the label in terms of probability score.
Step 3. Measure a model’s vote for each label by the following rule.
            IF Probability (label ‘LGG’) > 0.5 THEN
                  Vote (LGG) = 1 and Vote (HGG) = 0.
           Otherwise,
                  Vote (LGG) = 0 and Vote (HGG) = 1
Step 5. Repeat step 2 and 3 for all the trained models.
Step 6. Calculate the total number of votes for each label predicted by all trained models by the following rule.
           IF (Total Vote ‘LGG’) > (Total Vote ‘HGG’) THEN
                 Label ‘LGG’ will be predicted.
          Otherwise,
                 Label ‘HGG’ will be predicted.
Step 7. Repeat Step 2 to Step 6 for all the test samples.
Step 8. Compare predicted labels of each sample to the actual ground truth and create confusion matrix.