|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mahout.clustering.fuzzykmeans.FuzzyKMeansClusterer
public class FuzzyKMeansClusterer
| Constructor Summary | |
|---|---|
FuzzyKMeansClusterer()
|
|
FuzzyKMeansClusterer(org.apache.hadoop.conf.Configuration conf)
|
|
FuzzyKMeansClusterer(DistanceMeasure measure,
double convergenceDelta,
double m)
Init the fuzzy k-means clusterer with the distance measure to use for comparison. |
|
| Method Summary | |
|---|---|
protected void |
addPointToClusters(List<SoftCluster> clusterList,
Vector point)
|
static List<List<SoftCluster>> |
clusterPoints(Iterable<Vector> points,
List<SoftCluster> clusters,
DistanceMeasure measure,
double threshold,
double m,
int numIter)
This is the reference k-means implementation. |
boolean |
computeConvergence(Cluster cluster)
Return if the cluster is converged by comparing its center and centroid. |
Vector |
computePi(Collection<SoftCluster> clusters,
List<Double> clusterDistanceList)
|
double |
computeProbWeight(double clusterDistance,
Iterable<Double> clusterDistanceList)
Computes the probability of a point belonging to a cluster |
void |
emitPointProbToCluster(Vector point,
List<SoftCluster> clusters,
org.apache.hadoop.mapreduce.Mapper.Context context)
Emit the point and its probability of belongingness to each cluster |
void |
emitPointToClusters(VectorWritable point,
List<SoftCluster> clusters,
org.apache.hadoop.mapreduce.Mapper.Context context)
|
void |
emitPointToClusters(VectorWritable point,
List<SoftCluster> clusters,
org.apache.hadoop.io.SequenceFile.Writer writer)
|
double |
getM()
|
DistanceMeasure |
getMeasure()
|
protected static boolean |
runFuzzyKMeansIteration(Iterable<Vector> points,
List<SoftCluster> clusterList,
FuzzyKMeansClusterer clusterer)
Perform a single iteration over the points and clusters, assigning points to clusters and returning if the iterations are completed. |
protected boolean |
testConvergence(Iterable<SoftCluster> clusters)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FuzzyKMeansClusterer(DistanceMeasure measure,
double convergenceDelta,
double m)
public FuzzyKMeansClusterer(org.apache.hadoop.conf.Configuration conf)
public FuzzyKMeansClusterer()
| Method Detail |
|---|
public static List<List<SoftCluster>> clusterPoints(Iterable<Vector> points,
List<SoftCluster> clusters,
DistanceMeasure measure,
double threshold,
double m,
int numIter)
points - the input Listclusters - the initial Listmeasure - the DistanceMeasure to usethreshold - the double convergence thresholdm - the double "fuzzyness" argument (>1)numIter - the maximum number of iterations
protected static boolean runFuzzyKMeansIteration(Iterable<Vector> points,
List<SoftCluster> clusterList,
FuzzyKMeansClusterer clusterer)
points - the ListclusterList - the List
public void emitPointProbToCluster(Vector point,
List<SoftCluster> clusters,
org.apache.hadoop.mapreduce.Mapper.Context context)
throws IOException,
InterruptedException
point - a pointclusters - a Listcontext - the Context to emit into
IOException
InterruptedException
public double computeProbWeight(double clusterDistance,
Iterable<Double> clusterDistanceList)
public boolean computeConvergence(Cluster cluster)
public double getM()
public DistanceMeasure getMeasure()
public void emitPointToClusters(VectorWritable point,
List<SoftCluster> clusters,
org.apache.hadoop.mapreduce.Mapper.Context context)
throws IOException,
InterruptedException
IOException
InterruptedException
public Vector computePi(Collection<SoftCluster> clusters,
List<Double> clusterDistanceList)
protected void addPointToClusters(List<SoftCluster> clusterList,
Vector point)
protected boolean testConvergence(Iterable<SoftCluster> clusters)
public void emitPointToClusters(VectorWritable point,
List<SoftCluster> clusters,
org.apache.hadoop.io.SequenceFile.Writer writer)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||