DataType - Type of data to compute the distortion overClusterType - Type of clusters to use@PublicationReference(author="Christopher M. Bishop", title="Pattern Recognition and Machine Learning", type=Book, year=2006, pages={424,428}, notes="Section 9.1", url="http://research.microsoft.com/~cmbishop/PRML/") public class ClusterDistortionMeasure<DataType,ClusterType extends Cluster<DataType>> extends AbstractCloneableSerializable implements CostFunction<java.util.Collection<? extends ClusterType>,ClusterDivergenceFunction<? super ClusterType,? super DataType>>
ClusterDivergenceFunction, 
Serialized Form| Constructor and Description | 
|---|
ClusterDistortionMeasure()
Creates a new instance of ClusterDistortionMeasure 
 | 
ClusterDistortionMeasure(ClusterDivergenceFunction<ClusterType,DataType> costParameters)
Creates a new instance of ClusterDistortionMeasure 
 | 
| Modifier and Type | Method and Description | 
|---|---|
ClusterDistortionMeasure<DataType,ClusterType> | 
clone()
This makes public the clone method on the  
Object class and 
 removes the exception that it throws. | 
java.lang.Double | 
evaluate(ClusterType cluster)
Evaluates the distortion for a single cluster 
 | 
java.lang.Double | 
evaluate(java.util.Collection<? extends ClusterType> target)
Computes the cost of the given target. 
 | 
ClusterDivergenceFunction<? super ClusterType,? super DataType> | 
getCostParameters()
Gets the parameters of the cost function. 
 | 
void | 
setCostParameters(ClusterDivergenceFunction<? super ClusterType,? super DataType> costParameters)
Sets the parameters of the cost function used to evaluate the cost of
 a target. 
 | 
public ClusterDistortionMeasure()
public ClusterDistortionMeasure(ClusterDivergenceFunction<ClusterType,DataType> costParameters)
costParameters - Divergence function that defines the cost functionpublic ClusterDistortionMeasure<DataType,ClusterType> clone()
AbstractCloneableSerializableObject 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.clone in interface CostFunction<java.util.Collection<? extends ClusterType extends Cluster<DataType>>,ClusterDivergenceFunction<? super ClusterType extends Cluster<DataType>,? super DataType>>clone in interface CloneableSerializableclone in class AbstractCloneableSerializablepublic java.lang.Double evaluate(java.util.Collection<? extends ClusterType> target)
CostFunctionevaluate in interface Evaluator<java.util.Collection<? extends ClusterType extends Cluster<DataType>>,java.lang.Double>evaluate in interface CostFunction<java.util.Collection<? extends ClusterType extends Cluster<DataType>>,ClusterDivergenceFunction<? super ClusterType extends Cluster<DataType>,? super DataType>>target - The object to evaluate.public java.lang.Double evaluate(ClusterType cluster)
cluster - Cluster to considerpublic ClusterDivergenceFunction<? super ClusterType,? super DataType> getCostParameters()
CostFunctiongetCostParameters in interface CostFunction<java.util.Collection<? extends ClusterType extends Cluster<DataType>>,ClusterDivergenceFunction<? super ClusterType extends Cluster<DataType>,? super DataType>>public void setCostParameters(ClusterDivergenceFunction<? super ClusterType,? super DataType> costParameters)
CostFunctionsetCostParameters in interface CostFunction<java.util.Collection<? extends ClusterType extends Cluster<DataType>>,ClusterDivergenceFunction<? super ClusterType extends Cluster<DataType>,? super DataType>>costParameters - The parameters of the cost function.