public class SGDWithAdaGradAndFOBOS<T extends DiffFunction> extends 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 Random |
gen |
protected double |
initRate |
protected double |
lambda |
protected long |
maxTime |
protected int |
numPasses |
protected boolean |
quiet |
List<double[]> |
sList |
protected double[] |
x |
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,
String priorType,
double alpha,
boolean useAdaDelta,
boolean useAdaDiff,
double adaGradEps,
double adaDeltaRho) |
Modifier and Type | Method and Description |
---|---|
protected String |
getName() |
double[] |
minimize(DiffFunction function,
double functionTolerance,
double[] initial)
Attempts to find an unconstrained minimum of the objective
function starting at initial , within
functionTolerance . |
double[] |
minimize(DiffFunction f,
double functionTolerance,
double[] initial,
int maxIterations) |
protected void |
say(String s) |
protected void |
sayln(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 List<double[]> yList
public List<double[]> sList
public double[] diag
protected 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, 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 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
, within
functionTolerance
.minimize
in interface Minimizer<T extends DiffFunction>
function
- the objective functionfunctionTolerance
- a double
valueinitial
- a initial feasible pointpublic double[] minimize(DiffFunction f, double functionTolerance, double[] initial, int maxIterations)
minimize
in interface Minimizer<T extends DiffFunction>
protected void sayln(String s)
protected void say(String s)