Package org.apache.mahout.clustering

Examples of org.apache.mahout.clustering.KMeansClusteringPolicy


    ClusterClassifier prior = new ClusterClassifier(initialClusters);
    Path priorClassifier = new Path(output, "clusters-0");
    writeClassifier(prior, conf, priorClassifier);
   
    int maxIter = 10;
    ClusteringPolicy policy = new KMeansClusteringPolicy();
    new ClusterIterator(policy).iterateSeq(samples, priorClassifier, output, maxIter);
    for (int i = 1; i <= maxIter; i++) {
      ClusterClassifier posterior = readClassifier(conf, new Path(output, "classifier-" + i));
      CLUSTERS.add(posterior.getModels());
    }
View Full Code Here


    ClusterClassifier prior = new ClusterClassifier(initialClusters);
    Path priorClassifier = new Path(output, "clusters-0");
    writeClassifier(prior, conf, priorClassifier);
   
    int maxIter = 10;
    ClusteringPolicy policy = new KMeansClusteringPolicy();
    new ClusterIterator(policy).iterate(samples, priorClassifier, output, maxIter);
    for (int i = 1; i <= maxIter; i++) {
      ClusterClassifier posterior = readClassifier(conf, new Path(output, "classifier-" + i));
      CLUSTERS.add(posterior.getModels());
    }
View Full Code Here

TOP

Related Classes of org.apache.mahout.clustering.KMeansClusteringPolicy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.