public class SymbolicRegressionProblem extends TestCaseProblem<java.lang.Double>
parseData()
must be used to load the desired function
data in the standard CGP .dat format.
SymbolicRegressionFunctions
TestCaseProblem.TestCase<U>
Constructor and Description |
---|
SymbolicRegressionProblem(Resources resources)
Creates a new instance of SymbolicRegressionProblem.
|
Modifier and Type | Method and Description |
---|---|
void |
evaluate(Population population,
Resources resources)
The most important method of the problem type.
|
int |
hasImprovement(Population population)
Used to assert whether a given population has a chromosome that is an improvement over
the current best chromosome.
|
TestCaseProblem.TestCase<java.lang.Double> |
parseTestCase(java.lang.String[] inputs,
java.lang.String[] outputs)
This method is used internally by
addTestCase() in order
to appropriately parse strings into the right data type for the
test cases. |
int |
perfectSolutionFound(Population population)
Used to assert whether a given population contains a perfect solution
to the problem.
|
addTestCase, clearTestCases, getTestCases, parseProblemData
getBestFitness, getFileExtension, getFitnessOrientation, getFunctionSet, reset
getLocalParameters, toString
public SymbolicRegressionProblem(Resources resources)
resources
- a reference to the experiment's resources.public void evaluate(Population population, Resources resources)
Problem
public TestCaseProblem.TestCase<java.lang.Double> parseTestCase(java.lang.String[] inputs, java.lang.String[] outputs)
TestCaseProblem
addTestCase()
in order
to appropriately parse strings into the right data type for the
test cases. Since the data type is problem-dependent, subclasses must
implement this method. This method must return a built TestCase
object from the arguments given.inputs
- the inputs represented as strings.outputs
- the outputs represented as strings.public int perfectSolutionFound(Population population)
Problem
perfectSolutionFound
in class Problem
population
- the population to search through for a perfect chromosome.public int hasImprovement(Population population)
Problem
hasImprovement
in class Problem
population
- the population potentially containing a fitter chromosome.