@Override
	public void applyEvidence(Corpus c, int T) 
	{
		// error-check 
		String doclabelStr = SideInfoType.DOCLABEL.infoName;
		assert(c.sideInfo.containsKey(doclabelStr));
		for(int t : hashSeedTopics)
			assert(t >= 0 && t < T);
		
		// get document labels 
		int[] doclabels = (int[]) c.sideInfo.get(doclabelStr); 

		// find all idx where corresponding doc has label doclabel
		List<Integer >groundList = new ArrayList<Integer>();
		for(int i = 0; i < c.d.length; i++)
			if(doclabels[c.d[i]] == docLabel)
				groundList.add(i);
		this.groundings = new int[groundList.size()];
		for(int i = 0; i < groundList.size(); i++)
			this.groundings[i] = groundList.get(i);
		
		// Pre-calc gradients calculations
		// (not dependent on zrelax so will never change)
		//
		this.gradient = new double[1][T];
		for(Integer t = 0; t < T; t++)		
			if(hashSeedTopics.contains(t))		
				gradient[0][t] = stepWeight;
			else
				gradient[0][t] = 0;	
	}