mlpack
|
#include <mlpack/core.hpp>
#include <mlpack/methods/hmm/hmm.hpp>
#include <mlpack/methods/gmm/gmm.hpp>
#include <mlpack/methods/gmm/diagonal_gmm.hpp>
#include "catch.hpp"
#include "test_catch_tools.hpp"
Functions | |
TEST_CASE ("SimpleDiscreteHMMTestViterbi", "[HMMTest]") | |
We will use the simple case proposed by Russell and Norvig in Artificial Intelligence: A Modern Approach, 2nd Edition, around p.549. | |
TEST_CASE ("BorodovskyHMMTestViterbi", "[HMMTest]") | |
This example is from Borodovsky & Ekisheva, p. More... | |
TEST_CASE ("ForwardBackwardTwoState", "[HMMTest]") | |
Ensure that the forward-backward algorithm is correct. | |
TEST_CASE ("SimplestBaumWelchDiscreteHMM", "[HMMTest]") | |
In this example we try to estimate the transmission and emission matrices based on some observations. More... | |
TEST_CASE ("SimpleBaumWelchDiscreteHMM", "[HMMTest]") | |
A slightly more complex model to estimate. | |
TEST_CASE ("SimpleBaumWelchDiscreteHMM_2", "[HMMTest]") | |
Increasing complexity, but still simple; 4 emissions, 2 states; the state can be determined directly by the emission. | |
TEST_CASE ("DiscreteHMMLabeledTrainTest", "[HMMTest]") | |
TEST_CASE ("DiscreteHMMSimpleGenerateTest", "[HMMTest]") | |
Make sure the Generate() function works for a uniformly distributed HMM; we'll take many samples just to make sure. | |
TEST_CASE ("DiscreteHMMGenerateTest", "[HMMTest]") | |
More complex test for Generate(). | |
TEST_CASE ("DiscreteHMMLogLikelihoodTest", "[HMMTest]") | |
TEST_CASE ("GaussianHMMSimpleTest", "[HMMTest]") | |
A simple test to make sure HMMs with Gaussian output distributions work. | |
TEST_CASE ("GaussianHMMTrainTest", "[HMMTest]") | |
Ensure that Gaussian HMMs can be trained properly, for the labeled training case and also for the unlabeled training case. | |
TEST_CASE ("GaussianHMMGenerateTest", "[HMMTest]") | |
Make sure that a random sequence generated by a Gaussian HMM fits the distribution correctly. | |
TEST_CASE ("GaussianHMMPredictTest", "[HMMTest]") | |
Make sure that Predict() is numerically stable. | |
TEST_CASE ("GMMHMMPredictTest", "[HMMTest]") | |
Test that HMMs work with Gaussian mixture models. More... | |
TEST_CASE ("GMMHMMLabeledTrainingTest", "[HMMTest]") | |
Test that GMM-based HMMs can train on models correctly using labeled training data. | |
TEST_CASE ("GMMHMMLoadSaveTest", "[HMMTest]") | |
Test saving and loading of GMM HMMs. | |
TEST_CASE ("GaussianHMMLoadSaveTest", "[HMMTest]") | |
Test saving and loading of Gaussian HMMs. | |
TEST_CASE ("DiscreteHMMLoadSaveTest", "[HMMTest]") | |
Test saving and loading of Discrete HMMs. | |
TEST_CASE ("HMMTrainReturnLogLikelihood", "[HMMTest]") | |
Test that HMM::Train() returns finite log-likelihood. | |
TEST_CASE ("DiagonalGMMHMMPredictTest", "[HMMTest]") | |
DiagonalGMM Hidden Markov Models Tests. More... | |
TEST_CASE ("DiagonalGMMHMMGenerateTest", "[HMMTest]") | |
Make sure a random data sequence generation is correct when the emission distribution is DiagonalGMM. | |
TEST_CASE ("DiagonalGMMHMMOneGaussianOneStateTrainingTest", "[HMMTest]") | |
Make sure the unlabeled 1-state training works reasonably given a single distribution with diagonal covariance. | |
TEST_CASE ("DiagonalGMMHMMOneGaussianUnlabeledTrainingTest", "[HMMTest]") | |
Make sure the unlabeled training works reasonably given a single distribution with diagonal covariance. | |
TEST_CASE ("DiagonalGMMHMMOneGaussianLabeledTrainingTest", "[HMMTest]") | |
Make sure the labeled training works reasonably given a single distribution with diagonal covariance. | |
TEST_CASE ("DiagonalGMMHMMMultipleGaussiansUnlabeledTrainingTest", "[HMMTest]") | |
Make sure the unlabeled training works reasonably given multiple distributions with diagonal covariance. | |
TEST_CASE ("DiagonalGMMHMMMultipleGaussiansLabeledTrainingTest", "[HMMTest]") | |
Make sure the labeled training works reasonably given multiple distributions with diagonal covariance. | |
TEST_CASE ("DiagonalGMMHMMLoadSaveTest", "[HMMTest]") | |
Make sure loading and saving the model is correct. | |
Test file for HMMs.
mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.
TEST_CASE | ( | "BorodovskyHMMTestViterbi" | , |
"" | [HMMTest] | ||
) |
This example is from Borodovsky & Ekisheva, p.
80-81. It is just slightly more complex.
TEST_CASE | ( | "SimplestBaumWelchDiscreteHMM" | , |
"" | [HMMTest] | ||
) |
In this example we try to estimate the transmission and emission matrices based on some observations.
We use the simplest possible model.
TEST_CASE | ( | "GMMHMMPredictTest" | , |
"" | [HMMTest] | ||
) |
Test that HMMs work with Gaussian mixture models.
We'll try putting in a simple model by hand and making sure that prediction of observation sequences works correctly.
TEST_CASE | ( | "DiagonalGMMHMMPredictTest" | , |
"" | [HMMTest] | ||
) |
DiagonalGMM Hidden Markov Models Tests.
Make sure the prediction of DiagonalGMM HMMs is reasonable.