private void AIC(int cluster, int size, double[] data, double[] trans,
			double[] mean, double[] var, double[] weight, File resFile) { //AICo
		try {
			File aiclogFile = new File(resFile.getParentFile(), aiclogFileName);
			OutputStreamWriter aiclogOsw = new OutputStreamWriter(new FileOutputStream(aiclogFile, true));
			BufferedWriter aiclogBw = new BufferedWriter(aiclogOsw);
			double maxLikelihood = 0.0;
			for(int i=0; i<size; i++){
				double dataLikelihood = 0.0;
				for (int k=0; k<cluster; k++){
					double delay = data[i] - trans[k];
					if (delay > 0) { //Ԓxtzł́Ao[Xg_Õf[^͕zɑȂ̂Ŗޓx[ƌ
						//if (delay < 1) delay = altDelay;
						double gap = Math.log(delay) - mean[k];
						double denom = Math.sqrt(2 * Math.PI * var[k]) * delay;
						dataLikelihood += weight[k] * Math.exp(-0.5 * gap * gap / var[k]) / denom;
					}
				}
				maxLikelihood += Math.log(dataLikelihood);
			}
			int numOfParam = 4; //NX^̃p[^
			double AIC = -2 * maxLikelihood + 2 * (numOfParam * cluster + cluster - 1);
			
			if (aiclogFile.length() == 0){
				stopWatch("Using AIC...");
				aiclogBw.write("maxIter = ," + maxIter + ", upperMax = ," + upperMax);
				aiclogBw.newLine();
			}
			aiclogBw.write(cluster + ", " + AIC + ", " + resFile.toString());
			aiclogBw.newLine();
			
			aiclogBw.close();
			aiclogOsw.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
			return;
		} catch (IOException e) {
			e.printStackTrace();
			return;
		}
	}