1

I am very new in using MALLET. I need to have a library of HMM for sequence labelling task. I already look at Sequence Tagging Developer's Guide, but i am unable to understand that how can I train HMM. I have a list of Hidden States, a list of observation symbols, initial probability matrix, transition probability matrix and emission probability matrix. I need to train HMM by using B-W algorithm, to re-estimate the parameters and then want to perform sequence labelling task using those parameters.

As example, I have the following values:

hidden_states = ('Rainy', 'Sunny')

observation_symbols = ('walk', 'shop', 'clean')

initial_probability = {'Rainy': 0.6, 'Sunny': 0.4}

transition_probability = {

'Rainy' : {'Rainy': 0.7, 'Sunny': 0.3},

'Sunny' : {'Rainy': 0.4, 'Sunny': 0.6},

}

emission_probability = {

'Rainy' : {'walk': 0.1, 'shop': 0.4, 'clean': 0.5},

'Sunny' : {'walk': 0.6, 'shop': 0.3, 'clean': 0.1},

}

observation_sequence = {

walk clean shop,

clean walk shop

}

How can I train HMM using the above parameters? Please help.

Community
  • 1
  • 1
Susmita Sadhu
  • 67
  • 1
  • 2
  • 16
  • Baum-Welch estimates the initial, transition, and emission probabilities from data. It doesn't look like you have enough observation sequences to do a good job of that. You may need to generate more data. – David Mimno Nov 21 '17 at 15:27
  • Also, I'm guessing that the intention of this problem is to trace the steps of Baum-Welch "manually" in order to better understand the algorithm. – David Mimno Nov 21 '17 at 15:29
  • I have enough data to train the model, here I am showing a very small example. I have around 20 number of hidden states, 100 number of observation symbols, 700 number of observation sequences and also have all probability values (initial). I want to re-estimate the parameters using B-W algorithm and then want to use those for tagging. But i can't understand how can i give those inputs , how can i set those values to train the model, which classes and variables of MALLET are exactly use to do this. I am unable to understand the format of training data file. Please help. – Susmita Sadhu Nov 21 '17 at 16:13
  • I have found the classes of MALLET, used to build and train the HMM :- `cc.mallet.fst.HMM`, `cc.mallet.fst.HMMTrainerByLikelihood` . But i am unable to understand how can I set parameters and use the classes to train and test the model. Please help. – Susmita Sadhu Nov 22 '17 at 06:25

0 Answers0