org.wiigee.logic
Class Quantizer

java.lang.Object
  extended by org.wiigee.logic.Quantizer

public class Quantizer
extends java.lang.Object

This class implements a quantization component. In this case a k-mean-algorithm is used. In this case the initial values of the algorithm are ordered as two intersected circles, representing an abstract globe with k=14 elements. As a special feature the radius of this globe would be calculated dynamically before the training of this component.


Constructor Summary
Quantizer(int numStates)
          Initialize a empty quantizer.
 
Method Summary
 int[][] deriveGroups(Gesture gesture)
          This methods looks up a Gesture to a group matrix, used by the k-mean-algorithm (traincenteroid method) above.
 double[][] getHashMap()
           
 int[] getObservationSequence(Gesture gesture)
          With this method you can transform a gesture to a discrete symbol sequence with values between 0 and granularity (number of observations).
 double getRadius()
           
 void printMap()
          Prints out the current centeroids-map.
 void setUpManually(double[][] map, double radius)
           
 void trainCenteroids(Gesture gesture)
          Trains this Quantizer with a specific gesture.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Quantizer

public Quantizer(int numStates)
Initialize a empty quantizer. The states variable is necessary since some algorithms need this value to calculate their values correctly.

Parameters:
numStates - number of hidden markov model states
Method Detail

trainCenteroids

public void trainCenteroids(Gesture gesture)
Trains this Quantizer with a specific gesture. This means that the positions of the centeroids would adapt to this training gesture. In our case this would happen with a summarized virtual gesture, containing all the other gestures.

Parameters:
gesture - the summarized virtual gesture

deriveGroups

public int[][] deriveGroups(Gesture gesture)
This methods looks up a Gesture to a group matrix, used by the k-mean-algorithm (traincenteroid method) above.

Parameters:
gesture - the gesture

getObservationSequence

public int[] getObservationSequence(Gesture gesture)
With this method you can transform a gesture to a discrete symbol sequence with values between 0 and granularity (number of observations).

Parameters:
gesture - Gesture to get the observationsequence to.

printMap

public void printMap()
Prints out the current centeroids-map. Its for debug or technical interests.


getRadius

public double getRadius()

getHashMap

public double[][] getHashMap()

setUpManually

public void setUpManually(double[][] map,
                          double radius)