Package cc.mallet.cluster

Examples of cc.mallet.cluster.GreedyAgglomerativeByDensity


    InfoGain ig = new InfoGain(trainList);
    ig.print();

//     Clusterer clusterer = new GreedyAgglomerative(training.getInstances().getPipe(),
//                                                   eval, 0.5);
    Clusterer clusterer = new GreedyAgglomerativeByDensity(training.getInstances().getPipe(),
                                                           eval, 0.5, false,
                                                           new java.util.Random(1));

    // TEST
    Clustering testing = sampleClustering(alphabet);   
    InstanceList testList = testing.getInstances();
    Clustering predictedClusters = clusterer.cluster(testList);     

    // EVALUATE
    System.err.println("\n\nEvaluating System: " + clusterer);
    ClusteringEvaluators evaluators = new ClusteringEvaluators(new ClusteringEvaluator[]{
        new BCubedEvaluator(),
View Full Code Here


      new InfoGain(trainingInstances).printByRank(System.out);
      logger.info("pairwise training accuracy="
          + new Trial(classifier, trainingInstances).getAccuracy());
      NeighborEvaluator neval = new PairwiseEvaluator(classifier, "YES",
          new PairwiseEvaluator.Average(), true);       
      clusterer = new GreedyAgglomerativeByDensity(
          training.get(0).getInstances().getPipe(), neval, 0.5, false,
          random);
      training = null;
      trainingInstances = null;
    } else {
View Full Code Here

TOP

Related Classes of cc.mallet.cluster.GreedyAgglomerativeByDensity

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.