Skip to content

An implementation of Auto-Regressive Hidden Markov Model

Notifications You must be signed in to change notification settings

mginesi/nl_arhmm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

This repository contains a Python3 implementation of (Non-Linear) AR-HMM.

References

This code is based on the following article:
GINESI, Michele; FIORINI, Paolo. Generalization of Auto-Regressive Hidden Markov Models to Non-Linear Dynamics and Unit Quaternion Observation Space. IEEE Robotics and Automation Letters, 2023.

If you use this code, please cite it. You can find the complete bibentry in the ref.bib file

Installation

run (may require superuser permissions)

pip3 install .

Usage

The package allows to define a model as a class.
Each model is characterized by the number of hidden modes and the dynamics/observation space definition. Depending on the particular model, the latter parameters is defined in different ways. In particular

  • for GRBF_ARHMM, Linear_ARHMM, Quadratic_ARHMM, and Cubic_ARHMM the dimensionality of the space has to be defined;
  • for Unit_Quaternion_ARHMM, Hand_Gripper_ARHMM, Decoupled_Linear_ARHMM, Orientation_Gripper_ARHMM, Pose_ARHMM, and Pose_Gripper_ARHMM the number of end effectors has to be defined;
  • for Generic_Decoupled_Linear_ARHMM the list of decoupled dimensions has to be specified.

class methods

The ARHMM object has the following methods:

  • initialize to initialize the guesses for the EM algorithm using clustering
  • em_algorithm to perform the EM algorithm
  • viterbi to use the Viterbi algorithm

NOTE: EM algorithm and initialize nedd a list of trajectories. If your data is a single trajectory, run the methods on a list with that trajectory as argument.

Repository Content

Folder nl\_arhmm contains the code, while folde demos/ contains some examples.
nl\_arhmm/arhmm.py and nl\_arhmm/dynamics.py contain a template to create your personal ARHMM with custom dynamics.

some remarks

Contact

About

An implementation of Auto-Regressive Hidden Markov Model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published