Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added documentation and licensing information
darcs-hash:20071106223150-4ed31-5081cfd33b91210716a4e89f4731d06ea3cd361f.gz
- Loading branch information
ronw
committed
Nov 6, 2007
1 parent
f135bc3
commit 07be09e
Showing
23 changed files
with
1,039 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
This package contains a set of standard functional programming tools | |||
that can be used on cell arrays. Contains implementations of map, | |||
reduce, filter (called cfilter so as not to conflict with the filter() | |||
function in the Signal Processing Toolbox), and lazymap which has the | |||
same semantics as map but uses lazy evaluation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,59 @@ | |||
This package contains a set of functions for evaluating HMMs and GMMs. | |||
|
|||
* Functions | |||
|
|||
- The important ones: | |||
- eval_gmm - compute the posterior probability of a GMM given data | |||
- eval_hmm - compute the posterior probabilities of all possible HMM | |||
state sequences given data | |||
- decode_hmm - find the most likely state sequence through the HMM | |||
given data | |||
|
|||
- Utility functions: | |||
- logsum - takes the sum of a matrix of log likelihoods | |||
- lmvnpdf - compute the log probability of data under a | |||
multivariate Gaussian distribution | |||
|
|||
* Data Structures | |||
|
|||
The functions in this toolbox pass around the following structures: | |||
Note: all probabilities are stored as log probabilities | |||
|
|||
** GMM | |||
- gmm.nmix - number of components in the mixture | |||
- gmm.priors - array of prior log probabilities over each state | |||
- gmm.means - matrix of means (column x is mean of component x) | |||
- gmm.covars - matrix of covariance (column x is the diagonal of the | |||
covariance matrix of component x) | |||
|
|||
** HMM with GMM observations | |||
- hmm.name - | |||
- hmm.nstates - number of states in the HMM | |||
- hmm.emission_type - 'GMM' | |||
- hmm.start_prob - array of log probs P(first observation is state x) | |||
- hmm.end_prob - array of log probs P(last observation is state x) | |||
- hmm.transmat - matrix of transition log probs (transmat(x,y) | |||
= log(P(transition from state x to state y))) | |||
- hmm.labels - optional cell array of labels for each state in the HMM | |||
(for use in composing HMMs) | |||
- hmm.gmms - array of GMM structures | |||
|
|||
** HMM with Gaussian observations | |||
- hmm.nstates - number of states in the HMM | |||
- hmm.emission_type - 'gaussian' | |||
- hmm.start_prob - array of log probs P(first observation is state x) | |||
- hmm.end_prob - array of log probs P(last observation is state x) | |||
- hmm.transmat - matrix of transition log probs (transmat(x,y) | |||
= log(P(transition from state x to state y))) | |||
- hmm.labels - optional cell array of labels for each state in the HMM | |||
(for use in composing HMMs) | |||
- hmm.means - matrix of means (column x is mean of state x) | |||
- hmm.covars - matrix of means (column x is the diagonal of the | |||
covariance matrix of component x) | |||
|
|||
Note that each row of exp(hmm.transmat) does not necessarily sum to 1 | |||
because for each state x there is some probability | |||
(exp(hmm.exit_prob(x))) that the next transition will be to a | |||
non-emitting exit state (i.e. the current observation is the last | |||
observation in the sequence). The correct invariant is: | |||
sum(exp(hmm.transmat, 2)) + exp(hmm.exit_prob) == ones(hmm.nstates, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.