Hidden Markov Model Parameters in Accord.Net

377 views
Skip to first unread message

Jake Muller

unread,
Jun 13, 2016, 1:38:35 PM6/13/16
to Accord.NET Framework
Hi,

In documentation, here one of the parameter declaration in HMM model using accord.net.
// Create the transition matrix A
double[,] transition =
{  
   
{ 0.7, 0.3 },
   
{ 0.4, 0.6 }
};

// Create the emission matrix B
double[,] emission =
{  
   
{ 0.1, 0.4, 0.5 },
   
{ 0.6, 0.3, 0.1 }
};

// Create the initial probabilities pi
double[] initial =
{
   
0.6, 0.4
};

// Create a new hidden Markov model
HiddenMarkovModel hmm = new HiddenMarkovModel(transition, emission, initial);

I'm implementing Hidden Markov Model in Wavelet Domain, and the parameters are Parent State Probability, Transition State Probability, and Variances of wavelet coeff given state.
Can we use variances for emission parameter in above Hidden Markov Model?,  Since emission parameter deal with global mean and variances of data. How many Variance do you need to use in above parameter declaration? , Thank you.

Regard,
Jake.

César

unread,
Jun 13, 2016, 2:47:42 PM6/13/16
to Accord.NET Framework
Hi Jake!

Thanks for the interesting question. If you are using continuous observations, then you should take a look at Continuous Hidden Markov Models. Those HMMs can be created using any probability distribution. If you have mean and variances, then perhaps a good choice will be to use a NormalDistribution as the template parameter TDistribution. For an example on how to create a continuous-valued HMM, please take a look at the Baum-Welch example for learning Gaussian HMMs which is available in the documentation: http://accord-framework.net/docs/html/T_Accord_Statistics_Models_Markov_Learning_BaumWelchLearning_1.htm

In this example, it should be possible to see how an HMM can be created given the means and variances of the data.

Hope it helps!

If you find another issue, please open an issue in the framework's issue tracker. It is monitored with a larger frequency than the Google Groups forums.

Best regards,
Cesar 

Jake Muller

unread,
Jun 13, 2016, 4:55:59 PM6/13/16
to Accord.NET Framework
Hi, Cesar

Thanks for the answer. I have several questions.
If I want to manually calculate the parameters for input in Continous HMM Model, how to calculate the emission parameters?, can I just use variances or something?, In link you provided, the emission probabilities are already known. If I just can use the Baum-Welch learning just like in your link, then how to extract the parameters from learned model of data?, In my case, there are 2 type of normal distribution used, one is Univariate(like in your link) and the other one is Multivariate, How to use it using Multivariate normal distribution?, Thanks for your answer.

best regards,
Jake.
Reply all
Reply to author
Forward
0 new messages