gov.sandia.cognition.learning.algorithm.clustering.cluster
Class MedoidClusterCreator<DataType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.function.distance.DefaultDivergenceFunctionContainer<DataType,DataType>
          extended by gov.sandia.cognition.learning.algorithm.clustering.cluster.MedoidClusterCreator<DataType>
Type Parameters:
DataType - The algorithm operates on a Collection of DataType, so DataType will be something like Vector or String
All Implemented Interfaces:
ClusterCreator<CentroidCluster<DataType>,DataType>, DivergenceFunctionContainer<DataType,DataType>, CloneableSerializable, Serializable, Cloneable

@CodeReview(reviewer="Kevin R. Dixon",
            date="2008-07-22",
            changesNeeded=false,
            comments="Code generally looks fine.")
public class MedoidClusterCreator<DataType>
extends DefaultDivergenceFunctionContainer<DataType,DataType>
implements ClusterCreator<CentroidCluster<DataType>,DataType>

The MedoidClusterCreator class creates a CentroidCluster at the sample that minimizes the sum of the divergence to the objects assigned to the cluster.

Since:
2.0
Author:
Justin Basilico, Kevin R. Dixon
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.learning.function.distance.DefaultDivergenceFunctionContainer
divergenceFunction
 
Constructor Summary
MedoidClusterCreator()
          Creates a new instance of MedoidClusterCreator
MedoidClusterCreator(DivergenceFunction<? super DataType,? super DataType> divergenceFunction)
          Creates a new instance of MedoidClusterCreator
 
Method Summary
 CentroidCluster<DataType> createCluster(Collection<DataType> members)
          Creates a CentroidCluster at the member that minimizes the sum of divergence between all members
 
Methods inherited from class gov.sandia.cognition.learning.function.distance.DefaultDivergenceFunctionContainer
clone, getDivergenceFunction, setDivergenceFunction
 
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
 

Constructor Detail

MedoidClusterCreator

public MedoidClusterCreator()
Creates a new instance of MedoidClusterCreator


MedoidClusterCreator

public MedoidClusterCreator(DivergenceFunction<? super DataType,? super DataType> divergenceFunction)
Creates a new instance of MedoidClusterCreator

Parameters:
divergenceFunction - Divergence function used to evaluate the dissimilarity between two data points
Method Detail

createCluster

public CentroidCluster<DataType> createCluster(Collection<DataType> members)
Creates a CentroidCluster at the member that minimizes the sum of divergence between all members

Specified by:
createCluster in interface ClusterCreator<CentroidCluster<DataType>,DataType>
Parameters:
members - Data points that have been assigned to the cluster
Returns:
CentroidCluster that minimizes the sum of divergence between all assigned members