Create hmm.py

Hidden Markov Model base class