Giter VIP home page Giter VIP logo

hidden-markov-model's Introduction

Hidden-Markov-Model

Requirements:

  • scipy>=0.15.1
  • numpy>=1.8.0

File Descriptions:

  • main.py: primary file to run. Contains implementation to parse input and call inference and learning modules.
  • hmms.py: Implementation of forward backward functions, inference and learning methods.
  • data.txt: Observable outcome for time series data. total 50 instance, each of length 30.
  • model-input-file.txt: Pre-estimated parameters for inference.

Instructions to run the implementation:

  • Perform Inference: Infer hidden status given outcomes of time series data.

    python main.py --mode test --data data.txt --predictions-file predictions-file.txt \
    --model-input-file model-input-file.txt
    
  • Learning-Estimate model Parameters:

    python main.py --mode train --data data.txt --model-input-file model-input-file.txt \
    --model-output-file model-output-file.txt --iterations 100
    
  • Predictions: Predict the hidden states for new data using the parameter learned.

    python main.py --mode test --data data.txt --predictions-file predictions-file-after-learning.txt \
    --model-input-file model-output-file.txt\
    
  • For more details run help:

    $ python main.py --help
    usage: main.py [-h] --mode {train,test} [--data DATA]
    [--predictions-file PREDICTIONS_FILE]
    [--model-input-file MODEL_INPUT_FILE]
    [--model-output-file MODEL_OUTPUT_FILE]
    [--iterations ITERATIONS]
    Perform HMM inference or learning.
    

hidden-markov-model's People

Contributors

vijayaramilla avatar

Watchers

James Cloos avatar

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.