public void CHI(HashMap<String, _stat> featureStat, int[] classMemberNo){
		m_selectedFeatures.clear();
		int classNo = classMemberNo.length;
		int N = Utils.sumOfArray(classMemberNo), sumDF;
		double[] X2tc = new double [classNo];
		double X2avg = 0;		
			
		for(String f: featureStat.keySet()){
			//Filter the features which have smaller DFs.
			_stat temp = featureStat.get(f);
			sumDF = Utils.sumOfArray(temp.getDF());
			
			if (sumDF > m_minDF && sumDF < m_maxDF) {	
				X2avg = 0;				
				for(int i = 0; i < classNo; i++){
					X2tc[i] = Utils.ChiSquare(N, sumDF, temp.getDF()[i], classMemberNo[i]);
					X2avg += X2tc[i] * classMemberNo[i] / N;
				}
				//X2max = Utils.maxOfArrayValue(X2tc);
				m_selectedFeatures.add(new _RankItem(f, X2avg));
			}
		}
	}