RandomClusterer implements SparseMatrixClusterer<IndexClusters> { @Override public int[][] performClustering(SparseMatrix data) { return this.cluster(data).clusters(); } RandomClusterer();  RandomClusterer(long seed);  RandomClusterer(int nclusters);  RandomClusterer(int nclusters, long seed); @Override IndexClusters cluster(SparseMatrix data); @Override int[][] performClustering(SparseMatrix data);  }
@Test public void testRC() throws Exception { FullMEClusterAnalyser meca = new FullMEClusterAnalyser(); FullMEAnalysis anal2 = meca.analyse(correct, estimate); RandomClusterer rc = new RandomClusterer(10,1); for (int i = 0; i < 100; i++) { SparseMatrix sm = new SparseMatrix(17,17); int[][] c1 = rc.performClustering(sm); FullMEAnalysis anal1 = meca.analyse(correct, c1); if(anal2.fscore.fscore(1) <= anal1.fscore.fscore(1)){ summarise(anal1,anal2, c1); } assertTrue(anal1.fscore.fscore(1) < anal2.fscore.fscore(1)); } }