Skip to main content
. 2019 Dec 3;19(23):5333. doi: 10.3390/s19235333
Algorithm 1 Algorithm of margin and sensitivity based ordering ensemble pruning (MSEP)
  •  Input:

    training set DTr, pruning set DPr, sample (x, y), size of training set NTr, size of pruning set NPr, base classifier h, initial ensemble H, size of initial ensemble M, size of final pruned ensemble T, parameter θ

  •  Output:

    The final sub-ensemble S

  • 1:

    Initialize S = ϕ , KL is an empty mark list;

  • 2:

    // Train base classifiers;

  • 3:

    for each hjH do

  • 4:

        Extract (xi, yi) ∈ DTr with replacement as ETr with size of 30% × NTr;

  • 5:

        Train hj with ETr;

  • 6:

    end for

  • 7:

    // Pruning procedures;

  • 8:

    for each hjH do

  • 9:

        MSM=0;

  • 10:

        for each xiDPr do

  • 11:

            margin(xi)=j=1M(I(hj(xi)=yi)(I(hj(xi)yi))M;     ▹ refer to Equation (2)

  • 12:

            if hj(xi)=yi && margin(xi)>θ then       ▹ refer to Equation (10)

  • 13:

               NFiH=j=1MI(hj(xi)yi)M;             ▹ refer to Equation (11)

  • 14:

               MSM=MSM+eyi·NFiH·emargin(xi);      ▹ refer to Equation (10)

  • 15:

            end if

  • 16:

        end for

  • 17:

        MSM=MSMNPr;                  ▹ refer to Equation (10)

  • 18:

        Append pair (hj,MSM) to KL;

  • 19:

    end for

  • 20:

    Rank KL in decreasing order based on MSM;

  • 21:

    return the top-T classifiers in KL as S;