org.encog.neural.networks.training.pnn
public class TrainBasicPNN extends BasicTraining implements CalculationCriteria
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_MAX_ERROR
The default max error.
|
static double |
DEFAULT_MIN_IMPROVEMENT
The default minimum improvement before stop.
|
static int |
DEFAULT_NUM_SIGMAS
The default number of sigmas to evaluate between the low and high.
|
static double |
DEFAULT_SIGMA_HIGH
The default sigma high value.
|
static double |
DEFAULT_SIGMA_LOW
THe default sigma low value.
|
Constructor and Description |
---|
TrainBasicPNN(BasicPNN network,
MLDataSet training)
Train a BasicPNN.
|
Modifier and Type | Method and Description |
---|---|
double |
calcErrorWithMultipleSigma(double[] x,
double[] der1,
double[] der2,
boolean der)
Calculate the error with multiple sigmas.
|
double |
calcErrorWithSingleSigma(double sig)
Calculate the error using a common sigma.
|
double |
calculateError(MLDataSet training,
boolean deriv)
Calculate the error for the entire training set.
|
boolean |
canContinue() |
MLData |
computeDeriv(MLData input,
MLData target)
Compute the derivative for target data.
|
double |
getMaxError() |
MLMethod |
getMethod()
Get the current best machine learning method from the training.
|
double |
getMinImprovement() |
int |
getNumSigmas() |
double |
getSigmaHigh() |
double |
getSigmaLow() |
void |
iteration()
Perform one iteration of training.
|
TrainingContinuation |
pause()
Pause the training to continue later.
|
void |
resume(TrainingContinuation state)
Resume training.
|
void |
setMaxError(double maxError) |
void |
setMinImprovement(double minImprovement) |
void |
setNumSigmas(int numSigmas) |
void |
setSigmaHigh(double sigmaHigh) |
void |
setSigmaLow(double sigmaLow) |
addStrategy, finishTraining, getError, getImplementationType, getIteration, getStrategies, getTraining, isTrainingDone, iteration, postIteration, preIteration, setError, setIteration, setTraining
public static final double DEFAULT_MAX_ERROR
public static final double DEFAULT_MIN_IMPROVEMENT
public static final double DEFAULT_SIGMA_LOW
public static final double DEFAULT_SIGMA_HIGH
public static final int DEFAULT_NUM_SIGMAS
public double calcErrorWithMultipleSigma(double[] x, double[] der1, double[] der2, boolean der)
calcErrorWithMultipleSigma
in interface CalculationCriteria
x
- The data.der1
- The first derivative.der2
- The 2nd derivatives.der
- Calculate the derivative.public double calcErrorWithSingleSigma(double sig)
calcErrorWithSingleSigma
in interface CalculationCriteria
sig
- The sigma to use.public double calculateError(MLDataSet training, boolean deriv)
training
- Training set to use.deriv
- Should we find the derivative.public boolean canContinue()
canContinue
in interface MLTrain
public MLData computeDeriv(MLData input, MLData target)
input
- The input.target
- The target data.public double getMaxError()
public MLMethod getMethod()
public double getMinImprovement()
public int getNumSigmas()
public double getSigmaHigh()
public double getSigmaLow()
public void iteration()
public TrainingContinuation pause()
public void resume(TrainingContinuation state)
public void setMaxError(double maxError)
maxError
- the maxError to setpublic void setMinImprovement(double minImprovement)
minImprovement
- the minImprovement to setpublic void setNumSigmas(int numSigmas)
numSigmas
- the numSigmas to setpublic void setSigmaHigh(double sigmaHigh)
sigmaHigh
- the sigmaHigh to setpublic void setSigmaLow(double sigmaLow)
sigmaLow
- the sigmaLow to setCopyright © 2014. All Rights Reserved.