net.sourceforge.cilib.problem
Class FunctionLearningProblem

java.lang.Object
  extended by net.sourceforge.cilib.problem.OptimisationProblemAdapter
      extended by net.sourceforge.cilib.problem.FunctionLearningProblem
All Implemented Interfaces:
Serializable, OptimisationProblem, Problem, Cloneable

public class FunctionLearningProblem
extends OptimisationProblemAdapter

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.cilib.problem.OptimisationProblemAdapter
dataSetBuilder, fitnessEvaluations
 
Constructor Summary
FunctionLearningProblem()
           
FunctionLearningProblem(Function function, int sampleSetSize, double trainingSetPercentage, NeuralNetworkProblem neuralNetwork)
           
FunctionLearningProblem(FunctionLearningProblem copy)
           
 
Method Summary
protected  Fitness calculateFitness(Type solution)
          This bases the fitness of the solution on the trainingSet samples.
 DomainRegistry getBehaviouralDomain()
          Returns the domain component that describes the search space of the needed behavioral characteristics of the problem.
 FunctionLearningProblem getClone()
          Create a cloned copy of the current object and return it.
 DomainRegistry getDomain()
          Returns the domain component that describes the search space for this problem.
 double getError(Object solution)
           
 Function getFunction()
           
 Random getRandom()
           
 int getSampleSetSize()
           
 List<Double[]> getTestingSet()
           
 double getTestingSetPercentage()
           
 List<Double[]> getTrainingSet()
           
 double getTrainingSetPercentage()
           
 void initialise()
           
 void setFunction(Function function)
           
 void setRandom(Random random)
           
 void setSampleSetSize(int sampleSetSize)
           
 void setTestingSet(List<Double[]> testingSet)
           
 void setTestingSetPercentage(double testingSetPercentage)
           
 void setTrainingSet(List<Double[]> trainingSet)
           
 void setTrainingSetPercentage(double trainingSetPercentage)
           
 
Methods inherited from class net.sourceforge.cilib.problem.OptimisationProblemAdapter
accept, changeEnvironment, getChangeStrategy, getDataSetBuilder, getFitness, getFitnessEvaluations, setChangeStrategy, setDataSetBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionLearningProblem

public FunctionLearningProblem()

FunctionLearningProblem

public FunctionLearningProblem(Function function,
                               int sampleSetSize,
                               double trainingSetPercentage,
                               NeuralNetworkProblem neuralNetwork)

FunctionLearningProblem

public FunctionLearningProblem(FunctionLearningProblem copy)
Method Detail

getClone

public FunctionLearningProblem getClone()
Description copied from interface: OptimisationProblem
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 OptimisationProblem
Specified by:
getClone in interface Problem
Specified by:
getClone in interface Cloneable
Specified by:
getClone in class OptimisationProblemAdapter
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

initialise

public void initialise()

calculateFitness

protected Fitness calculateFitness(Type solution)
This bases the fitness of the solution on the trainingSet samples.

Specified by:
calculateFitness in class OptimisationProblemAdapter
Parameters:
solution -
Returns:
The average of all fitness values from the trainingSample set
See Also:
OptimisationProblemAdapter.getFitness(Type, boolean)

getError

public double getError(Object solution)

setFunction

public void setFunction(Function function)

getFunction

public Function getFunction()

setTestingSetPercentage

public void setTestingSetPercentage(double testingSetPercentage)

getTestingSetPercentage

public double getTestingSetPercentage()

setTrainingSetPercentage

public void setTrainingSetPercentage(double trainingSetPercentage)

getTrainingSetPercentage

public double getTrainingSetPercentage()

getTrainingSet

public List<Double[]> getTrainingSet()

setTrainingSet

public void setTrainingSet(List<Double[]> trainingSet)

getTestingSet

public List<Double[]> getTestingSet()

setTestingSet

public void setTestingSet(List<Double[]> testingSet)

getRandom

public Random getRandom()

setRandom

public void setRandom(Random random)

setSampleSetSize

public void setSampleSetSize(int sampleSetSize)

getSampleSetSize

public int getSampleSetSize()

getDomain

public DomainRegistry getDomain()
Description copied from interface: OptimisationProblem
Returns the domain component that describes the search space for this problem.

Returns:
A DomainRegistry object representing the search space.

getBehaviouralDomain

public DomainRegistry getBehaviouralDomain()
Description copied from interface: OptimisationProblem
Returns the domain component that describes the search space of the needed behavioral characteristics of the problem. This is mainly used for ECs, however, the use of behavioral parameters with PSO will be investigated.

Returns:
The domain of the behavioral component


Copyright © 2009 CIRG. All Rights Reserved.