Package org.apache.mahout.clustering.dirichlet.models

Examples of org.apache.mahout.clustering.dirichlet.models.GaussianClusterDistribution


    }
  }
 
  public static void main(String[] args) throws Exception {
    VectorWritable modelPrototype = new VectorWritable(new DenseVector(2));
    ModelDistribution<VectorWritable> modelDist = new GaussianClusterDistribution(modelPrototype);
    RandomUtils.useTestSeed();
    generateSamples();
    int numIterations = 20;
    int numClusters = 10;
    int alpha0 = 1;
View Full Code Here


    generateSamples(40, 1, 1, 3);
    generateSamples(30, 1, 0, 0.1);
    generateSamples(30, 0, 1, 0.1);

    DirichletClusterer dc = new DirichletClusterer(sampleData,
                                                   new GaussianClusterDistribution(new VectorWritable(new DenseVector(2))),
                                                   1.0,
                                                   10,
                                                   1,
                                                   0);
    List<Cluster[]> result = dc.cluster(30);
View Full Code Here

    } else {
      log.info("Running with default arguments");
      Path output = new Path("output");
      HadoopUtil.overwriteOutput(output);
      ModelDistribution<VectorWritable> modelDistribution =
          new GaussianClusterDistribution(new VectorWritable(new RandomAccessSparseVector(60)));
      new Job().run(new Path("testdata"), output, modelDistribution, 10, 5, 1.0, true, 0);
    }
  }
View Full Code Here

  @Test
  public void testDocs() throws Exception {
    getSampleData(DOCS);
    DirichletClusterer dc =
        new DirichletClusterer(sampleData, new GaussianClusterDistribution(sampleData.get(0)), 1.0, 15, 1, 0);
    List<Cluster[]> result = dc.cluster(10);
    assertNotNull(result);
    printSamples(result, 0);
    printClusters(result.get(result.size() - 1), sampleData, DOCS);
  }
View Full Code Here

  @Test
  public void testDocs2() throws Exception {
    getSampleData(DOCS2);
    DirichletClusterer dc =
        new DirichletClusterer(sampleData, new GaussianClusterDistribution(sampleData.get(0)), 1.0, 15, 1, 0);
    List<Cluster[]> result = dc.cluster(10);
    assertNotNull(result);
    printSamples(result, 0);
    printClusters(result.get(result.size() - 1), sampleData, DOCS2);
  }
View Full Code Here

        true, 0, true);
  }
 
  public static void main(String[] args) throws Exception {
    VectorWritable modelPrototype = new VectorWritable(new DenseVector(2));
    ModelDistribution<VectorWritable> modelDist = new GaussianClusterDistribution(modelPrototype);
    Configuration conf = new Configuration();
    Path output = new Path("output");
    HadoopUtil.delete(conf, output);
    Path samples = new Path("samples");
    HadoopUtil.delete(conf, samples);
View Full Code Here

    }
  }
 
  public static void main(String[] args) throws Exception {
    VectorWritable modelPrototype = new VectorWritable(new DenseVector(2));
    ModelDistribution<VectorWritable> modelDist = new GaussianClusterDistribution(modelPrototype);
    RandomUtils.useTestSeed();
    generateSamples();
    int numIterations = 20;
    int numClusters = 10;
    int alpha0 = 1;
View Full Code Here

  @Test
  public void testDocs2() throws Exception {
    getSampleData(DOCS2);
    DirichletClusterer dc =
        new DirichletClusterer(sampleData, new GaussianClusterDistribution(sampleData.get(0)), 1.0, 15, 1, 0);
    List<Cluster[]> result = dc.cluster(10);
    assertNotNull(result);
    printSamples(result, 0);
    printClusters(result.get(result.size() - 1), sampleData, DOCS2);
  }
View Full Code Here

  @Test
  public void testDocs() throws Exception {
    getSampleData(DOCS);
    DirichletClusterer dc =
        new DirichletClusterer(sampleData, new GaussianClusterDistribution(sampleData.get(0)), 1.0, 15, 1, 0);
    List<Cluster[]> result = dc.cluster(10);
    assertNotNull(result);
    printSamples(result, 0);
    printClusters(result.get(result.size() - 1), sampleData, DOCS);
  }
View Full Code Here

    generateSamples(40, 1, 1, 3);
    generateSamples(30, 1, 0, 0.1);
    generateSamples(30, 0, 1, 0.1);

    DirichletClusterer dc = new DirichletClusterer(sampleData,
                                                   new GaussianClusterDistribution(new VectorWritable(new DenseVector(2))),
                                                   1.0,
                                                   10,
                                                   1,
                                                   0);
    List<Cluster[]> result = dc.cluster(30);
View Full Code Here

TOP

Related Classes of org.apache.mahout.clustering.dirichlet.models.GaussianClusterDistribution

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.