Examples of intraClusterDensity()


Examples of org.apache.mahout.clustering.evaluation.ClusterEvaluator.intraClusterDensity()

    int numIterations = 10;
    Path clustersIn = new Path(output, "clusters-2");
    RepresentativePointsDriver.run(conf, clustersIn, new Path(output, "clusteredPoints"), output, measure, numIterations, true);
    ClusterEvaluator evaluator = new ClusterEvaluator(conf, clustersIn);
    // now print out the Results
    System.out.println("Intra-cluster density = " + evaluator.intraClusterDensity());
    System.out.println("Inter-cluster density = " + evaluator.interClusterDensity());
    printRepPoints(numIterations);
  }

  @Test
View Full Code Here

Examples of org.apache.mahout.clustering.evaluation.ClusterEvaluator.intraClusterDensity()

    int numIterations = 10;
    Path clustersIn = new Path(output, "clusters-4");
    RepresentativePointsDriver.run(conf, clustersIn, new Path(output, "clusteredPoints"), output, measure, numIterations, true);
    ClusterEvaluator evaluator = new ClusterEvaluator(conf, clustersIn);
    // now print out the Results
    System.out.println("Intra-cluster density = " + evaluator.intraClusterDensity());
    System.out.println("Inter-cluster density = " + evaluator.interClusterDensity());
    printRepPoints(numIterations);
  }

  @Test
View Full Code Here

Examples of org.apache.mahout.clustering.evaluation.ClusterEvaluator.intraClusterDensity()

    int numIterations = 10;
    Path clustersIn = new Path(output, "clusters-10");
    RepresentativePointsDriver.run(conf, clustersIn, new Path(output, "clusteredPoints"), output, measure, numIterations, true);
    ClusterEvaluator evaluator = new ClusterEvaluator(conf, clustersIn);
    // now print out the Results
    System.out.println("Intra-cluster density = " + evaluator.intraClusterDensity());
    System.out.println("Inter-cluster density = " + evaluator.interClusterDensity());
    printRepPoints(numIterations);
  }

  @Test
View Full Code Here

Examples of org.apache.mahout.clustering.evaluation.ClusterEvaluator.intraClusterDensity()

                                   new EuclideanDistanceMeasure(),
                                   numIterations,
                                   true);
    ClusterEvaluator evaluator = new ClusterEvaluator(conf, clustersIn);
    // now print out the Results
    System.out.println("Intra-cluster density = " + evaluator.intraClusterDensity());
    System.out.println("Inter-cluster density = " + evaluator.interClusterDensity());
    printRepPoints(numIterations);
  }

}
View Full Code Here

Examples of org.apache.mahout.clustering.evaluation.ClusterEvaluator.intraClusterDensity()

        conf.set(RepresentativePointsDriver.DISTANCE_MEASURE_KEY, measure.getClass().getName());
        conf.set(RepresentativePointsDriver.STATE_IN_KEY, "tmp/representative/representativePoints-" + numIters);
        ClusterEvaluator ce = new ClusterEvaluator(conf, seqFileDir);
        writer.append("\n");
        writer.append("Inter-Cluster Density: ").append(String.valueOf(ce.interClusterDensity())).append("\n");
        writer.append("Intra-Cluster Density: ").append(String.valueOf(ce.intraClusterDensity())).append("\n");
        CDbwEvaluator cdbw = new CDbwEvaluator(conf, seqFileDir);
        writer.append("CDbw Inter-Cluster Density: ").append(String.valueOf(cdbw.interClusterDensity())).append("\n");
        writer.append("CDbw Intra-Cluster Density: ").append(String.valueOf(cdbw.intraClusterDensity())).append("\n");
        writer.append("CDbw Separation: ").append(String.valueOf(cdbw.separation())).append("\n");
        writer.flush();
View Full Code Here

Examples of org.apache.mahout.clustering.evaluation.ClusterEvaluator.intraClusterDensity()

    ClusterEvaluator evaluatorSeq = new ClusterEvaluator(conf, clustersIn);
    // compare results
    assertEquals("InterCluster Density", evaluatorMR.interClusterDensity(),
        evaluatorSeq.interClusterDensity(), EPSILON);
    assertEquals("IntraCluster Density", evaluatorMR.intraClusterDensity(),
        evaluatorSeq.intraClusterDensity(), EPSILON);
  }
 
  @Test
  public void testCluster0() throws IOException {
    ClusteringTestUtils.writePointsToFile(referenceData, new Path(testdata,
View Full Code Here

Examples of org.apache.mahout.clustering.evaluation.ClusterEvaluator.intraClusterDensity()

    ClusterEvaluator evaluator = new ClusterEvaluator(representativePoints,
        clusters, measure);
    assertEquals("inter cluster density", 0.33333333333333315,
        evaluator.interClusterDensity(), EPSILON);
    assertEquals("intra cluster density", 0.3656854249492381,
        evaluator.intraClusterDensity(), EPSILON);
  }
 
  @Test
  public void testCluster1() throws IOException {
    ClusteringTestUtils.writePointsToFile(referenceData, new Path(testdata,
View Full Code Here

Examples of org.apache.mahout.clustering.evaluation.ClusterEvaluator.intraClusterDensity()

    ClusterEvaluator evaluator = new ClusterEvaluator(representativePoints,
        clusters, measure);
    assertEquals("inter cluster density", 0.33333333333333315,
        evaluator.interClusterDensity(), EPSILON);
    assertEquals("intra cluster density", 0.3656854249492381,
        evaluator.intraClusterDensity(), EPSILON);
  }
 
  @Test
  public void testCluster2() throws IOException {
    ClusteringTestUtils.writePointsToFile(referenceData, new Path(testdata,
View Full Code Here

Examples of org.apache.mahout.clustering.evaluation.ClusterEvaluator.intraClusterDensity()

    ClusterEvaluator evaluator = new ClusterEvaluator(representativePoints,
        clusters, measure);
    assertEquals("inter cluster density", 0.33333333333333315,
        evaluator.interClusterDensity(), EPSILON);
    assertEquals("intra cluster density", 0.3656854249492381,
        evaluator.intraClusterDensity(), EPSILON);
  }
 
  @Test
  public void testEmptyCluster() throws IOException {
    ClusteringTestUtils.writePointsToFile(referenceData, new Path(testdata,
View Full Code Here

Examples of org.apache.mahout.clustering.evaluation.ClusterEvaluator.intraClusterDensity()

    ClusterEvaluator evaluator = new ClusterEvaluator(representativePoints,
        clusters, measure);
    assertEquals("inter cluster density", 0.33333333333333315,
        evaluator.interClusterDensity(), EPSILON);
    assertEquals("intra cluster density", 0.3656854249492381,
        evaluator.intraClusterDensity(), EPSILON);
  }
 
  @Test
  public void testSingleValueCluster() throws IOException {
    ClusteringTestUtils.writePointsToFile(referenceData, new Path(testdata,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.