frog
Class Bayesian

java.lang.Object
  extended by frog.Bayesian
All Implemented Interfaces:
Classifier, Serializable

public class Bayesian
extends Object
implements Classifier, Serializable

Bayesian is a classifier that uses Bayesian conditional probability to classify gestures.

Author:
Team Better Recognize
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface frog.Classifier
BAYESIAN, NUM_TYPES_SUPPORTED
 
Constructor Summary
Bayesian(Vector<GestureModel> m)
          Creates a Bayesian Classifier with the given set of GestureModels.
 
Method Summary
 GestureModel classify(Vector<Accel3D> g)
          Classifies a given gesture against the Classifier's set of GestureModels.
 double getLastProbability()
          Returns the probability of the last classification.
 Vector<GestureModel> getModels()
          Returns the set of GestureModels that form this Classifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bayesian

public Bayesian(Vector<GestureModel> m)
Creates a Bayesian Classifier with the given set of GestureModels.

Parameters:
m - the set of GestureModels used in construction
Method Detail

classify

public GestureModel classify(Vector<Accel3D> g)
Description copied from interface: Classifier
Classifies a given gesture against the Classifier's set of GestureModels.

Specified by:
classify in interface Classifier
Returns:
the GestureModel matched with maximum probability (or null if a match failed)

getLastProbability

public double getLastProbability()
Description copied from interface: Classifier
Returns the probability of the last classification.

Specified by:
getLastProbability in interface Classifier
Returns:
the double representing the probability of the last classification

getModels

public Vector<GestureModel> getModels()
Description copied from interface: Classifier
Returns the set of GestureModels that form this Classifier.

Specified by:
getModels in interface Classifier
Returns:
a Vector of GestureModels that form the Classifier