FROG

FROG Recognizer of Gestures

Kmeans Class Reference

Kmeans is a Quantizer implementation that utilizes the k-means algorithm (as well as k-means++ if requested) to select appropriate representatives (that is, build its codebook). More...

Inheritance diagram for Kmeans:
Collaboration diagram for Kmeans:

List of all members.

Public Member Functions

 Kmeans (Vector< Accel3D > in)
 Constructs a Kmeans quantizer with a given 3D acceleration data set.
 Kmeans (KmeansParameters params, Vector< Accel3D > in)
 Constructs a Kmeans quantizer with a given set of k-means parameters and a 3D acceleration data set.
int translate (Accel3D acc)
 For Kmeans, translates to the index of the closest mean determined by the k-means algorithm.
int getNumMeans ()
 Accessor for the number of means.
int size ()
 For Kmeans, the size corresponds to the number of means (k).
Accel3D[] getMeans ()
 Returns the array of Accel3Ds making up the means for this Quantizer.
Vector< Accel3DgetDataSet ()
 Accessor for the data set utilized by this Quantizer.
void setDataSet (Vector< Accel3D > data)
 Sets the data set to use in this Quantizer.
int getType ()
 Accessor for the Quantizer type index.

Static Public Attributes

static final int KMEANS = 0
 This is the Quantizer type index for Kmeans quantizers.
static final int NUM_TYPES_SUPPORTED = 1
 This is the number of Quantizer implementations currently supported by Quantizer.

Protected Attributes

int k
Accel3D[] oldMeans
Accel3D[] means
Vector< Accel3DtrainingSet

Detailed Description

Kmeans is a Quantizer implementation that utilizes the k-means algorithm (as well as k-means++ if requested) to select appropriate representatives (that is, build its codebook).

Author:
Team Better Recognize

Constructor & Destructor Documentation

Kmeans ( Vector< Accel3D in  ) 

Constructs a Kmeans quantizer with a given 3D acceleration data set.

Parameters:
in a set of Accel3D values
Kmeans ( KmeansParameters  params,
Vector< Accel3D in 
)

Constructs a Kmeans quantizer with a given set of k-means parameters and a 3D acceleration data set.

Parameters:
params quantizing parameters
in a set of Accel3D values

Here is the call graph for this function:


Member Function Documentation

Vector<Accel3D> getDataSet (  ) 

Accessor for the data set utilized by this Quantizer.

Returns:
the data set for the Quantizer

Implements Quantizer.

Accel3D [] getMeans (  ) 

Returns the array of Accel3Ds making up the means for this Quantizer.

Returns:
the array of Accel3Ds making up the means for this Quantizer.
int getNumMeans (  ) 

Accessor for the number of means.

Returns:
the number of means.
int getType (  ) 

Accessor for the Quantizer type index.

Should return the value as specified in the Quantizer interface.

Returns:
the Quantizer type index.

Implements Quantizer.

void setDataSet ( Vector< Accel3D data  ) 

Sets the data set to use in this Quantizer.

Parameters:
data the data set to assign to this Quantizer

Implements Quantizer.

Here is the call graph for this function:

int size (  ) 

For Kmeans, the size corresponds to the number of means (k).

Implements Quantizer.

int translate ( Accel3D  acc  ) 

For Kmeans, translates to the index of the closest mean determined by the k-means algorithm.

Implements Quantizer.


Member Data Documentation

int k [protected]
final int KMEANS = 0 [static, inherited]

This is the Quantizer type index for Kmeans quantizers.

Accel3D [] means [protected]
final int NUM_TYPES_SUPPORTED = 1 [static, inherited]

This is the number of Quantizer implementations currently supported by Quantizer.

Accel3D [] oldMeans [protected]
Vector<Accel3D> trainingSet [protected]

The documentation for this class was generated from the following file:
  • /Users/dev/Documents/SVN brazos.cs.tcu.edu/trunk/FROG/src/frog/Kmeans.java
 All Classes Namespaces Files Functions Variables