[mlpack-svn] r10300 - mlpack/trunk/src/mlpack/methods/hmm
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Wed Nov 16 15:13:10 EST 2011
Author: rcurtin
Date: 2011-11-16 15:13:10 -0500 (Wed, 16 Nov 2011)
New Revision: 10300
Modified:
mlpack/trunk/src/mlpack/methods/hmm/hmm.hpp
Log:
Document the HMM class more effectively.
Modified: mlpack/trunk/src/mlpack/methods/hmm/hmm.hpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/hmm/hmm.hpp 2011-11-16 19:16:36 UTC (rev 10299)
+++ mlpack/trunk/src/mlpack/methods/hmm/hmm.hpp 2011-11-16 20:13:10 UTC (rev 10300)
@@ -14,7 +14,39 @@
namespace hmm {
/**
- * A class that represents a Hidden Markov Model.
+ * A class that represents a Hidden Markov Model with an arbitrary type of
+ * emission distribution. This HMM class supports training (supervised and
+ * unsupervised), prediction of state sequences via the Viterbi algorithm,
+ * estimation of state probabilities, generation of random sequences, and
+ * calculation of the log-likelihood of a given sequence.
+ *
+ * The template parameter, Distribution, specifies the distribution which the
+ * emissions follow. The class should implement the following functions:
+ *
+ * @code
+ * class Distribution
+ * {
+ * public:
+ * // The type of observation used by this distribution.
+ * typedef something DataType;
+ *
+ * // Return the probability of the given observation.
+ * double Probability(const DataType& observation) const;
+ *
+ * // Estimate the distribution based on the given observations.
+ * void Estimate(const std::vector<DataType>& observations);
+ *
+ * // Estimate the distribution based on the given observations, given also
+ * // the probability of each observation coming from this distribution.
+ * void Estimate(const std::vector<DataType>& observations,
+ * const std::vector<double>& probabilities);
+ * };
+ * @endcode
+ *
+ * See the mlpack::distribution::DiscreteDistribution class for an example. One
+ * would use the DiscreteDistribution class when the observations are
+ * non-negative integers. Other distributions could be Gaussians, a mixture of
+ * Gaussians (GMM), or any other probability distribution.
*/
template<typename Distribution>
class HMM
More information about the mlpack-svn
mailing list