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 7815869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:39:44+00:00 2026-06-02T05:39:44+00:00

The definition may be wrong, so please correct me if that is so.. I

  • 0

The definition may be wrong, so please correct me if that is so.. I need to generate a Markov model from a matrix of a following kind:

four    two "e"         
four    two "e"         
three   three   "e"         
one three   "e"         
zero    six one zero    "e" 
two two "e"         
two two "e"         
two two "e"         
two two "e"         
two two "e"         
four    zero    "e"         
two two "e"         
three   one three   "e"     
three   "e"             
four    one "e"         
three   one "e"         
two one one zero    two "e"
two five    "e"         
three   four    two "e"     
zero    five    "e"         
three   "e"             
three   three   "e"         
three   "e"             
one one "e"         
three   two "e"         
one one "e"         
three   two zero    zero    zero    "e"
three   three   "e"         
three   one "e"         
three   two "e"         

I need the output to be something like: {“four”:[{2:”two”, 3:”one”,2:”exit”},{…}],”three”:[{…}]}

The numbers above are basically how many times does the transition to a particular state happens..

I am using python for this.

Answer to the usual question “what have you tried?”: “I tried a couple for approaches but they did not quite deliver, so I hope one of the answers will help clarifying things a bit”.

Thanks a lot.

EDIT, updated to show the full matrix.

  • 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-06-02T05:39:47+00:00Added an answer on June 2, 2026 at 5:39 am

    You haven’t given a matrix of transitions (these would be probabilities), but rather a sequence of observed transitions that result from an underlying Markov model.

    Unless you have an infinite number of these observations, then you can’t reconstruct the underlying transition parameters exactly. You can however, choose the transitions such that your sequence of observables is the most likely. If I understand your question, you should look into solutions of Hidden Markov Models. A freely available python module GHMM can be found here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In many books or articles u may see such a definition about interface :
First a quick definition :) Template - A string which may contain placeholders (example:hello
This question may be silly but i accidentally checked in java source code that
The spring framework documentation states: In the unlikely case that a test may 'dirty'
I have a simple xaml control with the following Grid Row definition: <Grid.RowDefinitions> <RowDefinition
The answer to this question may be obvious but I need to ask it
The below definition is taken from Hibernate association mapping tutorial here Each book is
I don't see what's wrong here, but I may just misunderstand the syntax. I'm
I may have this wrong, but I've seen the way of creating an overloaded
I kind of posted a similar question a couple of days ago but that

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.