public abstract class IterableTrainer extends Trainer
Modifier and Type | Class and Description |
---|---|
static class |
IterableTrainer.StoppingCondition
Stopping condition.
|
Trainer.DataNotInitializedException
Constructor and Description |
---|
IterableTrainer(Trainable network)
Construct the iterable trainer.
|
Modifier and Type | Method and Description |
---|---|
void |
addErrorListener(ErrorListener errorListener)
Add an error listener.
|
void |
fireErrorUpdated()
Notify listeners that the error value has been updated.
|
abstract double |
getError()
Get the current MSE error.
|
java.util.List<ErrorListener> |
getErrorListeners() |
double |
getErrorThreshold() |
int |
getIteration()
Return the current iteration.
|
int |
getIterationsBeforeStopping() |
protected int |
getMinimumNumRows(Trainable network)
Returns the number of rows in whichever dataset has fewer rows.
|
ComboBoxWrapper |
getStoppingCond()
Returns the current solution type inside a comboboxwrapper.
|
IterableTrainer.StoppingCondition |
getStoppingCondition() |
double |
getValidationError()
Get the current MSE error.
|
void |
incrementIteration()
Increment the iteration number by 1.
|
boolean |
isUpdateCompleted() |
void |
iterate()
Iterate the training algorithm and stop iteration based on the selected
stopping condition.
|
abstract void |
randomize()
Randomize the network being trained.
|
void |
removeErrorListener(ErrorListener errorListener)
Remove an error listener.
|
void |
setErrorThreshold(double errorThreshold) |
void |
setIteration(int iteration) |
void |
setIterationsBeforeStopping(int iterationsBeforeStopping) |
void |
setStoppingCond(ComboBoxWrapper stoppingConditionWrapper)
Set the current stopping condition.
|
void |
setStoppingCondition(IterableTrainer.StoppingCondition stoppingCondition) |
void |
setUpdateCompleted(boolean updateCompleted)
Sets updated completed value.
|
addListener, apply, fireProgressUpdate, fireTrainingBegin, fireTrainingEnd, getListeners, getTrainable, getTrainableNetwork, removeListener, revalidateSynapseGroups
public IterableTrainer(Trainable network)
network
- the trainable networkpublic abstract double getError()
public abstract void randomize()
public double getValidationError()
public void iterate() throws Trainer.DataNotInitializedException
DataNotInitializedException
- if input or target data not setTrainer.DataNotInitializedException
public void fireErrorUpdated()
public boolean isUpdateCompleted()
public void setUpdateCompleted(boolean updateCompleted)
updateCompleted
- Updated completed value to be setpublic void incrementIteration()
public void setIteration(int iteration)
iteration
- the iteration to setpublic int getIteration()
public java.util.List<ErrorListener> getErrorListeners()
public void addErrorListener(ErrorListener errorListener)
errorListener
- the listener to addpublic void removeErrorListener(ErrorListener errorListener)
errorListener
- the listener to removeprotected int getMinimumNumRows(Trainable network)
public IterableTrainer.StoppingCondition getStoppingCondition()
public void setStoppingCondition(IterableTrainer.StoppingCondition stoppingCondition)
stoppingCondition
- the stoppingCondition to setpublic int getIterationsBeforeStopping()
public void setIterationsBeforeStopping(int iterationsBeforeStopping)
iterationsBeforeStopping
- the number of iterations before stopping.public ComboBoxWrapper getStoppingCond()
public void setStoppingCond(ComboBoxWrapper stoppingConditionWrapper)
stoppingConditionWrapper
- the current solution set up for combo box.public double getErrorThreshold()
public void setErrorThreshold(double errorThreshold)
errorThreshold
- the errorThreshold to set