RandomBaselineClusterAnalyser implements 
		ClusterAnalyser<RandomBaselineClusterAnalysis<ANNYS>> { @Override public RandomBaselineClusterAnalysis<ANNYS> analyse(int[][] correct,int[][] estimated) { ANNYS score = ann.analyse(correct, estimated); ANNYS randscore = ann.analyse(correct, baseline(estimated)); double meanrand = randscore.score(); for (int i = 0; i < this.trials; i++) { randscore = ann.analyse(correct, baseline(estimated)); meanrand += randscore.score(); } meanrand /= (trials+1); return new RandomBaselineClusterAnalysis<ANNYS>(score,meanrand ); } RandomBaselineClusterAnalyser(ANNER analyser);  RandomBaselineClusterAnalyser(ANNER analyser, int trials);  RandomBaselineClusterAnalyser(ANNER analyser, int trials, long seed); @Override RandomBaselineClusterAnalysis<ANNYS> analyse(int[][] correct,int[][] estimated);  }
@Test public void test(){ logger.debug("Converting datasets to int array clusters"); int[][] gt = this.groundTruth.toClusters(); int[][] es = this.estimate.toClusters(); logger.debug("Performing NMI random baseline analysis"); RandomBaselineClusterAnalyser<NMIClusterAnalyser, NMIAnalysis> r = new RandomBaselineClusterAnalyser<NMIClusterAnalyser, NMIAnalysis>(new NMIClusterAnalyser()); RandomBaselineClusterAnalysis<NMIAnalysis> ann = r.analyse(gt, es); logger.debug(ann.getSummaryReport()); logger.debug("Performing purity random baseline analysis"); RandomBaselineClusterAnalyser<PurityClusterAnalyser, PurityAnalysis> rpure = new RandomBaselineClusterAnalyser<PurityClusterAnalyser, PurityAnalysis>(new PurityClusterAnalyser()); RandomBaselineClusterAnalysis<PurityAnalysis> annpure = rpure.analyse(gt, es); logger.debug(annpure.getSummaryReport()); logger.debug("Performing randind random baseline analysis"); RandomBaselineClusterAnalyser<RandomIndexClusterAnalyser, RandomIndexAnalysis> rrandi = new RandomBaselineClusterAnalyser<RandomIndexClusterAnalyser, RandomIndexAnalysis>(new RandomIndexClusterAnalyser()); RandomBaselineClusterAnalysis<RandomIndexAnalysis> annrandi = rrandi.analyse(gt, es); logger.debug(annrandi.getSummaryReport()); }