public double train(Collection<_Doc> trainSet){
		
		super.init();
		m_classifier.train(m_trainSet);
		
		m_L = m_trainSet.size();
		m_U = m_testSet.size();
		m_labeled = m_trainSet;
		
		int clusterNo;
		
		//Init hashmap.
		for(int i=0; i<m_kmeans; i++)
			m_clusterNoDocs.put(i, new ArrayList<_Doc>());
		
		//Split the train set based on different clusters.
		for(_Doc d: trainSet){
			clusterNo = d.getClusterNo();
			m_clusterNoDocs.get(clusterNo).add(d);
		}
		
		//The model array stores all the rankSVM for all clusters.
		m_allWeights = new double[m_clusterNoDocs.size()][];
		
		//Train different cluster of documents respectively.
		for(int cNo: m_clusterNoDocs.keySet()){
			m_trainSet = m_clusterNoDocs.get(cNo);
			//Get some stat of training reviews.
			int[] count = new int[2];
			for(_Doc d: m_trainSet)
				count[d.getYLabel()]++;
			System.out.format("There are %d (pos:%d, neg:%d) training documents in the corpus.\n", m_trainSet.size(), count[1], count[0]);
			super.L2RModelTraining();
			m_allWeights[cNo] = getWeights();
		}
		return 0;
	}