pyjuice.structures.HMM

pyjuice.structures.HMM(seq_length: int, num_latents: int, num_emits: int, homogeneous: bool = True, block_size: int | None = None, alpha: Tensor | None = None, beta: Tensor | None = None, gamma: Tensor | None = None)

Constructs Hidden Markov Models.

Parameters:
  • seq_length (int) – sequence length

  • num_latents (int) – size of the latent space

  • num_emits (int) – size of the emission space

  • homogeneous (bool) – whether to define a homogeneous (or inhomogeneous) HMM

  • block_size (Optional[int]) – block size of the PC

  • alpha (Optional[torch.Tensor]) – optional transition parameters of size [num_latents, num_latents]

  • beta (Optional[torch.Tensor]) – optional emission parameters of size [num_latents, num_emits]

  • gamma (Optional[torch.Tensor]) – optional init parameters of size [num_latents]