edu.stanford.nlp.optimization
Class OWLQNMinimizer
java.lang.Object
edu.stanford.nlp.optimization.OWLQNMinimizer
- All Implemented Interfaces:
- Minimizer<DiffFunction>
public class OWLQNMinimizer
- extends Object
- implements Minimizer<DiffFunction>
Class implementing the Orthant-Wise Limited-memory Quasi-Newton
algorithm (OWL-QN). OWN-QN is a numerical optimization procedure for
finding the optimum of an objective of the form smooth function plus
L1-norm of the parameters. It has been used for training log-linear
models (such as logistic regression) with L1-regularization. The
algorithm is described in "Scalable training of L1-regularized
log-linear models" by Galen Andrew and Jianfeng Gao. This
implementation includes built-in capacity to train logistic regression
or least-squares models with L1 regularization. It is also possible to
use OWL-QN to optimize any arbitrary smooth convex loss plus L1
regularization by defining the function and its gradient using the
supplied "DifferentiableFunction" class, and passing an instance of
the function to the OWLQN object. For more information, please read
the included file README.txt. Also included in the distribution are
the ICML paper and slide presentation.
Significant portions of this code are taken from
Galen Andew's implementation
- Author:
- Michel Galley
Field Summary |
static boolean |
DEBUG
|
Method Summary |
static void |
main(String[] args)
|
double[] |
minimize(DiffFunction function,
double functionTolerance,
double[] initial)
Attempts to find an unconstrained minimum of the objective
function starting at initial , within
functionTolerance . |
double[] |
minimize(DiffFunction function,
double functionTolerance,
double[] initial,
int maxIterations)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEBUG
public static final boolean DEBUG
- See Also:
- Constant Field Values
OWLQNMinimizer
public OWLQNMinimizer()
OWLQNMinimizer
public OWLQNMinimizer(double regweight)
OWLQNMinimizer
public OWLQNMinimizer(double regweight,
int m)
minimize
public double[] minimize(DiffFunction function,
double functionTolerance,
double[] initial)
- Description copied from interface:
Minimizer
- Attempts to find an unconstrained minimum of the objective
function
starting at initial
, within
functionTolerance
.
- Specified by:
minimize
in interface Minimizer<DiffFunction>
- Parameters:
function
- the objective functionfunctionTolerance
- a double
valueinitial
- a initial feasible point
- Returns:
- Unconstrained minimum of function
minimize
public double[] minimize(DiffFunction function,
double functionTolerance,
double[] initial,
int maxIterations)
- Specified by:
minimize
in interface Minimizer<DiffFunction>
main
public static void main(String[] args)
Stanford NLP Group