Multivariate Mixture Normal Distribution

24 views
Skip to first unread message

CC

unread,
Jan 28, 2016, 3:39:33 AM1/28/16
to Accord.NET Framework
Hi,

I'm trying to train a 4 state HMM which takes in multiple sequences of 3d data (x-coordinate, y-coordinate, time) with a 2-mixture multivariate Normal Distribution as its emission probability density.

However it seems Accord doesn't have this functionality?

int multivariateNumber = 3;
int stateNumber = 4;
int mixtureNumber = 2;

double[][][] sequences = readData();

var h = new MultivariateNormalDistribution[mixtureNumber];
for (int i = 0; i < h.Length; i++)
{
    h[i] = new MultivariateNormalDistribution(multivariateNumber);
}

var Hmm = new HiddenMarkovModel<MultivariateMixture<MultivariateNormalDistribution>>(new Forward(stateNumber), new MultivariateMixture<MultivariateNormalDistribution>(h));

var teacher = new BaumWelchLearning<MultivariateMixture<MultivariateNormalDistribution>>(Hmm)
{
    Tolerance = 0.0001,
    Iterations = 10000,
    FittingOptions = new MixtureOptions()
    {
        InnerOptions = new NormalOptions()
        {
            Diagonal = false
        },
        Logarithm = false,
        Threshold = 1e-5
    }
};

double logLikelihood = teacher.Run(sequences);

From the documentation, it seems Run only takes in double[][], for sequences of multivariate data, but not multiple sequences, double[][][] (which a non-mixture MultivariateNormalDistribution is able to).

I wonder if I can get any help for this? Thanks

CC

unread,
Jan 28, 2016, 3:49:17 AM1/28/16
to Accord.NET Framework
To add on, the goal is to compare if other series of sequences 'belong' to the model and finding other series of sequences that happen to coincide with the trained model by doing

Hmm.Evaluate(testsequences);
Reply all
Reply to author
Forward
0 new messages