public class Kluster extends DistanceMeasureCluster
Parametered.ParameteredGeneralizationsCLUSTERS_DIR, FINAL_ITERATION_SUFFIX, INITIAL_CLUSTERS_DIRlog| Constructor and Description |
|---|
Kluster()
For (de)serialization as a Writable
|
Kluster(Vector center,
int clusterId,
DistanceMeasure measure)
Construct a new cluster with the given point as its center
|
| Modifier and Type | Method and Description |
|---|---|
String |
asFormatString() |
boolean |
calculateConvergence(double convergenceDelta) |
boolean |
computeConvergence(DistanceMeasure measure,
double convergenceDelta)
Return if the cluster is converged by comparing its center and centroid.
|
static String |
formatCluster(Kluster cluster)
Format the cluster for output
|
String |
getIdentifier() |
boolean |
isConverged() |
void |
readFields(DataInput in) |
protected void |
setConverged(boolean converged) |
String |
toString() |
void |
write(DataOutput out) |
configure, getMeasure, pdf, sampleFromPosterior, setMeasureasFormatString, asJson, computeCentroid, computeParameters, createParameters, formatVector, formatVectorAsJson, getCenter, getId, getNumObservations, getParameters, getRadius, getS0, getS1, getS2, getTotalObservations, observe, observe, observe, observe, observe, setCenter, setId, setNumObservations, setRadius, setS0, setS1, setS2, setTotalObservationspublic Kluster()
public Kluster(Vector center, int clusterId, DistanceMeasure measure)
center - the Vector centerclusterId - the int cluster idmeasure - a DistanceMeasurepublic static String formatCluster(Kluster cluster)
cluster - the Clusterpublic String asFormatString()
public void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.Writablewrite in class DistanceMeasureClusterIOExceptionpublic void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritablereadFields in class DistanceMeasureClusterIOExceptionpublic String getIdentifier()
getIdentifier in class DistanceMeasureClusterpublic boolean computeConvergence(DistanceMeasure measure, double convergenceDelta)
measure - The distance measure to use for cluster-point comparisons.convergenceDelta - the convergence delta to use for stopping.public boolean isConverged()
isConverged in interface ClusterisConverged in class AbstractClusterprotected void setConverged(boolean converged)
public boolean calculateConvergence(double convergenceDelta)
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.