Which python library for supervised learning of HMMs?

I have a dataset which looks like this:

timestamp  sensor1   sensor2  sensor3  sensor4    sensor5  action
       1    0.05       0.04    0.10      0.39      0.59      A1
       2    0.25       0.14    0.11      0.34      0.59      A2
       3    0.15       0.34    0.13      0.36      0.59      A3
    .......

Since I have the observations (sensor1-sensor5) and the corresponding labels (A1, A2, A3, etc.) for each timestamp, I want to perform supervised learning using a hidden markov model.

Which library could I use to learn the observation distribution and the parameters of the HMM ? Thank you! P.S. : I already took a look at hmmlearn, but it seems to be only for unsupervised learning.

Topic markov-hidden-model library python

Category Data Science


The libarary pomegranate(https://github.com/jmschrei/pomegranate)implements HMM with Gaussian mixture model. The example of HMM is as follows :

from pomegranate import *
dists = [NormalDistribution(5, 1), NormalDistribution(1, 7), NormalDistribution(8,2)]
trans_mat = numpy.array([[0.7, 0.3, 0.0],
                             [0.0, 0.8, 0.2],
                             [0.0, 0.0, 0.9]])
starts = numpy.array([1.0, 0.0, 0.0])
ends = numpy.array([0.0, 0.0, 0.1])
model = HiddenMarkovModel.from_matrix(trans_mat, dists, starts, ends)

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.