Bug was fixed in delta criterion
Delta criterion didn't work properly. Please, consider fix to add
This commit is contained in:
		@@ -510,7 +510,7 @@ int lbfgs(
 | 
				
			|||||||
        /*
 | 
					        /*
 | 
				
			||||||
            Test for stopping criterion.
 | 
					            Test for stopping criterion.
 | 
				
			||||||
            The criterion is given by the following formula:
 | 
					            The criterion is given by the following formula:
 | 
				
			||||||
                (f(past_x) - f(x)) / f(x) < \delta
 | 
					                |(f(past_x) - f(x))| / f(x) < \delta
 | 
				
			||||||
         */
 | 
					         */
 | 
				
			||||||
        if (pf != NULL) {
 | 
					        if (pf != NULL) {
 | 
				
			||||||
            /* We don't test the stopping criterion while k < past. */
 | 
					            /* We don't test the stopping criterion while k < past. */
 | 
				
			||||||
@@ -519,7 +519,7 @@ int lbfgs(
 | 
				
			|||||||
                rate = (pf[k % param.past] - fx) / fx;
 | 
					                rate = (pf[k % param.past] - fx) / fx;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                /* The stopping criterion. */
 | 
					                /* The stopping criterion. */
 | 
				
			||||||
                if (rate < param.delta) {
 | 
					                if (fabs(rate) < param.delta) {
 | 
				
			||||||
                    ret = LBFGS_STOP;
 | 
					                    ret = LBFGS_STOP;
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user