Skip to main content
. 2023 Jan 26;23(3):1390. doi: 10.3390/s23031390
Algorithm 1: Variational learning of the SD-HMM model.
  • 1.

        Initialize the shape and scale parameters of the SD distribution.

  • 2.

        Define the initial responsibilities.

  • 3.

        Compute wB,wC, and wπ.

  • 4.

        Initialize B,C, and π.

  • 5.

        while |old likelihood - new likelihood| ≥ 0

  • 6.

          Compute the data likelihood.

  • 7.

          Compute the responsibilities with the forward–backward procedure.

  • 8.

          Update the hyperparameters of the shape and scale parameters.

  • 9.

          Update wB,wC, and wπ using responsibilities γB,γC, and γπ.

  • 10.

        Update B,C, and π using wB,wC, and wπ.