FitnessEvaluation.SymbolicRegression
Class SymbolicRegressionInterpreter

java.lang.Object
  extended by FitnessEvaluation.SymbolicRegression.SymbolicRegressionInterpreter
All Implemented Interfaces:
FitnessFunction, ParameterI, Stochastic

public class SymbolicRegressionInterpreter
extends java.lang.Object
implements FitnessFunction, Stochastic

Interpreter for symbolic regression.

Author:
erikhemberg

Constructor Summary
SymbolicRegressionInterpreter()
           
 
Method Summary
 void calculateTarget(java.lang.String target)
          Calcualte the value of the target function for each data point in the sample.
 boolean canCache()
          Return true if it is ok to cache the results of the fitness function
 void getFitness(Individual ind)
          Split the phenotype of the individual.
 Range getRange()
           
 RandomNumberGenerator getRNG()
          Get the number generator
 void setProperties(java.util.Properties p)
          Set properties
 void setRange(Range range)
           
 void setRNG(RandomNumberGenerator m)
          Set the number generator
 void setSamples(double[][] samples)
           
 void setX(double[] x)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SymbolicRegressionInterpreter

public SymbolicRegressionInterpreter()
Method Detail

getRange

public Range getRange()

setRange

public void setRange(Range range)

calculateTarget

public void calculateTarget(java.lang.String target)
Calcualte the value of the target function for each data point in the sample.

Parameters:
target - target function in prefix notation

setProperties

public void setProperties(java.util.Properties p)
Description copied from interface: ParameterI
Set properties

Specified by:
setProperties in interface ParameterI
Parameters:
p - object containing properties

getRNG

public RandomNumberGenerator getRNG()
Description copied from interface: Stochastic
Get the number generator

Specified by:
getRNG in interface Stochastic
Returns:
number generator

setRNG

public void setRNG(RandomNumberGenerator m)
Description copied from interface: Stochastic
Set the number generator

Specified by:
setRNG in interface Stochastic
Parameters:
m - number generator

getFitness

public void getFitness(Individual ind)
Split the phenotype of the individual. Calculate the fitness as the sum of the squared distance to the target. Errors in the calculation will lead to default fitness

Specified by:
getFitness in interface FitnessFunction
Parameters:
ind - Individual that will be evaluated and assigned fitness

canCache

public boolean canCache()
Description copied from interface: FitnessFunction
Return true if it is ok to cache the results of the fitness function

Specified by:
canCache in interface FitnessFunction

setSamples

public void setSamples(double[][] samples)

setX

public void setX(double[] x)