gov.sandia.cognition.learning.algorithm.clustering.cluster
Class GaussianClusterCreator

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.clustering.cluster.GaussianClusterCreator
All Implemented Interfaces:
ClusterCreator<GaussianCluster,Vector>, CloneableSerializable, Serializable, Cloneable

@CodeReview(reviewer="Kevin R. Dixon",
            date="2008-07-22",
            changesNeeded=false,
            comments={"Created default constructor.","Otherwise code looks fine."})
public class GaussianClusterCreator
extends AbstractCloneableSerializable
implements ClusterCreator<GaussianCluster,Vector>

The GaussianClusterCreator class implements a ClusterCreator for creating GaussianClusters by fitting a MultivariateGaussian to the given set of example vectors.

Since:
1.0
Author:
Justin Basilico
See Also:
Serialized Form

Field Summary
static double DEFAULT_COVARIANCE
          Default covariance, 1.0E-4
 
Constructor Summary
GaussianClusterCreator()
          Default constructor
GaussianClusterCreator(double defaultCovariance)
          Creates a new instance of GaussianClusterCreator
 
Method Summary
 GaussianCluster createCluster(Collection<Vector> members)
          Creates a GaussianCluster from a given set of vectors by fitting a Gaussian to those vectors.
 double getDefaultCovariance()
          Getter for defaultCovariance
 void setDefaultCovariance(double defaultCovariance)
          Setter for defaultCovariance
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Field Detail

DEFAULT_COVARIANCE

public static final double DEFAULT_COVARIANCE
Default covariance, 1.0E-4

See Also:
Constant Field Values
Constructor Detail

GaussianClusterCreator

public GaussianClusterCreator()
Default constructor


GaussianClusterCreator

public GaussianClusterCreator(double defaultCovariance)
Creates a new instance of GaussianClusterCreator

Parameters:
defaultCovariance - amount to add to the diagonals of the covariance matrix, typically on the order of 1e-4.
Method Detail

createCluster

public GaussianCluster createCluster(Collection<Vector> members)
Creates a GaussianCluster from a given set of vectors by fitting a Gaussian to those vectors.

Specified by:
createCluster in interface ClusterCreator<GaussianCluster,Vector>
Parameters:
members - The members for the new cluster.
Returns:
A new GaussianCluster generated by fitting the given members to a MultivariateGaussian.

getDefaultCovariance

public double getDefaultCovariance()
Getter for defaultCovariance

Returns:
amount to add to the diagonals of the covariance matrix, typically on the order of 1e-4.

setDefaultCovariance

public void setDefaultCovariance(double defaultCovariance)
Setter for defaultCovariance

Parameters:
defaultCovariance - amount to add to the diagonals of the covariance matrix, typically on the order of 1e-4.