Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7175173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:13:41+00:00 2026-05-28T16:13:41+00:00

i’m doing gesture recognition in python and one the the more complete library i’ve

  • 0

i’m doing gesture recognition in python and one the the more complete library i’ve found that can manage Hidden Markov Model is nltk. But there is something that i can’t understand.

First of all, the data. I have coordinates of the gesture and i have clustized them in 8 cluster (with k-means). so this is my gesture structure:

raw coordinates x,y: [[123,16], [120,16], [115,16], [111,16], [107,16], [103,17], ...]

centroids x,y : [[ 132.375        56.625     ]
                 [ 122.45454545   30.09090909]
                 [  70.5          27.33333333]
                 ...]

labels: [5 6 6 6 6 6 6 2 2 2 2 2 2 4 4 4 ...]

Now i want to train an HMM with Baum-Welch with my . So HiddenMarkovModelTrainer is my class.

I’ve found in internet some few more implementations of baum welch, but only in Matlab. the implementation of this algorithms tipically need this input:

baum-welch(X, alphabet, H)

where
– X is the data for train (in my case – labels)
– alphabet the possible values of the data (in my case – 0,1,2,3,4,5,6,7)
– H the number of hidden states

Now i am confused because in ntlk.HiddenMarkovModelTrainer constructor i have to give states and symbols and i don’t know what they should be, considering that the data to train X is the imput of HiddenMarkovModelTrainer.train_unsupervised() method i think that my alphabet is symbol.. i don’t know what to put in states.

i hope my explanation is clear even if my english is poor.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:13:42+00:00Added an answer on May 28, 2026 at 4:13 pm

    Hidden Markov Models are called so because their actual states are not observable; instead, the states produce an observation with a certain probability. The classical use of HMMs in the NLTK is POS tagging, where the observations are words and the hidden internal states are POS tags. Look at this example to understand what the states and symbols parameters mean in this case.

    For gesture recognition with HMM, the observations are temporal sequences of some kind of feature modeling (symbols) of the geometrical input data – in your case, you use clustering (also called “zoning” – see section 3.2 of this paper (“Yang, Xu. Hidden Markov Model for Gesture Recognition”) for some other possible models). To my understanding, the set of internal states doesn’t have any meaningful interpretation. The number of internal states used in the training of an HMM for each gesture is simply a parameter that has to be experimented with. For an example, see this paper (“Yamato, Ohya, Ishii. Recognizing Human Action in Time-Sequential Images using HMM”) – the number of states is set to 36, which is criticized as being too high in this master thesis, just to cite an example of this being a modifiable parameter.

    So I would try it with this code:

    observed_sequence = [5, 6, 6, 6, 6, 6, 6, 2, 2, 2, 2, 2, 2, 4, 4, 4]
    states = range(20) # experiment with this number
    symbols = set(observed_clusters)
    trainer = HiddenMarkovModelTrainer(states, symbols)
    model = trainer.train_unsupervised([observed_sequence])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
Does anyone know how can I replace this 2 symbol below from the string
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.