net.sourceforge.cilib.neuralnetwork.foundation
Class EvaluationMediator

java.lang.Object
  extended by net.sourceforge.cilib.algorithm.Algorithm
      extended by net.sourceforge.cilib.algorithm.SingularAlgorithm
          extended by net.sourceforge.cilib.neuralnetwork.foundation.EvaluationMediator
All Implemented Interfaces:
Serializable, Runnable, Cloneable
Direct Known Subclasses:
FFNNEvaluationMediator, SAILAEvaluationMediator

public class EvaluationMediator
extends SingularAlgorithm

Author:
stefanv
See Also:
Serialized Form

Field Summary
protected  NeuralNetworkData data
           
protected  NNError[] errorDg
           
protected  NNError[] errorDt
           
protected  NNError[] errorDv
           
protected  int nrEvaluationsPerEpoch
           
protected  NNError[] prototypeError
           
protected  NeuralNetworkTopology topology
           
protected  int totalEvaluations
           
protected  TrainingStrategy trainer
           
 
Fields inherited from class net.sourceforge.cilib.algorithm.Algorithm
optimisationProblem
 
Constructor Summary
EvaluationMediator()
           
 
Method Summary
 void addPrototypError(NNError proto)
           
 void algorithmIteration()
          The actual operations that the current Algorithm performs within a single iteration.
 void computeErrorIteration(NNError[] err, TypeList output, NNPattern input)
           
 TypeList evaluate(NNPattern p)
           
 void finaliseErrors(NNError[] err)
           
 OptimisationSolution getBestSolution()
          Get the best current solution.
 Algorithm getClone()
          Create a cloned copy of the current object and return it.
 NeuralNetworkData getData()
           
 EpochStrategy getEpochStrategy()
           
 NNError[] getErrorDg()
           
 NNError[] getErrorDt()
           
 NNError[] getErrorDv()
           
 int getNrEvaluationsPerEpoch()
           
 NNError[] getPrototypeError()
           
 List<OptimisationSolution> getSolutions()
          Get the collection of best solutions.
 NeuralNetworkTopology getTopology()
           
 int getTotalEvaluations()
           
 TrainingStrategy getTrainer()
           
 void incrementEvaluationsPerEpoch()
           
 void performInitialisation()
          Perform the needed initialisation required before the execution of the algorithm starts.
 void performLearning()
           
 void resetError(NNError[] err)
           
 void setData(NeuralNetworkData data)
           
 void setEpochStrategy(EpochStrategy epochStrategy)
           
 void setErrorDg(NNError[] errorDg)
           
 void setErrorDt(NNError[] errorDt)
           
 void setErrorDv(NNError[] errorDv)
           
 void setErrorNoOutputs(NNError[] err, int nr)
           
 void setErrorNoPatterns(NNError[] err, int nr)
           
 void setTopology(NeuralNetworkTopology topology)
           
 void setTrainer(TrainingStrategy trainer)
           
 
Methods inherited from class net.sourceforge.cilib.algorithm.Algorithm
addAlgorithmListener, addStoppingCondition, get, getAlgorithmList, getIterations, getOptimisationProblem, getPercentageComplete, getStoppingConditions, initialise, isFinished, performIteration, performUninitialisation, removeAlgorithmListener, removeStoppingCondition, reset, run, setOptimisationProblem, terminate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prototypeError

protected NNError[] prototypeError

errorDg

protected NNError[] errorDg

errorDt

protected NNError[] errorDt

errorDv

protected NNError[] errorDv

nrEvaluationsPerEpoch

protected int nrEvaluationsPerEpoch

topology

protected NeuralNetworkTopology topology

data

protected NeuralNetworkData data

trainer

protected TrainingStrategy trainer

totalEvaluations

protected int totalEvaluations
Constructor Detail

EvaluationMediator

public EvaluationMediator()
Method Detail

performInitialisation

public void performInitialisation()
Description copied from class: Algorithm
Perform the needed initialisation required before the execution of the algorithm starts.

Overrides:
performInitialisation in class Algorithm

algorithmIteration

public void algorithmIteration()
Description copied from class: SingularAlgorithm
The actual operations that the current Algorithm performs within a single iteration.

Specified by:
algorithmIteration in class SingularAlgorithm

computeErrorIteration

public void computeErrorIteration(NNError[] err,
                                  TypeList output,
                                  NNPattern input)

evaluate

public TypeList evaluate(NNPattern p)

getErrorDg

public NNError[] getErrorDg()

getErrorDt

public NNError[] getErrorDt()

getErrorDv

public NNError[] getErrorDv()

getNrEvaluationsPerEpoch

public int getNrEvaluationsPerEpoch()

getTopology

public NeuralNetworkTopology getTopology()

getTotalEvaluations

public int getTotalEvaluations()

performLearning

public void performLearning()

finaliseErrors

public void finaliseErrors(NNError[] err)

resetError

public void resetError(NNError[] err)

setErrorDg

public void setErrorDg(NNError[] errorDg)

setErrorDt

public void setErrorDt(NNError[] errorDt)

setErrorDv

public void setErrorDv(NNError[] errorDv)

setErrorNoOutputs

public void setErrorNoOutputs(NNError[] err,
                              int nr)

setErrorNoPatterns

public void setErrorNoPatterns(NNError[] err,
                               int nr)

setTopology

public void setTopology(NeuralNetworkTopology topology)

getPrototypeError

public NNError[] getPrototypeError()

addPrototypError

public void addPrototypError(NNError proto)

getData

public NeuralNetworkData getData()

setData

public void setData(NeuralNetworkData data)

getTrainer

public TrainingStrategy getTrainer()

setTrainer

public void setTrainer(TrainingStrategy trainer)

getEpochStrategy

public EpochStrategy getEpochStrategy()

setEpochStrategy

public void setEpochStrategy(EpochStrategy epochStrategy)

getBestSolution

public OptimisationSolution getBestSolution()
Description copied from class: Algorithm
Get the best current solution. This best solution is determined from the personal bests of the particles.

Specified by:
getBestSolution in class Algorithm
Returns:
The OptimisationSolution representing the best solution.

getClone

public Algorithm getClone()
Description copied from class: Algorithm
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface Cloneable
Specified by:
getClone in class Algorithm
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

getSolutions

public List<OptimisationSolution> getSolutions()
Description copied from class: Algorithm
Get the collection of best solutions. This result does not actually make sense in the normal PSO algorithm, but rather in a MultiObjective optimization.

Specified by:
getSolutions in class Algorithm
Returns:
The Collection<OptimisationSolution> containing the solutions.

incrementEvaluationsPerEpoch

public void incrementEvaluationsPerEpoch()


Copyright © 2009 CIRG. All Rights Reserved.