net.sourceforge.cilib.functions.clustering
Class ParametricClusteringFunction

java.lang.Object
  extended by net.sourceforge.cilib.functions.Function
      extended by net.sourceforge.cilib.functions.ContinuousFunction
          extended by net.sourceforge.cilib.functions.clustering.ClusteringFitnessFunction
              extended by net.sourceforge.cilib.functions.clustering.ParametricClusteringFunction
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
ParametricWithQuantisationErrorFunction

public class ParametricClusteringFunction
extends ClusteringFitnessFunction

This class makes use of the helper/member functions defined and implemented in ClusteringFitnessFunction to calculate a parameterised fitness of a particular clustering in the calculateFitness method. See:

Author:
Theuns Cloete
See Also:
Serialized Form

Field Summary
protected  ControlParameter w1
          Specifies the weight that influences how much the intra-cluster-distance will contribute to the final fitness.
protected  ControlParameter w2
          Specifies the weight that influences how much the inter-cluster-distance will contribute to the final fitness.
protected  double zMax
          Stores the calculated zMax value.
 
Fields inherited from class net.sourceforge.cilib.functions.clustering.ClusteringFitnessFunction
arrangedCentroids, arrangedClusters, clusterCenterStrategy, clustersFormed, helper
 
Constructor Summary
ParametricClusteringFunction()
           
 
Method Summary
 double calculateFitness()
           
 ParametricClusteringFunction getClone()
          Create a cloned copy of the current object and return it.
protected  double getW1()
          Get the weight that the intra-cluster-distance contributes to the final fitness.
protected  double getW2()
          Get the weight that determines how much influence inter-cluster-distance contributes to the final fitness.
 void setW1(ControlParameter w)
          Set the weight that influences how much the intra-cluster-distance will contribute to the final fitness.
 void setW2(ControlParameter w)
          Set the weight that influences how much the inter-cluster-distance will contribute to the final fitness.
 void updateControlParameters()
           
protected  double zMax()
          Calculate the maximum distance possible between two Vectors in the specified domain.
 
Methods inherited from class net.sourceforge.cilib.functions.clustering.ClusteringFitnessFunction
calculateAverageIntraClusterDistance, calculateAverageSetDistance, calculateClusterDiameter, calculateIntraClusterDistance, calculateMaximumAverageDistance, calculateMaximumInterClusterDistance, calculateMaximumSetDistance, calculateMinimumInterClusterDistance, calculateMinimumSetDistance, calculateQuantisationError, evaluate, getMaximum, getMinimum, setClusterCenterStrategy, validateFitness, worstFitness
 
Methods inherited from class net.sourceforge.cilib.functions.ContinuousFunction
evaluate
 
Methods inherited from class net.sourceforge.cilib.functions.Function
getBehavioralDomainRegistry, getDimension, getDomain, getDomainRegistry, setBehavioralDomain, setBehaviouralDomainRegistry, setDomain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

w1

protected ControlParameter w1
Specifies the weight that influences how much the intra-cluster-distance will contribute to the final fitness.


w2

protected ControlParameter w2
Specifies the weight that influences how much the inter-cluster-distance will contribute to the final fitness.


zMax

protected double zMax
Stores the calculated zMax value.

Constructor Detail

ParametricClusteringFunction

public ParametricClusteringFunction()
Method Detail

getClone

public ParametricClusteringFunction getClone()
Description copied from class: ContinuousFunction
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface Cloneable
Specified by:
getClone in class ClusteringFitnessFunction
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

calculateFitness

public double calculateFitness()
Specified by:
calculateFitness in class ClusteringFitnessFunction

setW1

public void setW1(ControlParameter w)
Set the weight that influences how much the intra-cluster-distance will contribute to the final fitness.

Parameters:
w - the ControlParameter that will control the w1 weight.

getW1

protected double getW1()
Get the weight that the intra-cluster-distance contributes to the final fitness.

Returns:
the weight that determines how much influence intra-cluster-distance contributes to the final fitness.

setW2

public void setW2(ControlParameter w)
Set the weight that influences how much the inter-cluster-distance will contribute to the final fitness.

Parameters:
w - the ControlParameter that will control the w2 weight.

getW2

protected double getW2()
Get the weight that determines how much influence inter-cluster-distance contributes to the final fitness.

Returns:
the weight that determines how much influence intra-cluster-distance contributes to the final fitness.

zMax

protected double zMax()
Calculate the maximum distance possible between two Vectors in the specified domain. In other words, calculate the distance between two Vectors; where all the elements in the first Vector is set to that element's upper bound and all the elements in the second Vector is set to that element's lower bound.

Returns:
the maximum distance possible between two Vectors for the specified domain.

updateControlParameters

public void updateControlParameters()


Copyright © 2009 CIRG. All Rights Reserved.