jAER project on SourceForge

ch.unizh.ini.jaer.projects.robothead
Class HmmTools

java.lang.Object
  extended by ch.unizh.ini.jaer.projects.robothead.HmmTools

public class HmmTools
extends java.lang.Object

This class contains some methods that are used by the Filter HMM Filter, which recognizes sound patterns with a Hidden Markov Model.

Author:
Administrator

Field Summary
 double[][] DATA
           
 double[][] DECODE_Left
           
 double[][] DECODE_Right
           
 double[][] EMIS_Left
           
 double[][] EMIS_Right
           
 int[] LUT
           
 double[][] SOUND_Left
           
 double[][] SOUND_Right
           
 double[][] TR_Left
           
 double[][] TR_Right
           
 
Constructor Summary
HmmTools(int maxVal)
          Creates a new instance of HmmTools
 
Method Summary
 void genCodeArray(int maxVal)
           
 void genSoundLUT()
           
 int getObservation(int a, int b, int c, int d, int e)
           
 void loadHmmData()
           
 double[][] viterbi(java.util.Vector obsBuffer, int piState, double[][] a, double[][] b)
          Viterbi algorithm for hidden Markov models.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TR_Left

public double[][] TR_Left

TR_Right

public double[][] TR_Right

EMIS_Left

public double[][] EMIS_Left

EMIS_Right

public double[][] EMIS_Right

DATA

public double[][] DATA

SOUND_Left

public double[][] SOUND_Left

SOUND_Right

public double[][] SOUND_Right

DECODE_Left

public double[][] DECODE_Left

DECODE_Right

public double[][] DECODE_Right

LUT

public int[] LUT
Constructor Detail

HmmTools

public HmmTools(int maxVal)
Creates a new instance of HmmTools

Method Detail

genCodeArray

public void genCodeArray(int maxVal)

getObservation

public int getObservation(int a,
                          int b,
                          int c,
                          int d,
                          int e)

loadHmmData

public void loadHmmData()

genSoundLUT

public void genSoundLUT()

viterbi

public double[][] viterbi(java.util.Vector obsBuffer,
                          int piState,
                          double[][] a,
                          double[][] b)
Viterbi algorithm for hidden Markov models. Given an observation sequence o, Viterbi finds the best possible state sequence for o on this HMM, along with the state optimized probability.

Parameters:
obsBuffer - the observation sequence
Returns:
a 2d array consisting of the minimum cost, U, at position (0,0) and the best possible path beginning at (1,0). The state optimized probability is Euler's number raised to the power of -U.

jAER project on SourceForge