Accord.Tests.Statistics.GenericHiddenMarkovModelTest.DecodeTest3 C# (CSharp) Метод

DecodeTest3() приватный Метод

private DecodeTest3 ( ) : void
Результат void
        public void DecodeTest3()
        {
            double[,] transitions = 
            {  
                { 0.7, 0.3 },
                { 0.4, 0.6 }
            };

            double[,] emissions = 
            {  
                { 0.1, 0.4, 0.5 },
                { 0.6, 0.3, 0.1 }
            };

            double[] initial = { 0.6, 0.4 };

            var hmm = HiddenMarkovModel.CreateGeneric(transitions, emissions, initial);

            bool thrown = false;
            try
            {
                double logLikelihood;
                int[] path = hmm.Decode(new double[][]
                {
                    new double[] { 0, 1, 2 },
                    new double[] { 0, 1, 2 },
                }, out logLikelihood);
            }
            catch
            {
                thrown = true;
            }

            Assert.IsTrue(thrown);
        }