Examples of makeClusters()


Examples of uk.ac.cam.ch.wwmm.ptc.experimental.termsimilarity.QTClusterer.makeClusters()

        sm.setSimilarity(i, j, (float)wordSimilarity(dfl.get(i), dfl.get(j)));
      }
    }
    System.out.println("Similarity matrix made");
    QTClusterer qt = new QTClusterer(sm);
    qt.makeClusters(0.5);
    for(Set<String> terms : qt.getClustersOfNames()) {
      System.out.println(terms);
    }
   
  }
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptc.experimental.termsimilarity.QTClusterer.makeClusters()

   
    System.out.println("Cosines calculated in: " + (System.currentTimeMillis() - time));
    time = System.currentTimeMillis();

    QTClusterer qt = new QTClusterer(sm);
    qt.makeClusters(0.05);
    System.out.println("Made clusters in: " + (System.currentTimeMillis() - time));
    for(Set<Integer> cluster : qt.getClustersBySize()) {
      List<File> clusterFiles = new ArrayList<File>();
      Map<Integer,Float> clusterMap = new HashMap<Integer,Float>();
       for(Integer i : cluster) {
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptc.experimental.termsimilarity.QTClusterer.makeClusters()

      //System.out.println(Math.min(svals.length, docMatrix.getRowDimension()));
      //VirtualSimilarityMatrix simMatrix = new VirtualSimilarityMatrix(docMatrix, docFiles, Math.min(svals.length, docMatrix.getRowDimension()-1));
      System.out.println("Similarity matrix: " + (System.currentTimeMillis() - time));
      time = System.currentTimeMillis();     
      QTClusterer qt = new QTClusterer(simMatrix);
      qt.makeClusters(0.05);
      System.out.println("Made clusters in: " + (System.currentTimeMillis() - time));
      for(Set<Integer> cluster : qt.getClustersBySize()) {
        /*double[] fuzzyVector = vectorToPoints(combinedVector(cluster, docMatrix, svals), docMatrix, svals);
        double fvt = 0.0;
        Map<Integer,Float> fc = new HashMap<Integer,Float>();
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.