Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Hidden Markov Model for Generalized Normal Distribution #945

@yanpanlau

Description

@yanpanlau

Hi,

     I am trying to create a Hidden Markov Model for Generalized Normal Distribution. 

But I got the error:

"Specified method is not supported". Could you please help?

       double[,] transition = 
        {
            {0.8, 0.2},
            {0.2, 0.8}
        };

        //Create the emission matrix B
        GeneralizedNormalDistribution[] emission = 
        {
            new GeneralizedNormalDistribution(0,1,1),
            new GeneralizedNormalDistribution(0,1,1),
        };

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

        //Create a new Hidden Markov Model
        HiddenMarkovModel<GeneralizedNormalDistribution> model = new HiddenMarkovModel<GeneralizedNormalDistribution>(transition, emission, initial);

        BaumWelchLearning<GeneralizedNormalDistribution> teacher = new BaumWelchLearning<GeneralizedNormalDistribution>(model)
        {
            Tolerance = 1,
            Iterations = 0,
        };

        double[] sequence = new double[] { 0, 0, 0, 1, 1, 1, 2, 2, 3, 2, 3, 4, 6, 6, 6 };
        double likelihood = teacher.Run(sequence);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions