Baum-Welch Learning in Hidden Markov Model using Multivariate Gaussian Model

26 views
Skip to first unread message

James Kenway

unread,
Jun 18, 2016, 7:46:07 AM6/18/16
to Accord.NET Framework
I've used this for common normal distribution for continuous data:
// Specify a initial normal distribution for the samples.
           
NormalDistribution density = new NormalDistribution();

           
// Creates a continuous hidden Markov Model with two states organized in a forward
           
//  topology and an underlying univariate Normal distribution as probability density.
           
var model = new HiddenMarkovModel<NormalDistribution>(new Ergodic(2), density);

           
// Configure the learning algorithms to train the sequence classifier until the
           
// difference in the average log-likelihood changes only by as little as 0.0001
           
var teacher = new BaumWelchLearning<NormalDistribution>(model)
           
{
               
Tolerance = 0.001,
               
Iterations = 0,
           
};

           
// Fit the model
           
double likelihood = teacher.Run(data);

           
// See the log-probability of the sequences learned
           
double a1 = model.Evaluate(new[] { 0.999999999999928, 0 , 0.999999999999988 , 0 , 0.999999999999988 }); // -0.12799388666109757
           
return a1;

How to use Multivariate Gaussian/normal distribution for continuous data? Thank you.
Reply all
Reply to author
Forward
0 new messages