}
//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>();
for(int i=0;i<fuzzyVector.length;i++) {
fvt += fuzzyVector[i];
//if(cluster.contains(i)) System.out.println(docFiles.get(i) + "\t" + fuzzyVector[i]);
//if(fuzzyVector[i] > 0.1 && !cluster.contains(i)) System.out.println(docFiles.get(i) + "\t" + fuzzyVector[i]);
//if(fuzzyVector[i] > 0.05 && !cluster.contains(i)) {
// cluster.add(i);
// assigned.add(i);
//}
if(fuzzyVector[i] > 0.25) fc.put(i, (float)fuzzyVector[i]);
}*/
//System.out.println(fvt);
for(Integer i : cluster) {
System.out.println(docFiles.get(i));
}
Map<Integer,Float> clusterMap = new HashMap<Integer,Float>();
for(Integer i : cluster) {
clusterMap.put(i, 1.0f);
}
//ClusterAnalyser.analyseCluster(fc, ir);
//ClusterAnalyser.analyseCluster(new ArrayList<Integer>(cluster), ir, new TanimotoSimilarity(), 0.05);
ClusterAnalyser.excessAnalyseCluster(clusterMap, ir, 0.2, true);
System.out.println();
}
for(Integer i : qt.getUnclustered()) {
if(!assigned.contains(i)) System.out.println(docFiles.get(i));
}
return;
}