public static void samplingCompose(File inDir) throws IOException {
//		String[] SAMPLES= "s100 s101 s102 s103 s104 s105 s106 s107 s108 s109 s110 s111 s112 s113 s114 s115 s116 s117 s118 s119"
		String[] MODES = {"context", "spo",  "usu"};
//		String[] MODES = {"context", "spo"};
//		String[] RATES= {"0.5", "0.25", "0.1", "0.05", "0.01", "0.005"};
		String[] RATES= {"0.05", "0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9"};
		String[] ESTS= {"laplace", "lid.5", "lid.1", "lid.01", "gt"};
//		String[] ESTS= {"laplace", "lid.01", "gt", "uniform"};
		String[] INDICES={"ps", "ts", "ecs", "p", "type"};
//		String[] INDICES={"ps", "ts", "type"};
		String[] METRICS_LABEL = {"Entropy (New)", "Entropy (Base)", "Entropy-norm (New)", "Entropy-norm (Base)", "Cross Entropy", "Perplexity", "KL Divergence", "Jacard", "Events in Base", "Events in New", "unknown New Events in Base"};
		String[] METRICS = {"entropy-new", "entropy-base", "entropy-norm-new", "entropy-norm-base", "cross-entropy", "perplexity", "kl-div", "jaccard", "events-base", "events-new", "unknown-events"};
		double[] VAL_1 = { -1, -1, -1, -1, -1, -1, 0, 1, -1, -1, 0};
		
		
		for (String index : INDICES) {
			System.out.println(index+"...");
			for (String mode : MODES) {
				System.out.println(mode+"...");
				for (int i = 0; i < METRICS.length; i++) {
					String metric = METRICS[i];
					PrintStream out = new PrintStream(new File(inDir,"sampling-"+index+"-"+mode+"-"+metric+".csv"));
					out.print("Rate");
					for (String est : ESTS) {
						out.print("\t"+est);
					}
					out.println();
					for (String rate : RATES) {
						out.print(rate);
						for (String est : ESTS) {
							BufferedReader in = new BufferedReader(new FileReader(new File(inDir,"d-result-"+index+"-"+mode+"-"+rate+"-"+est+".csv")));
							in.readLine();
							String line = null;
							int sampleCnt = 0;
							double sum = 0;
							while ( (line = in.readLine())!= null) {
								String[] entries = line.split(SPLIT);
								double value = Double.parseDouble(entries[i+2]);
								sum+= value;
								sampleCnt++;
							}
							double mean = sum / sampleCnt; 
							out.print("\t"+mean);
							in.close();
						}
						out.println();
					}
					if (VAL_1[i] >= 0) {
						out.print("1.0");
						for (String est : ESTS) {
							out.print("\t"+VAL_1[i]);
						}						
						out.println();
					}
					out.close();
				}
			}
		}


	}