Package cc.mallet.cluster.iterator

Examples of cc.mallet.cluster.iterator.AllPairsIterator


  public double score(Clustering clustering) {
    Clustering singletons = ClusterUtils
        .createSingletonClustering(clustering.getInstances());
    double total = 0;
    int count = 0;
    for (AllPairsIterator iter = new AllPairsIterator(singletons); iter
        .hasNext(); count++) {
      Instance instance = (Instance) iter.next();
      AgglomerativeNeighbor neighbor = (AgglomerativeNeighbor) instance
          .getData();
      double score = evaluator.evaluate(neighbor);
      int[][] clusters = neighbor.getOldClusters();
      if (clustering.getLabel(clusters[0][0]) == clustering
View Full Code Here

TOP

Related Classes of cc.mallet.cluster.iterator.AllPairsIterator

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.