protected double goldenSectionSearch(HashMap heldOutMap,double a,double b,double c,double tau,int typeCount){
		assert(c>b&&b>a);
		double d=0;
		
		if(c-b>b-a){
			d=b+resphi*(c-b);
		}else{
			d=b-resphi*(b-a);
		}
		if(Math.abs(c-a)<tau*(Math.abs(b)+Math.abs(d))){
			return (c+a)/2.0;
		}
		double prob=getLogModelProbFromMap(heldOutMap,d,typeCount);
		double prevProb=getLogModelProbFromMap(heldOutMap,b,typeCount);
		assert(prob!=prevProb);
		if(prob>prevProb){
			if(c-b>b-a)
				return goldenSectionSearch(heldOutMap,b,d,c,tau,typeCount);
			else
				return goldenSectionSearch(heldOutMap,a,d,b,tau,typeCount);
		}else{
			if(c-b>b-a)
				return goldenSectionSearch(heldOutMap,a,b,d,tau,typeCount);
			else
				return goldenSectionSearch(heldOutMap,d,b,c,tau,typeCount);
			
		}
		
	}