edu.stanford.nlp.optimization
Class SMDMinimizer<T extends Function>
java.lang.Object
edu.stanford.nlp.optimization.StochasticMinimizer<T>
edu.stanford.nlp.optimization.SMDMinimizer<T>
- All Implemented Interfaces:
- HasEvaluators, Minimizer<T>
public class SMDMinimizer<T extends Function>
- extends StochasticMinimizer<T>
Stochastic Meta Descent Minimizer based on
Accelerated training of conditional random fields with stochastic gradient methods
S. V. N. Vishwanathan, Nicol N. Schraudolph, Mark W. Schmidt, Kevin P. Murphy
June 2006 Proceedings of the 23rd international conference on Machine learning ICML '06
Publisher: ACM Press
The basic way to use the minimizer is with a null constructor, then
the simple minimize method:
Minimizer smd = new SMDMinimizer();
DiffFunction df = new SomeDiffFunction();
double tol = 1e-4;
double[] initial = getInitialGuess();
int maxIterations = someSafeNumber;
double[] minimum = qnm.minimize(df,tol,initial,maxIterations);
Constructing with a null constructor will use the default values of
batchSize = 15;
initialGain = 0.1;
useAlgorithmicDifferentiation = true;
- Since:
- 1.0
- Author:
- Alex Kleeman
Fields inherited from class edu.stanford.nlp.optimization.StochasticMinimizer |
bSize, file, gain, gen, grad, gradList, infoFile, k, maxTime, memory, newGrad, newX, numBatches, numPasses, outputFrequency, outputIterationsToFile, quiet, v, x |
Methods inherited from class edu.stanford.nlp.optimization.StochasticMinimizer |
gainSchedule, minimize, say, sayln, setEvaluators, smooth, tune, tuneBatch, tuneDouble, tuneDouble, tuneGain |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mu
public double mu
lam
public double lam
cPosDef
public double cPosDef
meta
public double meta
printMinMax
public boolean printMinMax
SMDMinimizer
public SMDMinimizer()
SMDMinimizer
public SMDMinimizer(double initialSMDGain,
int batchSize,
StochasticCalculateMethods method,
int passes)
SMDMinimizer
public SMDMinimizer(double initGain,
int batchSize,
StochasticCalculateMethods method,
int passes,
boolean outputToFile)
shutUp
public void shutUp()
- Overrides:
shutUp
in class StochasticMinimizer<T extends Function>
setBatchSize
public void setBatchSize(int batchSize)
minimize
public double[] minimize(Function 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<T extends Function>
- Overrides:
minimize
in class StochasticMinimizer<T extends Function>
- Parameters:
function
- the objective functionfunctionTolerance
- a double
valueinitial
- a initial feasible point
- Returns:
- Unconstrained minimum of function
init
protected void init(AbstractStochasticCachingDiffFunction func)
- Overrides:
init
in class StochasticMinimizer<T extends Function>
tune
public Pair<Integer,Double> tune(Function function,
double[] initial,
long msPerTest)
- Specified by:
tune
in class StochasticMinimizer<T extends Function>
takeStep
protected void takeStep(AbstractStochasticCachingDiffFunction dfunction)
- Specified by:
takeStep
in class StochasticMinimizer<T extends Function>
getName
protected String getName()
- Specified by:
getName
in class StochasticMinimizer<T extends Function>
main
public static void main(String[] args)
Stanford NLP Group