org.encog.ml.svm.training
Class SVMSearchTrain
- java.lang.Object
-
- org.encog.ml.train.BasicTraining
-
- org.encog.ml.svm.training.SVMSearchTrain
-
- All Implemented Interfaces:
- MLTrain
public class SVMSearchTrain extends BasicTraining
Provides training for Support Vector Machine networks.
-
-
Field Summary
Fields Modifier and Type Field and Description static doubleDEFAULT_CONST_BEGINThe default starting number for C.static doubleDEFAULT_CONST_ENDThe default ending number for C.static doubleDEFAULT_CONST_STEPThe default step for C.static doubleDEFAULT_GAMMA_BEGINThe default gamma begin.static doubleDEFAULT_GAMMA_ENDThe default gamma end.static doubleDEFAULT_GAMMA_STEPThe default gamma step.
-
Constructor Summary
Constructors Constructor and Description SVMSearchTrain(SVM method, MLDataSet training)Construct a trainer for an SVM network.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleancanContinue()voidfinishTraining()Should be called after training has completed and the iteration method will not be called any further.doublegetBestConst()doublegetBestGamma()doublegetConstBegin()doublegetConstEnd()doublegetConstStep()intgetFold()doublegetGammaBegin()doublegetGammaEnd()doublegetGammaStep()MLMethodgetMethod()Get the current best machine learning method from the training.booleanisTrainingDone()voiditeration()Perform one training iteration.TrainingContinuationpause()Pause the training to continue later.voidresume(TrainingContinuation state)Resume training.voidsetBestConst(double bestConst)voidsetBestGamma(double bestGamma)voidsetConstBegin(double theConstBegin)voidsetConstEnd(double theConstEnd)voidsetConstStep(double theConstStep)voidsetFold(int theFold)voidsetGammaBegin(double theGammaBegin)voidsetGammaEnd(double theGammaEnd)voidsetGammaStep(double theGammaStep)-
Methods inherited from class org.encog.ml.train.BasicTraining
addStrategy, getError, getImplementationType, getIteration, getStrategies, getTraining, iteration, postIteration, preIteration, setError, setIteration, setTraining
-
-
-
-
Field Detail
-
DEFAULT_CONST_BEGIN
public static final double DEFAULT_CONST_BEGIN
The default starting number for C.- See Also:
- Constant Field Values
-
DEFAULT_CONST_END
public static final double DEFAULT_CONST_END
The default ending number for C.- See Also:
- Constant Field Values
-
DEFAULT_CONST_STEP
public static final double DEFAULT_CONST_STEP
The default step for C.- See Also:
- Constant Field Values
-
DEFAULT_GAMMA_BEGIN
public static final double DEFAULT_GAMMA_BEGIN
The default gamma begin.- See Also:
- Constant Field Values
-
DEFAULT_GAMMA_END
public static final double DEFAULT_GAMMA_END
The default gamma end.- See Also:
- Constant Field Values
-
DEFAULT_GAMMA_STEP
public static final double DEFAULT_GAMMA_STEP
The default gamma step.- See Also:
- Constant Field Values
-
-
Method Detail
-
canContinue
public boolean canContinue()
- Returns:
- True if the training can be paused, and later continued.
-
finishTraining
public void finishTraining()
Should be called after training has completed and the iteration method will not be called any further.- Specified by:
finishTrainingin interfaceMLTrain- Overrides:
finishTrainingin classBasicTraining
-
getConstBegin
public double getConstBegin()
- Returns:
- the constBegin
-
getConstEnd
public double getConstEnd()
- Returns:
- the constEnd
-
getConstStep
public double getConstStep()
- Returns:
- the constStep
-
getFold
public int getFold()
- Returns:
- the fold
-
getGammaBegin
public double getGammaBegin()
- Returns:
- the gammaBegin
-
getGammaEnd
public double getGammaEnd()
- Returns:
- the gammaEnd
-
getGammaStep
public double getGammaStep()
- Returns:
- the gammaStep
-
getMethod
public MLMethod getMethod()
Get the current best machine learning method from the training.- Returns:
- The best machine learning method.
-
isTrainingDone
public boolean isTrainingDone()
- Specified by:
isTrainingDonein interfaceMLTrain- Overrides:
isTrainingDonein classBasicTraining- Returns:
- True if the training is done.
-
iteration
public void iteration()
Perform one training iteration.
-
pause
public TrainingContinuation pause()
Pause the training to continue later.- Returns:
- A training continuation object.
-
resume
public void resume(TrainingContinuation state)
Resume training.- Parameters:
state- The training continuation object to use to continue.
-
setConstBegin
public void setConstBegin(double theConstBegin)
- Parameters:
theConstBegin- the constBegin to set
-
setConstEnd
public void setConstEnd(double theConstEnd)
- Parameters:
theConstEnd- the constEnd to set
-
setConstStep
public void setConstStep(double theConstStep)
- Parameters:
theConstStep- the constStep to set
-
setFold
public void setFold(int theFold)
- Parameters:
theFold- the fold to set
-
setGammaBegin
public void setGammaBegin(double theGammaBegin)
- Parameters:
theGammaBegin- the gammaBegin to set
-
setGammaEnd
public final void setGammaEnd(double theGammaEnd)
- Parameters:
theGammaEnd- the gammaEnd to set.
-
setGammaStep
public final void setGammaStep(double theGammaStep)
- Parameters:
theGammaStep- the gammaStep to set
-
getBestConst
public double getBestConst()
- Returns:
- the bestConst
-
setBestConst
public void setBestConst(double bestConst)
- Parameters:
bestConst- the bestConst to set
-
getBestGamma
public double getBestGamma()
- Returns:
- the bestGamma
-
setBestGamma
public void setBestGamma(double bestGamma)
- Parameters:
bestGamma- the bestGamma to set
-
-
DMelt 3.0 © DataMelt by jWork.ORG