gov.sandia.cognition.learning.algorithm.clustering.divergence
Class GaussianClusterDivergenceFunction

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.clustering.divergence.GaussianClusterDivergenceFunction
All Implemented Interfaces:
ClusterDivergenceFunction<GaussianCluster,Vector>, DivergenceFunction<GaussianCluster,Vector>, CloneableSerializable, Serializable, Cloneable

@CodeReview(reviewer="Kevin R. Dixon",
            date="2008-07-23",
            changesNeeded=false,
            comments="Looks fine.")
public class GaussianClusterDivergenceFunction
extends AbstractCloneableSerializable
implements ClusterDivergenceFunction<GaussianCluster,Vector>

The GaussianClusterDivergenceFunction class implements a divergence function between a Gaussian cluster and a vector, which is calculated by finding the likelihood that the vector was generated from that Gaussian and then returning the negative of the likelihood since it is a divergence measure, not a similarity measure.

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

Field Summary
static GaussianClusterDivergenceFunction INSTANCE
          An instance of the class since it has no internal data.
 
Constructor Summary
GaussianClusterDivergenceFunction()
          Creates a new instance of GaussianClusterDivergenceFunction.
 
Method Summary
 double evaluate(GaussianCluster first, Vector second)
          Evaluates the divergence between the Gaussian cluster and the given vector, which is the negative of likelihood that the cluster was generated.
 
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

INSTANCE

public static final GaussianClusterDivergenceFunction INSTANCE
An instance of the class since it has no internal data.

Constructor Detail

GaussianClusterDivergenceFunction

public GaussianClusterDivergenceFunction()
Creates a new instance of GaussianClusterDivergenceFunction.

Method Detail

evaluate

public double evaluate(GaussianCluster first,
                       Vector second)
Evaluates the divergence between the Gaussian cluster and the given vector, which is the negative of likelihood that the cluster was generated.

Specified by:
evaluate in interface DivergenceFunction<GaussianCluster,Vector>
Parameters:
first - The Gaussian cluster.
second - The vector to calculate the divergence to
Returns:
The divergence between the cluster and vector.