yawn.optim.genetic
Class JGapAdapter

java.lang.Object
  extended by org.jgap.FitnessFunction
      extended by yawn.optim.genetic.JGapAdapter
All Implemented Interfaces:
java.io.Serializable, OptimizationAdapter
Direct Known Subclasses:
FuzzyArtMapJGapAdapter

public abstract class JGapAdapter
extends org.jgap.FitnessFunction
implements OptimizationAdapter

This is yawn.optim.JGapAdapter, part of the yawn project.
$Id: JGapAdapter.java,v 1.3 2005/04/07 17:28:26 supermarti Exp $

Version:
$Revision: 1.3 $
Author:
Luis Martí (luis dot marti at uc3m dot es)
See Also:
Serialized Form

Field Summary
protected  InputOutputPattern[] evalSet
           
protected  NeuralNetworkConfig templateConfig
           
protected  InputOutputPattern[] trainingSet
           
 
Constructor Summary
protected JGapAdapter(NeuralNetworkConfig config)
           
 
Method Summary
protected abstract  NeuralNetwork buildNeuralNetworkFromChromosome(org.jgap.Chromosome chromosome)
           
protected  double evaluate(org.jgap.Chromosome arg0)
           
 InputOutputPattern[] getEvalSet()
           
abstract  org.jgap.Chromosome getSampleChromosome()
          Returns a valid sample org.jgap.Chromosome to be used for optimization
 NeuralNetworkConfig getTemplateConfig()
           
 InputOutputPattern[] getTrainingSet()
           
 void setEvalSet(InputOutputPattern[] evalSet)
           
 void setTemplateConfig(NeuralNetworkConfig templateConfig)
           
 void setTrainingSet(InputOutputPattern[] iops)
           
 
Methods inherited from class org.jgap.FitnessFunction
getFitnessValue, getNoFitnessValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

templateConfig

protected NeuralNetworkConfig templateConfig

trainingSet

protected InputOutputPattern[] trainingSet

evalSet

protected InputOutputPattern[] evalSet
Constructor Detail

JGapAdapter

protected JGapAdapter(NeuralNetworkConfig config)
Method Detail

getSampleChromosome

public abstract org.jgap.Chromosome getSampleChromosome()
Returns a valid sample org.jgap.Chromosome to be used for optimization

Returns:

buildNeuralNetworkFromChromosome

protected abstract NeuralNetwork buildNeuralNetworkFromChromosome(org.jgap.Chromosome chromosome)

evaluate

protected double evaluate(org.jgap.Chromosome arg0)
Specified by:
evaluate in class org.jgap.FitnessFunction

getTrainingSet

public InputOutputPattern[] getTrainingSet()
Returns:
Returns the trainingSet.

setTrainingSet

public void setTrainingSet(InputOutputPattern[] iops)
Parameters:
trainingSet - The trainingSet to set.

getTemplateConfig

public NeuralNetworkConfig getTemplateConfig()
Returns:
Returns the templateConfig.

setTemplateConfig

public void setTemplateConfig(NeuralNetworkConfig templateConfig)
Parameters:
templateConfig - The templateConfig to set.

getEvalSet

public InputOutputPattern[] getEvalSet()
Returns:
Returns the evalSet.

setEvalSet

public void setEvalSet(InputOutputPattern[] evalSet)
Parameters:
evalSet - The evalSet to set.


Copyright © 2003-2005 GIAA, Universidad Carlos III de Madrid. All Rights Reserved.