jmschrei / yahmm

Yet Another Hidden Markov Model repository.
MIT License
249 stars 32 forks source link

Added new example for finding posterior probabilities #20

Closed tlnagy closed 10 years ago

tlnagy commented 10 years ago

I also added package version information to my other example. Let me know what you think! This is a cleaned up version of the one in #17.

jmschrei commented 10 years ago

I think this is a good example of using posterior decoding versus the viterbi path. I don't know why you call sns.plt.function when you can just call function since you've imported matplotlib into your namespace already (i.e. sns.plt.ylim([0,1.2]) can be ylim([0,1.2]). You should also use xrange or np.arange instead of range, as range produces a clunky python list of all the numbers, while xrange produces a nice generator object and np.arange produces a compact list of floats.

Looks good otherwise.

tlnagy commented 10 years ago

I have been writing too much Python 3 it seems. I forgot that range didn't use to return a generator.