|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hermit.geometry.cluster.Clusterer
org.hermit.geometry.cluster.FuzzyClusterer
public class FuzzyClusterer
An implementation of Lloyd's k-clusterMeans clustering algorithm.
Constructor Summary | |
---|---|
FuzzyClusterer()
|
Method Summary | |
---|---|
boolean |
iterate()
Runs a single iteration of the clustering algorithm on the stored data. |
double |
metric()
Calculate a quality metric for the current clustering solution. |
void |
prepare(Point[] points,
int[] ids,
double[][] means,
Region region)
Prepare a clustering pass on the indicated data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FuzzyClusterer()
Method Detail |
---|
public void prepare(Point[] points, int[] ids, double[][] means, Region region)
prepare
in class Clusterer
points
- The array of dataPoints to be clustered.ids
- Array of cluster numbers which this call will
fill in, defining which cluster each point
belongs to. The caller must leave the data here
intact between iterations.means
- Array of x,y values in which to place centroids
of the clusters.region
- The region of the plane in which the points lie.public boolean iterate()
prepare(Point[], int[], double[][], Region)
.
After each iteration, the cluster IDs and cluster means should be consistent with each other.
iterate
in class Clusterer
public double metric()
iterate()
.
metric
in class Clusterer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |