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=1n,t=1m}, A={at:t=1m}, M, i*

  •  Output:

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

  • 1:

    fort=1mdo

  • 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=XZ

  • 9:

               Z=Z{i*}

  • 10:

               St={Si,t:iZ}

  • 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=n1

  • 17:

        for i=1n do

  • 18:

            if found and iZ then

  • 19:

               di,t=0

  • 20:

            else

  • 21:

               di,t=1

  • 22:

            end if

  • 23:

        end for

  • 24:

    end for