Skip to main content
. 2024 Feb 12;24(4):1196. doi: 10.3390/s24041196
Algorithm 1 Bag Generation for Multiple Activity Instances
  • 1:

    function Bag generation for multiple activity instances

  • 2:

        Input: Instance inm of different activities

  • 3:

        Output: Bag vector Op

  • 4:

        

  • 5:

        for p1 to Totalnumberofsubjects do

  • 6:

            for instance inm in subjectp do

  • 7:

               Fab = kmeans(inm)

  • 8:

            end for

  • 9:

            Create Document Feature Documentp=[F11,F11,,Fab]

  • 10:

          Create LDA Feature Topicp=LDA(Dcoumentp)

  • 11:

          Op= Horizontal binding vector (Dcoumentp,Topicp)

  • 12:

      end for

  • 13:

      

  • 14:

      Return Op

  • 15:

    end function