- All Implemented Interfaces:
public class CrossValidationKFoldextends CrossTrainingTrain using K-Fold cross validation. Each iteration will train a number of times equal to the number of folds - 1. Each of these sub iterations will train all of the data minus the fold. The fold is used to validate. Therefore, you are seeing an error that reflects data that was not always used as part of training. This should give you a better error result based on how the network will perform on non-trained data.(validation). The cross validation trainer must be provided with some other sort of trainer, perhaps RPROP, to actually perform the training. The training data must be the FoldedDataSet. The folded dataset can wrap most other training sets.
Constructors Constructor and Description
CrossValidationKFold(MLTrain train, int k)Construct a cross validation trainer.
Methods Modifier and Type Method and Description
iteration()Perform one iteration.
pause()Pause the training to continue later.
resume(TrainingContinuation state)Resume training.
Methods inherited from class org.encog.neural.networks.training.cross.CrossTraining
Methods inherited from class org.encog.ml.train.BasicTraining
addStrategy, finishTraining, getError, getImplementationType, getIteration, getStrategies, getTraining, isTrainingDone, iteration, postIteration, preIteration, setError, setIteration, setTraining
public CrossValidationKFold(MLTrain train, int k)Construct a cross validation trainer.
train- The training
k- The number of folds.
public void iteration()Perform one iteration.
public boolean canContinue()
- True if the training can be paused, and later continued.
public TrainingContinuation pause()Pause the training to continue later.
- A training continuation object.
public void resume(TrainingContinuation state)Resume training.
state- The training continuation object to use to continue.
SCaVis 2.0 © jWork.ORG