Evaluate() public method

Calculates the probability that this model has generated the given sequence.
Evaluation problem. Given the HMM M = (A, B, pi) and the observation sequence O = {o1, o2, ..., oK}, calculate the probability that model M has generated sequence O. This can be computed efficiently using the either the Viterbi or the Forward algorithms.
public Evaluate ( Array observations ) : double
observations Array /// A sequence of observations. ///
return double
コード例 #1
0
        public void TestErrorRateDecreasesAfterEachIteration()
        {
            var hmm = new ContinuousHiddenMarkovModel(States, Symbols);
            var testSequence = new double[] {YesUmbrella, YesUmbrella, NoUmbrella};
            var initialError = 1 - hmm.Evaluate(testSequence);

            var trainedHmm = TrainHelper(new[] {testSequence});
            var errorAfterTraining = 1 - trainedHmm.Evaluate(testSequence);
            Assert.IsTrue(errorAfterTraining <= initialError);
        }