public interface CriterionFunction
DirecClustering. Each criteria
method tries to maximize of minimize some objective function that measures
inter cluster similarity and/or intra cluster similarity. Before calling
update, setup
must be called, which is reponsible for creating any Matrix specific
meta data.| Modifier and Type | Method and Description |
|---|---|
int[] |
assignments()
Returns the cluster assignment indices for each data point in the
original matrix passed to {@link #setup(Matrix, int[] int) setup).
|
DoubleVector[] |
centroids()
Returns the final set of centroids computed for the dataset passed to
setup. |
int[] |
clusterSizes()
Returns the number of data points assigned to each cluster.
|
boolean |
isMaximize()
Returns true if this
CriterionFunction tries to maximize it's
score, and false otherwise. |
double |
score()
Returns the score computed by this
CriterionFunction. |
void |
setup(Matrix m,
int[] initialAssignments,
int numClusters)
Creates the cluster centroids and any other meta data needed by this
CriterionFunction. |
boolean |
update(int currentVectorIndex)
Updates the clustering assignment for data point indexed by
currentVectorIndex. |
void setup(Matrix m, int[] initialAssignments, int numClusters)
CriterionFunction.m - The Matrix holding data points. This will be used as
read only.initialAssignments - The cluster assignments for each data point in
m. This is used as read only and discarded.numClustesr - The number of clusters to create.boolean update(int currentVectorIndex)
currentVectorIndex. This returns true if the data point is left
in the same cluster and false if it was relocated to another data point.int[] assignments()
DoubleVector[] centroids()
setup.int[] clusterSizes()
double score()
CriterionFunction.boolean isMaximize()
CriterionFunction tries to maximize it's
score, and false otherwise.Copyright © 2012. All Rights Reserved.