LBFGS taking forever to converge

407 views Asked by At

I'm using the HCRF Library for a sequence prediction task . For learning the model parameters, I'm using LBFGS, although there are options to use CG and BFGS.

I notice that it takes an awfully long time to converge. I've set the maximum number of iterations (currently) to 5000. If my interpretation of the HCRF library is correct, then the changes in the estimates from iteration to iteration do get smaller. However, the program doesn't seem likely to terminate in less than 5000 iterations, and it's really just taking such a long time.

If I set the maximum iteration to 500, then at the 500th iteration, the result looks like:

Iteration 500
fx = 465.359
xnorm 38.0831, gnorm = 46.3165, step = 1line search = 1

It terminates with this message:

L-BFGS optimization terminated with status code = -997
fx = 465.359

which means that the maximum iteration has been reached.

What does this imply about the data? Is it acceptable to terminate it at an earlier time (e.g. 300 iterations)? If so, what is a reasonable "cap" or maximum number of iterations?

To give you an idea of the data I'm training, I use 20,000 - 30,000 observation with 14 features each.

Thanks and any insight will definitely be appreciated.

0

There are 0 answers