double EStep(Collection<_Doc> trainSet) {
		double likelihood = 0;
		for(_Doc doc: m_trainSet){
			score(doc, 0);//to compute p(x|y)p(y) and store it in m_cProbs
			
			if (doc.getSourceType()==1) {//unlabeled data
				double sumY = Utils.logSumOfExponentials(m_cProbs);
				for(int i=0; i<m_classNo; i++) {
					doc.m_sstat[i] = Math.exp(m_cProbs[i] - sumY); // p(y|x)
					likelihood += doc.m_sstat[i] * m_cProbs[i]; // p(x)
				}
			} else if (doc.getSourceType()==2) {//labeled data
				likelihood += m_cProbs[doc.getYLabel()]; //p(x, y=Y)
			}
		}
		
		return likelihood;
	}