net.sourceforge.cilib.clustering.kmeans
Class RandomCentroidsInitialisationStrategy

java.lang.Object
  extended by net.sourceforge.cilib.clustering.kmeans.RandomCentroidsInitialisationStrategy
All Implemented Interfaces:
Serializable, CentroidsInitialisationStrategy, Cloneable

public class RandomCentroidsInitialisationStrategy
extends Object
implements CentroidsInitialisationStrategy

This strategy initializes the centroids of a clustering to random positions in the search space.

Author:
Theuns Cloete
See Also:
Serialized Form

Constructor Summary
RandomCentroidsInitialisationStrategy()
           
 
Method Summary
 RandomCentroidsInitialisationStrategy getClone()
          Create a cloned copy of the current object and return it.
 Vector initialise(ClusteringProblem problem, ClusterableDataSet dataset)
          Initialize the centroid vectors for a clustering to random positions in the search space.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomCentroidsInitialisationStrategy

public RandomCentroidsInitialisationStrategy()
Method Detail

getClone

public RandomCentroidsInitialisationStrategy getClone()
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
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

initialise

public Vector initialise(ClusteringProblem problem,
                         ClusterableDataSet dataset)
Initialize the centroid vectors for a clustering to random positions in the search space. The built-representation of the domain of the given problem is used to build a Vector that will house the centroids.

Specified by:
initialise in interface CentroidsInitialisationStrategy
Parameters:
problem - the ClusteringProblem currently being optimized
dataset - the ClusterableDataSet currently being clustered
Returns:
a Vector that represents all the centroids


Copyright © 2009 CIRG. All Rights Reserved.