Package org.apache.mahout.clustering

Examples of org.apache.mahout.clustering.ClusteringPolicy


    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, "classifier-0");
    writeClassifier(prior, conf, priorClassifier);
   
    ClusteringPolicy policy = new FuzzyKMeansClusteringPolicy();
    new ClusterIterator(policy).iterateSeq(samples, priorClassifier, output, maxIterations);
    for (int i = 1; i <= maxIterations; i++) {
      ClusterClassifier posterior = readClassifier(conf, new Path(output, "classifier-" + i));
      CLUSTERS.add(posterior.getModels());
    }
View Full Code Here

    Path output = new Path("output");
    Path priorClassifier = new Path(output, "clusters-0");
    Configuration conf = new Configuration();
    writeClassifier(prior, conf, priorClassifier);
   
    ClusteringPolicy policy = new DirichletClusteringPolicy(numClusters, numIterations);
    new ClusterIterator(policy).iterateSeq(samples, priorClassifier, output, numIterations);
    for (int i = 1; i <= numIterations; i++) {
      ClusterClassifier posterior = readClassifier(conf, new Path(output, "classifier-" + i));
      List<Cluster> clusters = Lists.newArrayList();
      for (Cluster cluster : posterior.getModels()) {
View Full Code Here

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

    Path output = new Path("output");
    Path priorClassifier = new Path(output, "clusters-0");
    Configuration conf = new Configuration();
    writeClassifier(prior, conf, priorClassifier);
   
    ClusteringPolicy policy = new DirichletClusteringPolicy(numClusters, numIterations);
    new ClusterIterator(policy).iterate(samples, priorClassifier, output, numIterations);
    for (int i = 1; i <= numIterations; i++) {
      ClusterClassifier posterior = readClassifier(conf, new Path(output, "classifier-" + i));
      List<Cluster> clusters = new ArrayList<Cluster>();   
      for (Cluster cluster : 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.ClusteringPolicy

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.