Package org.apache.mahout.clustering.dirichlet

Examples of org.apache.mahout.clustering.dirichlet.DirichletClusterer


    List<VectorWritable> points = new ArrayList<VectorWritable>();
    for (Vector sd : sampleData) {
      points.add(new VectorWritable(sd));
    }

    DirichletClusterer dc = new DirichletClusterer(points,
        new GaussianClusterDistribution(new VectorWritable(
            new DenseVector(2))), 1.0, 10, 2, 2);
    List<Cluster[]> result = dc.cluster(20);
    for (Cluster cluster : result.get(result.size() - 1)) {
      System.out.println("Cluster id: " + cluster.getId() + " center: "
          + cluster.getCenter().asFormatString());
    }
  }
View Full Code Here


                                        int numClusters,
                                        int numIterations,
                                        double alpha0,
                                        int thin,
                                        int burnin) {
    DirichletClusterer dc = new DirichletClusterer(SAMPLE_DATA, modelDist, alpha0, numClusters, thin, burnin);
    List<Cluster[]> result = dc.cluster(numIterations);
    printModels(result, burnin);
    for (Cluster[] models : result) {
      List<Cluster> clusters = new ArrayList<Cluster>();
      for (Cluster cluster : models) {
        if (isSignificant(cluster)) {
View Full Code Here

                                                      int numClusters,
                                                      int numIterations,
                                                      double alpha0,
                                                      int thin,
                                                      int burnin) {
    DirichletClusterer dc = new DirichletClusterer(SAMPLE_DATA, modelDist, alpha0, numClusters, thin, burnin);
    List<Cluster[]> result = dc.cluster(numIterations);
    printModels(result, burnin);
    for (Cluster[] models : result) {
      List<Cluster> clusters = Lists.newArrayList();
      for (Cluster cluster : models) {
        if (isSignificant(cluster)) {
View Full Code Here

                                                      int numClusters,
                                                      int numIterations,
                                                      double alpha0,
                                                      int thin,
                                                      int burnin) {
    DirichletClusterer dc = new DirichletClusterer(SAMPLE_DATA, modelDist, alpha0, numClusters, thin, burnin);
    List<Cluster[]> result = dc.cluster(numIterations);
    printModels(result, burnin);
    for (Cluster[] models : result) {
      List<Cluster> clusters = new ArrayList<Cluster>();
      for (Cluster cluster : models) {
        if (isSignificant(cluster)) {
View Full Code Here

TOP

Related Classes of org.apache.mahout.clustering.dirichlet.DirichletClusterer

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.