gov.sandia.cognition.learning.function.vector
Class GaussianContextRecognizer

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.function.vector.GaussianContextRecognizer
All Implemented Interfaces:
Evaluator<Vector,Vector>, VectorFunction, VectorInputEvaluator<Vector,Vector>, VectorOutputEvaluator<Vector,Vector>, CloneableSerializable, Serializable, Cloneable

public class GaussianContextRecognizer
extends AbstractCloneableSerializable
implements VectorFunction, VectorInputEvaluator<Vector,Vector>, VectorOutputEvaluator<Vector,Vector>

Uses a MixtureOfGaussians to compute the probability of the different constituent MultivariateGaussians (that is, the contexts)

Since:
1.0
Author:
Kevin R. Dixon
See Also:
Serialized Form

Nested Class Summary
static class GaussianContextRecognizer.Learner
          Creates a GaussianContextRecognizer from a Dataset using a BatchClusterer
 
Constructor Summary
GaussianContextRecognizer()
          Creates a new instance of GaussianContextRecognizer
GaussianContextRecognizer(Collection<GaussianCluster> clusters)
          Creates a new instance of GaussianContextRecognizer
GaussianContextRecognizer(GaussianContextRecognizer other)
          Copy constructor
GaussianContextRecognizer(MixtureOfGaussians.PDF gaussianMixture)
          Creates a new instance of GaussianContextRecognizer
 
Method Summary
 GaussianContextRecognizer clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
 void consumeClusters(Collection<GaussianCluster> clusters)
          Uses the given clusters to populate the internal clusters of this
 Vector evaluate(Vector input)
          Evaluates the function on the given input and returns the output.
 MixtureOfGaussians.PDF getGaussianMixture()
          Getter for gaussianMixture
 int getInputDimensionality()
          Gets the expected dimensionality of the input vector to the evaluator, if it is known.
 int getOutputDimensionality()
          Gets the expected dimensionality of the output vector of the evaluator, if it is known.
 void setGaussianMixture(MixtureOfGaussians.PDF gaussianMixture)
          Setter for gaussianMixture
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GaussianContextRecognizer

public GaussianContextRecognizer()
Creates a new instance of GaussianContextRecognizer


GaussianContextRecognizer

public GaussianContextRecognizer(MixtureOfGaussians.PDF gaussianMixture)
Creates a new instance of GaussianContextRecognizer

Parameters:
gaussianMixture - Underlying MixtureOfGaussians that computes context probabilities

GaussianContextRecognizer

public GaussianContextRecognizer(Collection<GaussianCluster> clusters)
Creates a new instance of GaussianContextRecognizer

Parameters:
clusters -

GaussianContextRecognizer

public GaussianContextRecognizer(GaussianContextRecognizer other)
Copy constructor

Parameters:
other - GaussianContextRecognizer to clone
Method Detail

clone

public GaussianContextRecognizer clone()
Description copied from class: AbstractCloneableSerializable
This makes public the clone method on the Object class and removes the exception that it throws. Its default behavior is to automatically create a clone of the exact type of object that the clone is called on and to copy all primitives but to keep all references, which means it is a shallow copy. Extensions of this class may want to override this method (but call super.clone() to implement a "smart copy". That is, to target the most common use case for creating a copy of the object. Because of the default behavior being a shallow copy, extending classes only need to handle fields that need to have a deeper copy (or those that need to be reset). Some of the methods in ObjectUtil may be helpful in implementing a custom clone method. Note: The contract of this method is that you must use super.clone() as the basis for your implementation.

Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class AbstractCloneableSerializable
Returns:
A clone of this object.

evaluate

public Vector evaluate(Vector input)
Description copied from interface: Evaluator
Evaluates the function on the given input and returns the output.

Specified by:
evaluate in interface Evaluator<Vector,Vector>
Parameters:
input - The input to evaluate.
Returns:
The output produced by evaluating the input.

consumeClusters

public void consumeClusters(Collection<GaussianCluster> clusters)
Uses the given clusters to populate the internal clusters of this

Parameters:
clusters - Clusters from which to create the data for this

getGaussianMixture

public MixtureOfGaussians.PDF getGaussianMixture()
Getter for gaussianMixture

Returns:
Underlying MixtureOfGaussians that computes context probabilities

setGaussianMixture

public void setGaussianMixture(MixtureOfGaussians.PDF gaussianMixture)
Setter for gaussianMixture

Parameters:
gaussianMixture - Underlying MixtureOfGaussians that computes context probabilities

getInputDimensionality

public int getInputDimensionality()
Description copied from interface: VectorInputEvaluator
Gets the expected dimensionality of the input vector to the evaluator, if it is known. If it is not known, -1 is returned.

Specified by:
getInputDimensionality in interface VectorInputEvaluator<Vector,Vector>
Returns:
The expected dimensionality of the input vector to the evaluator, or -1 if it is not known.

getOutputDimensionality

public int getOutputDimensionality()
Description copied from interface: VectorOutputEvaluator
Gets the expected dimensionality of the output vector of the evaluator, if it is known. If it is not known, -1 is returned.

Specified by:
getOutputDimensionality in interface VectorOutputEvaluator<Vector,Vector>
Returns:
The expected dimensionality of the output vector of the evaluator, or -1 if it is not known.