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;
StochasticMinimizer.PropertySetter<T1>
Modifier and Type | Field and Description |
---|---|
double |
cPosDef |
double |
lam |
double |
meta |
double |
mu |
boolean |
printMinMax |
Constructor and Description |
---|
SMDMinimizer() |
SMDMinimizer(double initialSMDGain,
int batchSize,
StochasticCalculateMethods method,
int passes) |
SMDMinimizer(double initGain,
int batchSize,
StochasticCalculateMethods method,
int passes,
boolean outputToFile) |
Modifier and Type | Method and Description |
---|---|
protected String |
getName() |
protected void |
init(AbstractStochasticCachingDiffFunction func) |
static void |
main(String[] args) |
double[] |
minimize(Function function,
double functionTolerance,
double[] initial)
Attempts to find an unconstrained minimum of the objective
function starting at initial , within
functionTolerance . |
void |
setBatchSize(int batchSize) |
void |
shutUp() |
protected void |
takeStep(AbstractStochasticCachingDiffFunction dfunction) |
Pair<Integer,Double> |
tune(Function function,
double[] initial,
long msPerTest) |
gainSchedule, minimize, say, sayln, setEvaluators, smooth, tune, tuneBatch, tuneDouble, tuneDouble, tuneGain
public double mu
public double lam
public double cPosDef
public double meta
public boolean printMinMax
public SMDMinimizer()
public SMDMinimizer(double initialSMDGain, int batchSize, StochasticCalculateMethods method, int passes)
public SMDMinimizer(double initGain, int batchSize, StochasticCalculateMethods method, int passes, boolean outputToFile)
public void shutUp()
shutUp
in class StochasticMinimizer<T extends Function>
public void setBatchSize(int batchSize)
public double[] minimize(Function function, double functionTolerance, double[] initial)
Minimizer
function
starting at initial
, within
functionTolerance
.protected void init(AbstractStochasticCachingDiffFunction func)
init
in class StochasticMinimizer<T extends Function>
public Pair<Integer,Double> tune(Function function, double[] initial, long msPerTest)
tune
in class StochasticMinimizer<T extends Function>
protected void takeStep(AbstractStochasticCachingDiffFunction dfunction)
takeStep
in class StochasticMinimizer<T extends Function>
protected String getName()
getName
in class StochasticMinimizer<T extends Function>
public static void main(String[] args)