Example usage for org.apache.mahout.clustering.fuzzykmeans FuzzyKMeansDriver run

List of usage examples for org.apache.mahout.clustering.fuzzykmeans FuzzyKMeansDriver run

Introduction

In this page you can find the example usage for org.apache.mahout.clustering.fuzzykmeans FuzzyKMeansDriver run.

Prototype

public static void run(Configuration conf, Path input, Path clustersIn, Path output, double convergenceDelta,
        int maxIterations, float m, boolean runClustering, boolean emitMostLikely, double threshold,
        boolean runSequential) throws IOException, ClassNotFoundException, InterruptedException 

Source Link

Document

Iterate over the input vectors to produce clusters and, if requested, use the results of the final iteration to cluster the input vectors.

Usage

From source file:io.github.thushear.display.DisplayFuzzyKMeans.java

License:Apache License

private static void runSequentialFuzzyKClusterer(Configuration conf, Path samples, Path output,
        DistanceMeasure measure, int maxIterations)
        throws IOException, ClassNotFoundException, InterruptedException {
    Path clusters = RandomSeedGenerator.buildRandom(conf, samples, new Path(output, "clusters-0"), 3, measure);
    double threshold = 0.001;
    int m = 3;//from   www.j  a  v a2 s. c o m
    FuzzyKMeansDriver.run(samples, clusters, output, measure, threshold, maxIterations, m, true, true,
            threshold, true);

    loadClusters(output);
}