edu.stanford.nlp.optimization
Class SMDMinimizer
java.lang.Object
edu.stanford.nlp.optimization.StochasticMinimizer
edu.stanford.nlp.optimization.SMDMinimizer
- All Implemented Interfaces:
- Minimizer
public class SMDMinimizer
- extends StochasticMinimizer
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 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
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
- Overrides:
minimize
in class StochasticMinimizer
- Parameters:
function
- the objective functionfunctionTolerance
- a double
valueinitial
- a initial feasible point
init
protected void init(AbstractStochasticCachingDiffFunction func)
- Overrides:
init
in class StochasticMinimizer
tune
public Pair<Integer,Double> tune(Function function,
double[] initial,
long msPerTest)
- Specified by:
tune
in class StochasticMinimizer
takeStep
protected void takeStep(AbstractStochasticCachingDiffFunction dfunction)
- Specified by:
takeStep
in class StochasticMinimizer
getName
protected String getName()
- Specified by:
getName
in class StochasticMinimizer
main
public static void main(String[] args)
Stanford NLP Group