Example usage for weka.clusterers FarthestFirst getClusterCentroids

List of usage examples for weka.clusterers FarthestFirst getClusterCentroids

Introduction

In this page you can find the example usage for weka.clusterers FarthestFirst getClusterCentroids.

Prototype

public Instances getClusterCentroids() 

Source Link

Document

Get the centroids found by FarthestFirst

Usage

From source file:clusterer.SimpleKMeansWithSilhouette.java

License:Open Source License

/**
 * Initialize with the fartherst first centers
 * /*  w  ww .  jav a 2s.  c  o  m*/
 * @param data the training data
 * @throws Exception if a problem occurs
 */
protected void farthestFirstInit(Instances data) throws Exception {
    FarthestFirst ff = new FarthestFirst();
    ff.setNumClusters(m_NumClusters);
    ff.buildClusterer(data);

    m_ClusterCentroids = ff.getClusterCentroids();
}