Skip to main content
. 2020 Dec 25;21(1):85. doi: 10.3390/s21010085
Algorithm 3 Data preparation for training of models Mi
  •  Input:

    S″={Si,t:i=1⋯n,t=1⋯m}, A″={at:t=1⋯m}, M, i*

  •  Output:

    D={di,t:i=1⋯n,t=1⋯m}

  • 1:

    fort=1⋯mdo

  • 2:

        found= false

  • 3:

        k=0

  • 4:

        repeat

  • 5:

            X= set of all k-element subsets of {{1,2,⋯,n}∖{i*}}

  • 6:

            repeat

  • 7:

               Z= random element from X

  • 8:

               X=X∖Z

  • 9:

               Z=Z∪{i*}

  • 10:

               St={Si,t:i∈Z}

  • 11:

               if R(St,M)=at then

  • 12:

                   found= true

  • 13:

               end if

  • 14:

            until found or X=∅

  • 15:

            k=k+1

  • 16:

        until found or k=n−1

  • 17:

        for i=1⋯n do

  • 18:

            if found and i∉Z then

  • 19:

               di,t=0

  • 20:

            else

  • 21:

               di,t=1

  • 22:

            end if

  • 23:

        end for

  • 24:

    end for