org.encog.ml.train.strategy
public class HybridStrategy extends Object implements Strategy
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ALTERNATE_CYCLES
The default number of cycles to use the alternate training for.
|
static double |
DEFAULT_MIN_IMPROVEMENT
The default minimum improvement before we switch to the alternate
training method.
|
static int |
DEFAULT_TOLERATE_CYCLES
The default number of cycles to tolerate bad improvement for.
|
Constructor and Description |
---|
HybridStrategy(MLTrain altTrain)
Construct a hybrid strategy with the default minimum improvement
and toleration cycles.
|
HybridStrategy(MLTrain altTrain,
double minImprovement,
int tolerateMinImprovement,
int alternateCycles)
Create a hybrid strategy.
|
Modifier and Type | Method and Description |
---|---|
void |
init(MLTrain train)
Initialize this strategy.
|
void |
postIteration()
Called just after a training iteration.
|
void |
preIteration()
Called just before a training iteration.
|
public static final double DEFAULT_MIN_IMPROVEMENT
public static final int DEFAULT_TOLERATE_CYCLES
public static final int DEFAULT_ALTERNATE_CYCLES
public HybridStrategy(MLTrain altTrain)
altTrain
- The alternative training strategy.public HybridStrategy(MLTrain altTrain, double minImprovement, int tolerateMinImprovement, int alternateCycles)
altTrain
- The alternate training algorithm.minImprovement
- The minimum improvement to switch algorithms.tolerateMinImprovement
- The number of cycles to tolerate the
minimum improvement for.alternateCycles
- How many cycles should the alternate
training algorithm be used for.public void init(MLTrain train)
public void postIteration()
postIteration
in interface Strategy
public void preIteration()
preIteration
in interface Strategy
Copyright © 2014. All Rights Reserved.