Code Monkey home page Code Monkey logo

rhmm's Introduction

Scalable Hidden Markov Model

Shane Neph

This is written in the hopes of scaling to big data. The library is roughly based upon Rabiner's pseudo code for a discrete HMM, though it is modified to give various tradeoffs between memory and time.

Just type 'make' in the main directory and run with bin/rHMM.


#######################################

Usage

  • rHMM --help or --version
  • rHMM train [--seed <+integer>] <number-states> <number-iterations> <observed-sequence-file>
  • rHMM probability <hmm-parameters-file> <observed-sequence-file>
  • rHMM decode <hmm-parameters-file> <observed-sequence-file>
  • rHMM train-and-decode [--seed <+integer>] <number-states> <number-iterations> <observed-sequence-file>

All output is sent to stdout. You can train an hmm, save its output, and then use it as an <hmm-parameters-file> to determine the probability of another observed sequence, or to decode the hidden states of another observed sequence. You can also train an hmm on an observed sequence and decode the hidden states of that same sequence using train-and-decode.


I'm utilizing the train() function in include/impl/train.hpp. There are 2 other versions in that same file (slightly different names), that take the same arguments. One version focuses on speed with a max memory footprint (most closely resemble's Rabiner's pseudo-code), while the other is the most efficient in memory, where it improves upon how things scale in the number of symbols and states. Typically, it's the number of observations that can lead to problems when it comes to big data. However, just swap out train() in src/hmm.cpp with train_mem() or train_full() as you see fit. There are comments in include/impl/train.hpp to help you to decide best.

rhmm's People

Contributors

sjneph avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

skuehn

rhmm's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.