|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.ml.train.strategy.HybridStrategy
public class HybridStrategy
A hybrid stragey allows a secondary training algorithm to be used. Once the primary algorithm is no longer improving by much, the secondary will be used. Using simulated annealing in as a secondary to one of the propagation methods is often a very efficient combination as it can help the propagation method escape a local minimum. This is particularly true with backpropagation.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
void |
init(MLTrain train)
Initialize this strategy. |
void |
postIteration()
Called just after a training iteration. |
void |
preIteration()
Called just before a training iteration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double DEFAULT_MIN_IMPROVEMENT
public static final int DEFAULT_TOLERATE_CYCLES
public static final int DEFAULT_ALTERNATE_CYCLES
| Constructor Detail |
|---|
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.| Method Detail |
|---|
public void init(MLTrain train)
init in interface Strategytrain - The training algorithm.public void postIteration()
postIteration in interface Strategypublic void preIteration()
preIteration in interface Strategy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||