Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Python and Hidden Markov Model

181 views
Skip to first unread message

subhaba...@gmail.com

unread,
Mar 7, 2013, 3:48:06 PM3/7/13
to
Dear Group,

I was trying to learn Hidden Markov Model. In Python there are various packages, but I was willing to do some basic calculation starting from the scratch so that I can learn the model very aptly. Do you know of any thing such?

Thanking you in Advance,
Regards,
Subhabrata.

Dave Angel

unread,
Mar 7, 2013, 7:12:06 PM3/7/13
to pytho...@python.org
On 03/07/2013 03:48 PM, subhaba...@gmail.com wrote:
> Dear Group,
>
> I was trying to learn Hidden Markov Model. In Python there are various packages, but I was willing to do some basic calculation starting from the scratch so that I can learn the model very aptly. Do you know of any thing such?
>

I'm sorry, but I'm having trouble figuring out what you're asking for.
You said there are packages that could help, but that you want to learn
more by doing it from scratch. So what then are you asking for, if not
packages, sample code or something that's not "from scratch" ?


--
DaveA

Oscar Benjamin

unread,
Mar 7, 2013, 7:55:52 PM3/7/13
to Subhabrata Banerjee, Python List
On 7 March 2013 20:48, <subhaba...@gmail.com> wrote:
> Dear Group,
>
> I was trying to learn Hidden Markov Model. In Python there are various packages, but I was willing to do some basic calculation starting from the scratch so that I can learn the model very aptly. Do you know of any thing such?

This question is not really appropriate on this list. Since this isn't
the first time you've asked relatively specialist questions here, I'll
suggest that you consider asking somewhere else in future. I would
start by looking at lists that are dedicated to scientific
programming.

Whether you ask here or somewhere else you'll need to be clearer about
what you actually want to do and why you are asking the list. Are you
looking to run stochastic simulations? Or is your problem to do with
model validation or inference of hidden state using data? Or something
else? Are you thinking of discrete or continuous time Markov systems?
Why are you currently unable to do whatever it is that you wanted to
do?


Oscar

subhaba...@gmail.com

unread,
Mar 8, 2013, 12:26:54 AM3/8/13
to
Dear Sir,

Thank you for your kind reply. I agree with most of your points but I differ slightly

also.

My problem is over model validation on continuous time Markov system.
Generally, I understand the theory and can run the kits like HMM.py or Scikit-learn.
The problem is if I can not fit the data in run time I would be at the mercy of the kit.
So I wanted to know the coding of the computation.

I am specifically looking at the small python example of Forward, Backward and Viterbi

calculation.
I tried to surf the web but did not help much. I do not know much of Scientific forum.

I thought as HMM.py, NLTK, Scikit-learn are Python implementations so there would be lot

of people in the room who would know it.

And I got people like you, so I can not say I am wrong!

Regards,
Subhabrata.


Oscar Benjamin

unread,
Mar 8, 2013, 9:29:39 AM3/8/13
to Subhabrata Banerjee, Python List
On 8 March 2013 05:26, <subhaba...@gmail.com> wrote:
> On Friday, March 8, 2013 2:18:06 AM UTC+5:30, subhaba...@gmail.com wrote:
>>
>> I was trying to learn Hidden Markov Model. In Python there are various packages, but I was willing to do some basic calculation starting from the scratch so that I can learn the model very aptly. Do you know of any thing such?
>
> My problem is over model validation on continuous time Markov system.
> Generally, I understand the theory and can run the kits like HMM.py or Scikit-learn.
> The problem is if I can not fit the data in run time I would be at the mercy of the kit.
> So I wanted to know the coding of the computation.

If those projects can do what you want then why not just look at their code?

> I am specifically looking at the small python example of Forward, Backward and Viterbi
> calculation. I tried to surf the web but did not help much.

How about these two (both in Python):
http://en.wikipedia.org/wiki/Viterbi_algorithm#Example
http://en.wikipedia.org/wiki/Forward%E2%80%93backward_algorithm#Python_example

> I do not know much of Scientific forum.
Try scipy-user as a start (someone there may know of a better mailing list):
http://mail.scipy.org/mailman/listinfo/scipy-user

> I thought as HMM.py, NLTK, Scikit-learn are Python implementations so there would be lot
> of people in the room who would know it.
> And I got people like you, so I can not say I am wrong!

Python as a programming language is used for many different things. I
doubt that many people on this list will know what a Hidden Markov
Model is. While I do know what they are, I have never done anything
with them in Python or otherwise. However, if you ask in the right
place, I'm sure that you will find people who have done similar things
in Python.


Oscar

Subhabrata

unread,
Mar 8, 2013, 12:53:02 PM3/8/13
to
On Mar 8, 7:29 pm, Oscar Benjamin <oscar.j.benja...@gmail.com> wrote:
> On 8 March 2013 05:26,  <subhabangal...@gmail.com> wrote:
>
> > On Friday, March 8, 2013 2:18:06 AM UTC+5:30, subhaba...@gmail.com wrote:
>
> >> I was trying to learn Hidden Markov Model. In Python there are various packages, but I was willing to do some basic calculation starting from the scratch so that I can learn the model very aptly. Do you know of any thing such?
>
> > My problem is over model validation on continuous time Markov system.
> > Generally, I understand the theory and can run the kits like HMM.py or Scikit-learn.
> > The problem is if I can not fit the data in run time I would be at the mercy of the kit.
> > So I wanted to know the coding of the computation.
>
> If those projects can do what you want then why not just look at their code?
>
> > I am specifically looking at the small python example of Forward, Backward and Viterbi
> > calculation. I tried to surf the web but did not help much.
>
> How about these two (both in Python):http://en.wikipedia.org/wiki/Viterbi_algorithm#Examplehttp://en.wikipedia.org/wiki/Forward%E2%80%93backward_algorithm#Pytho...
>
> > I do not know much of Scientific forum.
>
> Try scipy-user as a start (someone there may know of a better mailing list):http://mail.scipy.org/mailman/listinfo/scipy-user
>
> > I thought as HMM.py, NLTK, Scikit-learn are Python implementations so there would be lot
> > of people in the room who would know it.
> > And I got people like you, so I can not say I am wrong!
>
> Python as a programming language is used for many different things. I
> doubt that many people on this list will know what a Hidden Markov
> Model is. While I do know what they are, I have never done anything
> with them in Python or otherwise. However, if you ask in the right
> place, I'm sure that you will find people who have done similar things
> in Python.
>
> Oscar

Thank you Sir for your kind time. I would surely check them. Regards,
Subhabrata.
0 new messages