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 |
hasPerfectSolution(Population population)
Used to assert whether a given population contains a perfect solution
to the problem.
|
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. |
addTestCase, clearTestCases, getTestCases, hasImprovement, 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 hasPerfectSolution(Population population)
Problem
hasPerfectSolution
in class Problem
population
- the population to search through for a perfect chromosome.