Skip to main content
. 2022 May 5;22(9):3506. doi: 10.3390/s22093506
Algorithm 1. Pseudocode for training the meta classifier
Input: Training Dataset D,={ (xi, yi) χ IRd×Y :1  i  N }
Output: An ensemble classifier C for weekly waste generation
  • 1:

      Step 1: Train the first-level classifiers

  • 2:

      For m ←1 to M do

  • 3:

              Train a base classifier ct using the solid waste dataset D

  • 4:

      End For

  • 5:

      Step 2: Create a new dataset from the output of first-level classifiers with D labels

  • 6:

      For i ←1 to N do

  • 7:

             Create a new waste dataset containing (xi, yi) where xi={ (c1(xi),(c2(xi),  (ct(xi)}

  • 8:

      End For

  • 9:

      Step 3: Train a meta classifier

  • 10:

    Train a new classifier c′ using the newly developed solid waste dataset

  • 11:

    return C(x)=c(c1(x), c2(x),  cT(x))