diff --git a/COPYING b/COPYING index 0d2f4cb..6377dc8 100644 --- a/COPYING +++ b/COPYING @@ -1,7 +1,7 @@ The MIT License Copyright (c) 1990 Jorge Nocedal -Copyright (c) 2007,2008 Naoaki Okazaki +Copyright (c) 2007-2009 Naoaki Okazaki Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/ChangeLog b/ChangeLog index fd8ddfb..5ef08c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,35 @@ +2009-02-28 Naoaki Okazaki + + * libLBFGS 1.7: + - Improved OWL-QN routines for stability. + - Removed the support of OWL-QN method in MoreThuente algorithm + because it accidentally fails in early stages of iterations for some + objectives. Because of this change, the OW-LQN method must be used + with the backtracking algorithm (LBFGS_LINESEARCH_BACKTRACKING), or + the library returns LBFGSERR_INVALID_LINESEARCH. + - Renamed line search algorithms as follows: + - LBFGS_LINESEARCH_BACKTRACKING: regular Wolfe condition. + - LBFGS_LINESEARCH_BACKTRACKING_LOOSE: regular Wolfe condition. + - LBFGS_LINESEARCH_BACKTRACKING_STRONG: strong Wolfe condition. + - Source code clean-up. + + +2008-11-02 Naoaki Okazaki + + * libLBFGS 1.6: + - Improved line-search algorithm with strong Wolfe condition, which + was contributed by Takashi Imamichi. This routine is now default for + LBFGS_LINESEARCH_BACKTRACKING. The previous line search algorithm + with regular Wolfe condition is still available as + LBFGS_LINESEARCH_BACKTRACKING_LOOSE. + - Configurable stop index for L1-norm computation. A member variable + lbfgs_parameter_t::orthantwise_end was added to specify the index + number at which the library stops computing the L1 norm of the + variables. This is useful to prevent some variables from being + regularized by the OW-LQN method. + - A sample program written in C++ (sample/sample.cpp). + + 2008-07-10 Naoaki Okazaki * libLBFGS 1.5: diff --git a/README b/README index 9b2db5d..55761ef 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ libLBFGS: C library of limited-memory BFGS (L-BFGS) Copyright (c) 1990, Jorge Nocedal - Copyright (c) 2007,2008, Naoaki Okazaki + Copyright (c) 2007-2009, Naoaki Okazaki ========================================================================= 1. Introduction diff --git a/configure.in b/configure.in index 6c9b8dc..d92408e 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_SRCDIR([lib/lbfgs.c]) dnl ------------------------------------------------------------------ dnl Initialization for automake dnl ------------------------------------------------------------------ -AM_INIT_AUTOMAKE(liblbfgs, 1.6) +AM_INIT_AUTOMAKE(liblbfgs, 1.7) AC_CONFIG_HEADERS(config.h) AM_MAINTAINER_MODE diff --git a/include/lbfgs.h b/include/lbfgs.h index b327b41..c1dbd70 100644 --- a/include/lbfgs.h +++ b/include/lbfgs.h @@ -153,9 +153,11 @@ enum { /** MoreThuente method proposd by More and Thuente. */ LBFGS_LINESEARCH_MORETHUENTE = 0, /** Backtracking method with strong Wolfe condition. */ - LBFGS_LINESEARCH_BACKTRACKING_STRONG, + LBFGS_LINESEARCH_BACKTRACKING_STRONG = 1, /** Backtracking method with regular Wolfe condition. */ - LBFGS_LINESEARCH_BACKTRACKING, + LBFGS_LINESEARCH_BACKTRACKING = 2, + /** Backtracking method with regular Wolfe condition. */ + LBFGS_LINESEARCH_BACKTRACKING_LOOSE = 2, }; /** @@ -184,7 +186,25 @@ typedef struct { */ lbfgsfloatval_t epsilon; + /** + * Distance for delta-based convergence test. + * This parameter determines the distance, in iterations, to compute + * the rate of decrease of the objective function. If the value of this + * parameter is zero, the library does not perform the delta-based + * convergence test. The default value is \c 0. + */ int past; + + /** + * Delta for convergence test. + * This parameter determines the minimum rate of decrease of the + * objective function. The library stops iterations when the + * following condition is met: + * (f' - f) / f < \ref delta, + * where f' is the objective value of \ref past iterations ago, and f is + * the objective value of the current iteration. + * The default value is \c 0. + */ lbfgsfloatval_t delta; /** @@ -529,18 +549,30 @@ This library is used by: @section download Download -- Source code +- Source code libLBFGS is distributed under the term of the MIT license. @section changelog History +- Version 1.7 (2009-02-28): + - Improved OWL-QN routines for stability. + - Removed the support of OWL-QN method in MoreThuente algorithm because + it accidentally fails in early stages of iterations for some objectives. + Because of this change, the OW-LQN method must be used with the + backtracking algorithm (::LBFGS_LINESEARCH_BACKTRACKING), or the + library returns ::LBFGSERR_INVALID_LINESEARCH. + - Renamed line search algorithms as follows: + - ::LBFGS_LINESEARCH_BACKTRACKING: regular Wolfe condition. + - ::LBFGS_LINESEARCH_BACKTRACKING_LOOSE: regular Wolfe condition. + - ::LBFGS_LINESEARCH_BACKTRACKING_STRONG: strong Wolfe condition. + - Source code clean-up. - Version 1.6 (2008-11-02): - Improved line-search algorithm with strong Wolfe condition, which was contributed by Takashi Imamichi. This routine is now default for - ::LBFGS_LINESEARCH_BACKTRACKING_STRONG. The previous line search algorithm + ::LBFGS_LINESEARCH_BACKTRACKING. The previous line search algorithm with regular Wolfe condition is still available as - ::LBFGS_LINESEARCH_BACKTRACKING. + ::LBFGS_LINESEARCH_BACKTRACKING_LOOSE. - Configurable stop index for L1-norm computation. A member variable ::lbfgs_parameter_t::orthantwise_end was added to specify the index number at which the library stops computing the L1 norm of the @@ -552,7 +584,7 @@ libLBFGS is distributed under the term of the ::lbfgs_parameter_t::orthantwise_start was added to specify the index number from which the library computes the L1 norm of the variables. This is useful to prevent some variables from being regularized by the - OW-LQN method. + OWL-QN method. - Fixed a zero-division error when the initial variables have already been a minimizer (reported by Takashi Imamichi). In this case, the library returns ::LBFGS_ALREADY_MINIMIZED status code. @@ -563,7 +595,7 @@ libLBFGS is distributed under the term of the - Configurable line search algorithms. A member variable ::lbfgs_parameter_t::linesearch was added to choose either MoreThuente method (::LBFGS_LINESEARCH_MORETHUENTE) or backtracking algorithm - (::LBFGS_LINESEARCH_BACKTRACKING_STRONG). + (::LBFGS_LINESEARCH_BACKTRACKING). - Fixed a bug: the previous version did not compute psuedo-gradients properly in the line search routines for OWL-QN. This bug might quit an iteration process too early when the OWL-QN routine was activated @@ -626,6 +658,9 @@ method presented in: In Proceedings of the 24th International Conference on Machine Learning (ICML 2007), pp. 33-40, 2007. +Special thanks go to Yoshimasa Tsuruoka and Daisuke Okanohara for technical +information about OWL-QN. + Finally I would like to thank the original author, Jorge Nocedal, who has been distributing the effieicnt and explanatory implementation in an open source licence. @@ -633,7 +668,7 @@ licence. @section reference Reference - L-BFGS by Jorge Nocedal. -- OWL-QN by Galen Andrew. +- Orthant-Wise Limited-memory Quasi-Newton Optimizer for L1-regularized Objectives by Galen Andrew. - C port (via f2c) by Taku Kudo. - C#/C++/Delphi/VisualBasic6 port in ALGLIB. - Computational Crystallography Toolbox includes diff --git a/sample/sample.c b/sample/sample.c index 2641f75..f89babc 100644 --- a/sample/sample.c +++ b/sample/sample.c @@ -65,7 +65,7 @@ int main(int argc, char *argv) /* Initialize the parameters for the L-BFGS optimization. */ lbfgs_parameter_init(¶m); //param.orthantwise_c = 1; - param.linesearch = LBFGS_LINESEARCH_BACKTRACKING_STRONG; + //param.linesearch = LBFGS_LINESEARCH_BACKTRACKING; /* Start the L-BFGS optimization; this will invoke the callback functions