public class SymbolicRegressionProblem extends TestCaseProblem<java.lang.Double>
parseData() must be used to load the desired function
data in the standard CGP .dat format.
SymbolicRegressionFunctionsTestCaseProblem.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, parseProblemDatagetBestFitness, getFileExtension, getFitnessOrientation, getFunctionSet, resetgetLocalParameters, toStringpublic SymbolicRegressionProblem(Resources resources)
resources - a reference to the experiment's resources.public void evaluate(Population population, Resources resources)
Problempublic TestCaseProblem.TestCase<java.lang.Double> parseTestCase(java.lang.String[] inputs, java.lang.String[] outputs)
TestCaseProblemaddTestCase() 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)
ProblemperfectSolutionFound in class Problempopulation - the population to search through for a perfect chromosome.public int hasImprovement(Population population)
ProblemhasImprovement in class Problempopulation - the population potentially containing a fitter chromosome.