public class SGDWithAdaGradAndFOBOS<T extends DiffFunction> extends java.lang.Object implements Minimizer<T>, HasEvaluators
Modifier and Type | Class and Description |
---|---|
static class |
SGDWithAdaGradAndFOBOS.Prior |
Modifier and Type | Field and Description |
---|---|
protected double |
alpha |
protected int |
bSize |
double[] |
diag |
protected java.util.Random |
gen |
protected double |
initRate |
protected double |
lambda |
protected long |
maxTime |
protected int |
numPasses |
protected boolean |
quiet |
java.util.List<double[]> |
sList |
protected double[] |
x |
java.util.List<double[]> |
yList |
Constructor and Description |
---|
SGDWithAdaGradAndFOBOS(double initRate,
double lambda,
int numPasses) |
SGDWithAdaGradAndFOBOS(double initRate,
double lambda,
int numPasses,
int batchSize) |
SGDWithAdaGradAndFOBOS(double initRate,
double lambda,
int numPasses,
int batchSize,
java.lang.String priorType,
double alpha,
boolean useAdaDelta,
boolean useAdaDiff,
double adaGradEps,
double adaDeltaRho) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getName() |
double[] |
minimize(DiffFunction function,
double functionTolerance,
double[] initial)
Attempts to find an unconstrained minimum of the objective
function starting at initial , accurate to
within functionTolerance (normally implemented as
a multiplier of the range value to give range tolerance). |
double[] |
minimize(DiffFunction f,
double functionTolerance,
double[] initial,
int maxIterations)
Attempts to find an unconstrained minimum of the objective
function starting at initial , accurate to
within functionTolerance (normally implemented as
a multiplier of the range value to give range tolerance), but
running only for at most maxIterations iterations. |
protected void |
say(java.lang.String s) |
protected void |
sayln(java.lang.String s) |
void |
setEvaluators(int iters,
Evaluator[] evaluators) |
void |
setHessSampleSize(int hessSize) |
void |
setTerminateOnEvalImprovementNumOfEpoch(int terminateOnEvalImprovementNumOfEpoch) |
void |
shutUp() |
void |
suppressTestPrompt(boolean suppressTestPrompt) |
void |
terminateOnAvgImprovement(boolean toTerminate,
double tolerance) |
void |
terminateOnEvalImprovement(boolean toTerminate) |
boolean |
toContinue(double[] x,
double currEval) |
protected double[] x
protected double initRate
protected double lambda
protected double alpha
protected boolean quiet
protected final int numPasses
protected int bSize
public java.util.List<double[]> yList
public java.util.List<double[]> sList
public double[] diag
protected java.util.Random gen
protected long maxTime
public SGDWithAdaGradAndFOBOS(double initRate, double lambda, int numPasses)
public SGDWithAdaGradAndFOBOS(double initRate, double lambda, int numPasses, int batchSize)
public SGDWithAdaGradAndFOBOS(double initRate, double lambda, int numPasses, int batchSize, java.lang.String priorType, double alpha, boolean useAdaDelta, boolean useAdaDiff, double adaGradEps, double adaDeltaRho)
public void setHessSampleSize(int hessSize)
public void terminateOnEvalImprovement(boolean toTerminate)
public void terminateOnAvgImprovement(boolean toTerminate, double tolerance)
public void suppressTestPrompt(boolean suppressTestPrompt)
public void setTerminateOnEvalImprovementNumOfEpoch(int terminateOnEvalImprovementNumOfEpoch)
public boolean toContinue(double[] x, double currEval)
public void shutUp()
protected java.lang.String getName()
public void setEvaluators(int iters, Evaluator[] evaluators)
setEvaluators
in interface HasEvaluators
public double[] minimize(DiffFunction function, double functionTolerance, double[] initial)
Minimizer
function
starting at initial
, accurate to
within functionTolerance
(normally implemented as
a multiplier of the range value to give range tolerance).minimize
in interface Minimizer<T extends DiffFunction>
function
- The objective functionfunctionTolerance
- A double
valueinitial
- An initial feasible pointpublic double[] minimize(DiffFunction f, double functionTolerance, double[] initial, int maxIterations)
Minimizer
function
starting at initial
, accurate to
within functionTolerance
(normally implemented as
a multiplier of the range value to give range tolerance), but
running only for at most maxIterations
iterations.minimize
in interface Minimizer<T extends DiffFunction>
f
- The objective functionfunctionTolerance
- A double
valueinitial
- An initial feasible pointmaxIterations
- Maximum number of iterationsprotected void sayln(java.lang.String s)
protected void say(java.lang.String s)