net.sourceforge.cilib.clustering.kmeans
Class DataSetBasedCentroidsInitialisationStrategy

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

public class DataSetBasedCentroidsInitialisationStrategy
extends Object
implements CentroidsInitialisationStrategy

This strategy initializes the parts of the returned centroids Vector from randomly chosen patterns in the dataset.

Author:
Theuns Cloete
See Also:
Serialized Form

Constructor Summary
DataSetBasedCentroidsInitialisationStrategy()
          Create a new instance of DataSetBasedCentroidsInitialisationStrategy.
 
Method Summary
 DataSetBasedCentroidsInitialisationStrategy 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 from randomly chosen patterns in the given dataset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSetBasedCentroidsInitialisationStrategy

public DataSetBasedCentroidsInitialisationStrategy()
Create a new instance of DataSetBasedCentroidsInitialisationStrategy.

Method Detail

getClone

public DataSetBasedCentroidsInitialisationStrategy 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 from randomly chosen patterns in the given dataset.

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.