public class OWLQN extends AbstractMinimizer
| Constructor and Description |
|---|
OWLQN() |
| Modifier and Type | Method and Description |
|---|---|
OWLQN |
doGradChecks()
Set to true this will check the gradients every iteration and print out if
it aligns with the numerical gradient.
|
de.jungblut.math.DoubleVector |
minimize(CostFunction f,
de.jungblut.math.DoubleVector theta,
int maxIterations,
boolean verbose)
Minimizes the given costfunction with the starting parameter theta.
|
static de.jungblut.math.DoubleVector |
minimizeFunction(CostFunction f,
de.jungblut.math.DoubleVector theta,
int maxIterations,
boolean verbose)
Minimizes the given cost function with L-BFGS.
|
OWLQN |
setL1Weight(double l1weight)
This implementation also supports l1 weight adjustment (without the
costfunction knowing about it).
|
OWLQN |
setM(int m)
The amount of directions and gradients to keep, this is the "limited" part
of L-BFGS.
|
OWLQN |
setTolerance(double tol)
The breaking tolerance over a window of five iterations.
|
addIterationCompletionCallback, onIterationFinishedpublic de.jungblut.math.DoubleVector minimize(CostFunction f, de.jungblut.math.DoubleVector theta, int maxIterations, boolean verbose)
Minimizerf - the costfunction to minimize.theta - the starting parameters.maxIterations - the number of iterations to do.verbose - if TRUE it will print progress.public OWLQN doGradChecks()
public OWLQN setM(int m)
public OWLQN setL1Weight(double l1weight)
public OWLQN setTolerance(double tol)
public static de.jungblut.math.DoubleVector minimizeFunction(CostFunction f, de.jungblut.math.DoubleVector theta, int maxIterations, boolean verbose)
f - the costfunction to minimize.theta - the initial weights.maxIterations - the maximum amount of iterations.verbose - true if progress output shall be printed.Copyright © 2016. All rights reserved.