MalletMain Page | About | Help | FAQ | Special pages | Log in
Advanced Machine Learning for Language
Printable version | Disclaimers

BFGSExceptions

From Mallet

Q: "During training, I sometimes get premature termination, as well as exceptions, in particular, the "Could not step in current direction" exception (line 194), and the "sy" is postive exception (line 152).

A: L-BFGS can exihibit this behavior for several reasons:

(1) The Maximizable object's getValue() and getValueGradient() methods are not consistent. This can be verified by running

TestMaximizable.testValueAndGradient (maxable);

Although TestMaximizable may occasionally fail for correct Maximzable objects, if it passes we can move on to other possibilities. (Also note that this test takes a while, so you can try using a subset of features, using TestMaximizable.setNumComponents (n) before calling testValueAndGradient.)

(2) L-BFGS approximates the Hessian using previous calls to getValue() and getValueGradient(). If the parameters of a Maximizable object are changed outside the control of L-BFGS, you should call LimitedMemoryBFGS.reset() to reset its memory. Otherwise, the approximation may be completely off.

(3) L-BFGS has occasionally had trouble converging for peculiar cases of Maximizable objects. This can occasionally occur when the curvature is particularly sharp. One thing to try is to catch the exceptions, call LimitedMemoryBFGS.reset(), then continue optimization with the current parameters.

(4) Also, our L-BFGS implementation doesn't seem to work for functions that aren't convex. If you try to run L-BFGS with a non-convex objective, you usually get an sy exception.

Retrieved from "http://mallet.cs.umass.edu/index.php/BFGSExceptions"

This page has been accessed 3376 times. This page was last modified 01:25, 29 Aug 2005.


Find
Navigation
Main Page
Community portal
Recent changes
Random page
Help
Donations
Edit
Edit this page
Editing help
This page
Discuss this page
Post a comment
Printable version
Context
Page history
What links here
Related changes
My pages
Create an account or log in
Special pages
New pages
Image list
Statistics
Bug reports
More...