Package cc.mallet.cluster.evaluate

Examples of cc.mallet.cluster.evaluate.AccuracyEvaluator


    System.err.println("\n\nEvaluating System: " + clusterer);
    ClusteringEvaluators evaluators = new ClusteringEvaluators(new ClusteringEvaluator[]{
        new BCubedEvaluator(),
        new PairF1Evaluator(),
        new MUCEvaluator(),
        new AccuracyEvaluator()});

    System.err.println("truth:" + testing);
    System.err.println("pred: " + predictedClusters);       
    System.err.println(evaluators.evaluate(testing, predictedClusters));          
  }
View Full Code Here


    Clusterings testing = readClusterings(testingFile.value);
    ClusteringEvaluator evaluator = (ClusteringEvaluator) clusteringEvaluatorOption.value;
    if (evaluator == null)
      evaluator = new ClusteringEvaluators(
          new ClusteringEvaluator[] { new BCubedEvaluator(),
              new PairF1Evaluator(), new MUCEvaluator(), new AccuracyEvaluator() });
    ArrayList<Clustering> predictions = new ArrayList<Clustering>();
    for (int i = 0; i < testing.size(); i++) {
      Clustering clustering = testing.get(i);
      Clustering predicted = clusterer.cluster(clustering.getInstances());
      predictions.add(predicted);
View Full Code Here

TOP

Related Classes of cc.mallet.cluster.evaluate.AccuracyEvaluator

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.