Examples of PairwiseMatrix


Examples of cc.mallet.cluster.util.PairwiseMatrix

      " classifier=" + classifier.getClass().getName();
  }

  private double getScore (AgglomerativeNeighbor pwneighbor) {
    if (scoreCache == null)
      scoreCache = new PairwiseMatrix(pwneighbor.getOriginal().getNumInstances());
    int[] indices = pwneighbor.getNewCluster();
    if (scoreCache.get(indices[0], indices[1]) == 0.0) {
      scoreCache.set(indices[0], indices[1],
                 classifier.classify(pwneighbor).getLabelVector().value(scoringLabel));
    }
View Full Code Here

Examples of cc.mallet.cluster.util.PairwiseMatrix

      " classifier=" + classifier.getClass().getName();
  }

  private double getScore (AgglomerativeNeighbor pwneighbor) {
    if (scoreCache == null)
      scoreCache = new PairwiseMatrix(pwneighbor.getOriginal().getNumInstances());
    int[] indices = pwneighbor.getNewCluster();
    if (scoreCache.get(indices[0], indices[1]) == 0.0) {
      scoreCache.set(indices[0], indices[1],
                 classifier.classify(pwneighbor).getLabelVector().value(scoringLabel));
    }
View Full Code Here

Examples of cc.mallet.cluster.util.PairwiseMatrix

   * @param j
   * @return The score for merging these two clusters.
   */
  protected double getScore (Clustering clustering, int i, int j) {
    if (scoreCache == null)
      scoreCache = new PairwiseMatrix(clustering.getNumInstances());

    int[] ci = clustering.getIndicesWithLabel(i);
    int[] cj = clustering.getIndicesWithLabel(j);
    if (scoreCache.get(ci[0], cj[0]) == 0.0) {
      double val = evaluator.evaluate(
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.