public class ScaledSGDMinimizer<Q extends AbstractStochasticCachingDiffFunction> extends StochasticMinimizer<Q>
Modifier and Type | Class and Description |
---|---|
static class |
ScaledSGDMinimizer.Weights |
StochasticMinimizer.PropertySetter<T1>
Modifier and Type | Field and Description |
---|---|
double[] |
diag |
java.util.List<double[]> |
sList |
java.util.List<double[]> |
yList |
Constructor and Description |
---|
ScaledSGDMinimizer(double SGDGain,
int batchSize) |
ScaledSGDMinimizer(double SGDGain,
int batchSize,
int sgdPasses) |
ScaledSGDMinimizer(double SGDGain,
int batchSize,
int sgdPasses,
int method) |
ScaledSGDMinimizer(double SGDGain,
int batchSize,
int sgdPasses,
int method,
boolean outputToFile) |
Modifier and Type | Method and Description |
---|---|
static double[] |
getDiag(java.lang.String loadPath) |
java.lang.String |
getName() |
static double[] |
getWeights(java.lang.String loadPath) |
protected void |
init(AbstractStochasticCachingDiffFunction func) |
static void |
serializeWeights(java.lang.String serializePath,
double[] weights) |
static void |
serializeWeights(java.lang.String serializePath,
double[] weights,
double[] diag) |
void |
setBatchSize(int batchSize) |
void |
setMaxTime(java.lang.Long max) |
void |
shutUp() |
protected void |
takeStep(AbstractStochasticCachingDiffFunction dfunction) |
Pair<java.lang.Integer,java.lang.Double> |
tune(Function function,
double[] initial,
long msPerTest) |
double |
tuneFixedGain(Function function,
double[] initial,
long msPerTest,
double fixedStart) |
void |
updateDiagBFGS(double[] diag,
double[] s,
double[] y) |
gainSchedule, minimize, minimize, say, sayln, setEvaluators, smooth, tune, tuneBatch, tuneDouble, tuneDouble, tuneGain
public java.util.List<double[]> yList
public java.util.List<double[]> sList
public double[] diag
public ScaledSGDMinimizer(double SGDGain, int batchSize, int sgdPasses)
public ScaledSGDMinimizer(double SGDGain, int batchSize, int sgdPasses, int method)
public ScaledSGDMinimizer(double SGDGain, int batchSize, int sgdPasses, int method, boolean outputToFile)
public ScaledSGDMinimizer(double SGDGain, int batchSize)
public double tuneFixedGain(Function function, double[] initial, long msPerTest, double fixedStart)
public Pair<java.lang.Integer,java.lang.Double> tune(Function function, double[] initial, long msPerTest)
tune
in class StochasticMinimizer<Q extends AbstractStochasticCachingDiffFunction>
public void shutUp()
shutUp
in class StochasticMinimizer<Q extends AbstractStochasticCachingDiffFunction>
public void setBatchSize(int batchSize)
public void setMaxTime(java.lang.Long max)
public java.lang.String getName()
getName
in class StochasticMinimizer<Q extends AbstractStochasticCachingDiffFunction>
protected void takeStep(AbstractStochasticCachingDiffFunction dfunction)
takeStep
in class StochasticMinimizer<Q extends AbstractStochasticCachingDiffFunction>
protected void init(AbstractStochasticCachingDiffFunction func)
init
in class StochasticMinimizer<Q extends AbstractStochasticCachingDiffFunction>
public void updateDiagBFGS(double[] diag, double[] s, double[] y)
public static void serializeWeights(java.lang.String serializePath, double[] weights)
public static void serializeWeights(java.lang.String serializePath, double[] weights, double[] diag)
public static double[] getWeights(java.lang.String loadPath) throws java.io.IOException, java.lang.ClassCastException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassCastException
java.lang.ClassNotFoundException
public static double[] getDiag(java.lang.String loadPath) throws java.io.IOException, java.lang.ClassCastException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassCastException
java.lang.ClassNotFoundException