examples.gp.symbolicRegression
Class SymbolicRegression
java.lang.Object
org.jgap.gp.GPProblem
examples.gp.symbolicRegression.SymbolicRegression
public class SymbolicRegression
- extends GPProblem
Method Summary |
GPGenotype |
create()
This method is used for setting up the commands and terminals that can be
used to solve the problem. |
static void |
main(java.lang.String[] args)
Starts the example. |
static void |
myOutputSolution(IGPProgram a_best,
int gen)
Outputs the best solution until now at standard output. |
static void |
readFile(java.lang.String file)
|
static java.lang.Double[][] |
transposeMatrix(java.lang.Double[][] m)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
numInputVariables
public static int numInputVariables
variables
public static Variable[] variables
variableNames
public static java.lang.String[] variableNames
outputVariable
public static java.lang.Integer outputVariable
ignoreVariables
public static int[] ignoreVariables
constants
public static java.util.ArrayList<java.lang.Double> constants
numRows
public static int numRows
data
protected static java.lang.Double[][] data
foundPerfect
public static boolean foundPerfect
minInitDepth
public static int minInitDepth
maxInitDepth
public static int maxInitDepth
populationSize
public static int populationSize
maxCrossoverDepth
public static int maxCrossoverDepth
programCreationMaxTries
public static int programCreationMaxTries
numEvolutions
public static int numEvolutions
verboseOutput
public static boolean verboseOutput
maxNodes
public static int maxNodes
functionProb
public static double functionProb
reproductionProb
public static float reproductionProb
mutationProb
public static float mutationProb
crossoverProb
public static double crossoverProb
dynamizeArityProb
public static float dynamizeArityProb
newChromsPercent
public static double newChromsPercent
tournamentSelectorSize
public static int tournamentSelectorSize
lowerRange
public static double lowerRange
upperRange
public static double upperRange
terminalWholeNumbers
public static boolean terminalWholeNumbers
returnType
public static java.lang.String returnType
presentation
public static java.lang.String presentation
adfArity
public static int adfArity
adfType
public static java.lang.String adfType
useADF
public static boolean useADF
functions
public static java.lang.String[] functions
adfFunctions
public static java.lang.String[] adfFunctions
scaleError
public static double scaleError
bumpPerfect
public static boolean bumpPerfect
bumpValue
public static java.lang.Double bumpValue
startTime
public static long startTime
endTime
public static long endTime
stopCriteria
public static double stopCriteria
showPopulation
public static boolean showPopulation
showSimiliar
public static boolean showSimiliar
SymbolicRegression
public SymbolicRegression(GPConfiguration a_conf)
throws InvalidConfigurationException
- Throws:
InvalidConfigurationException
create
public GPGenotype create()
throws InvalidConfigurationException
- This method is used for setting up the commands and terminals that can be
used to solve the problem.
- Specified by:
create
in class GPProblem
- Returns:
- GPGenotype
- Throws:
InvalidConfigurationException
readFile
public static void readFile(java.lang.String file)
transposeMatrix
public static java.lang.Double[][] transposeMatrix(java.lang.Double[][] m)
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Starts the example.
- Throws:
java.lang.Exception
myOutputSolution
public static void myOutputSolution(IGPProgram a_best,
int gen)
- Outputs the best solution until now at standard output.
This is stolen (and somewhat edited) from GPGenotype.outputSolution
which used log4j.
- Parameters:
a_best
- the fittest ProgramChromosome