ec.app.regression
Class Benchmarks
- java.lang.Object
-
- ec.Problem
-
- ec.gp.GPProblem
-
- ec.app.regression.Benchmarks
-
- All Implemented Interfaces:
- Prototype, Setup, SimpleProblemForm, java.io.Serializable, java.lang.Cloneable
public class Benchmarks extends GPProblem implements SimpleProblemForm
Benchmarks by various people in the literature.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description double[]currentValuestatic java.lang.String[]fsstatic java.lang.String[][]fs_varsstatic intKEIJZER1static intKEIJZER10static intKEIJZER11static intKEIJZER12static intKEIJZER13static intKEIJZER14static intKEIJZER15static intKEIJZER2static intKEIJZER3static intKEIJZER4static intKEIJZER5static intKEIJZER6static intKEIJZER7static intKEIJZER8static intKEIJZER9static intKORNS1static intKORNS10static intKORNS11static intKORNS12static intKORNS13static intKORNS14static intKORNS15static intKORNS2static intKORNS3static intKORNS4static intKORNS5static intKORNS6static intKORNS7static intKORNS8static intKORNS9static intKOZA1static intKOZA2static intKOZA3static java.lang.String[]namesstatic intNGUYEN1static intNGUYEN10static intNGUYEN2static intNGUYEN3static intNGUYEN4static intNGUYEN5static intNGUYEN6static intNGUYEN7static intNGUYEN8static intNGUYEN9static java.lang.StringP_PROBLEM_TYPEstatic java.lang.StringP_TESTING_FILEstatic java.lang.StringP_TRAINING_FILEstatic intPAGIE1static intPAGIE2double[][]testingInputsdouble[]testingOutputsdouble[][]trainingInputsdouble[]trainingOutputsstatic intVLADISLAVLEVA1static intVLADISLAVLEVA2static intVLADISLAVLEVA3static intVLADISLAVLEVA4static intVLADISLAVLEVA5static intVLADISLAVLEVA6static intVLADISLAVLEVA7static intVLADISLAVLEVA8
-
Constructor Summary
Constructors Constructor and Description Benchmarks()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddescribe(EvolutionState state, Individual ind, int subpopulation, int threadnum, int log)Part of SimpleProblemForm.doubleerror(double result, double expectedResult)Returns the error between the result and the expected result of a single data point.voidevaluate(EvolutionState state, Individual ind, int subpopulation, int threadnum)Evaluates the individual in ind, if necessary (perhaps not evaluating them if their evaluated flags are true), and sets their fitness appropriately.doublefunc(EvolutionState state, double[] xs, int benchmark)Return the function applied to the given data by benchmark problem.double[][]generateIntervalSpacedSamples(EvolutionState state, double[] min, double[] max, double[] interval, int threadnum)Produce sample points evenly spaced out between min and max in each dimension, with the given spacing interval per-dimension.double[][]generateIntervalSpacedSamples(EvolutionState state, double min, double max, double interval, int threadnum)Produce sample points evenly spaced out between min and max in one dimension, with the given spacing interval.double[][]generateRandomSamples(EvolutionState state, double[] min, double[] max, int numPoints, int threadnum)Produce random sample points between min and max, inclusive, in each dimension.double[][]generateRandomSamples(EvolutionState state, double min, double max, int numPoints, int threadnum)Produce random sample points between min and max, inclusive, in one dimension.voidsetup(EvolutionState state, Parameter base)Sets up the object by reading it from the parameters stored in state, built off of the parameter base base.double[][]testPoints(EvolutionState state, int benchmark, int threadnum, double[][] trainpoints)Produce test sample points for a given benchmark problem, to test generalization.double[][]trainPoints(EvolutionState state, int benchmark, int threadnum)Produce sample points for a given benchmark problem.-
Methods inherited from class ec.gp.GPProblem
clone, defaultBase
-
Methods inherited from class ec.Problem
canEvaluate, closeContacts, describe, finishEvaluating, initializeContacts, prepareToEvaluate, reinitializeContacts
-
-
-
-
Field Detail
-
KOZA1
public static final int KOZA1
- See Also:
- Constant Field Values
-
KOZA2
public static final int KOZA2
- See Also:
- Constant Field Values
-
KOZA3
public static final int KOZA3
- See Also:
- Constant Field Values
-
NGUYEN1
public static final int NGUYEN1
- See Also:
- Constant Field Values
-
NGUYEN2
public static final int NGUYEN2
- See Also:
- Constant Field Values
-
NGUYEN3
public static final int NGUYEN3
- See Also:
- Constant Field Values
-
NGUYEN4
public static final int NGUYEN4
- See Also:
- Constant Field Values
-
NGUYEN5
public static final int NGUYEN5
- See Also:
- Constant Field Values
-
NGUYEN6
public static final int NGUYEN6
- See Also:
- Constant Field Values
-
NGUYEN7
public static final int NGUYEN7
- See Also:
- Constant Field Values
-
NGUYEN8
public static final int NGUYEN8
- See Also:
- Constant Field Values
-
NGUYEN9
public static final int NGUYEN9
- See Also:
- Constant Field Values
-
NGUYEN10
public static final int NGUYEN10
- See Also:
- Constant Field Values
-
PAGIE1
public static final int PAGIE1
- See Also:
- Constant Field Values
-
PAGIE2
public static final int PAGIE2
- See Also:
- Constant Field Values
-
KORNS1
public static final int KORNS1
- See Also:
- Constant Field Values
-
KORNS2
public static final int KORNS2
- See Also:
- Constant Field Values
-
KORNS3
public static final int KORNS3
- See Also:
- Constant Field Values
-
KORNS4
public static final int KORNS4
- See Also:
- Constant Field Values
-
KORNS5
public static final int KORNS5
- See Also:
- Constant Field Values
-
KORNS6
public static final int KORNS6
- See Also:
- Constant Field Values
-
KORNS7
public static final int KORNS7
- See Also:
- Constant Field Values
-
KORNS8
public static final int KORNS8
- See Also:
- Constant Field Values
-
KORNS9
public static final int KORNS9
- See Also:
- Constant Field Values
-
KORNS10
public static final int KORNS10
- See Also:
- Constant Field Values
-
KORNS11
public static final int KORNS11
- See Also:
- Constant Field Values
-
KORNS12
public static final int KORNS12
- See Also:
- Constant Field Values
-
KORNS13
public static final int KORNS13
- See Also:
- Constant Field Values
-
KORNS14
public static final int KORNS14
- See Also:
- Constant Field Values
-
KORNS15
public static final int KORNS15
- See Also:
- Constant Field Values
-
KEIJZER1
public static final int KEIJZER1
- See Also:
- Constant Field Values
-
KEIJZER2
public static final int KEIJZER2
- See Also:
- Constant Field Values
-
KEIJZER3
public static final int KEIJZER3
- See Also:
- Constant Field Values
-
KEIJZER4
public static final int KEIJZER4
- See Also:
- Constant Field Values
-
KEIJZER5
public static final int KEIJZER5
- See Also:
- Constant Field Values
-
KEIJZER6
public static final int KEIJZER6
- See Also:
- Constant Field Values
-
KEIJZER7
public static final int KEIJZER7
- See Also:
- Constant Field Values
-
KEIJZER8
public static final int KEIJZER8
- See Also:
- Constant Field Values
-
KEIJZER9
public static final int KEIJZER9
- See Also:
- Constant Field Values
-
KEIJZER10
public static final int KEIJZER10
- See Also:
- Constant Field Values
-
KEIJZER11
public static final int KEIJZER11
- See Also:
- Constant Field Values
-
KEIJZER12
public static final int KEIJZER12
- See Also:
- Constant Field Values
-
KEIJZER13
public static final int KEIJZER13
- See Also:
- Constant Field Values
-
KEIJZER14
public static final int KEIJZER14
- See Also:
- Constant Field Values
-
KEIJZER15
public static final int KEIJZER15
- See Also:
- Constant Field Values
-
VLADISLAVLEVA1
public static final int VLADISLAVLEVA1
- See Also:
- Constant Field Values
-
VLADISLAVLEVA2
public static final int VLADISLAVLEVA2
- See Also:
- Constant Field Values
-
VLADISLAVLEVA3
public static final int VLADISLAVLEVA3
- See Also:
- Constant Field Values
-
VLADISLAVLEVA4
public static final int VLADISLAVLEVA4
- See Also:
- Constant Field Values
-
VLADISLAVLEVA5
public static final int VLADISLAVLEVA5
- See Also:
- Constant Field Values
-
VLADISLAVLEVA6
public static final int VLADISLAVLEVA6
- See Also:
- Constant Field Values
-
VLADISLAVLEVA7
public static final int VLADISLAVLEVA7
- See Also:
- Constant Field Values
-
VLADISLAVLEVA8
public static final int VLADISLAVLEVA8
- See Also:
- Constant Field Values
-
names
public static final java.lang.String[] names
-
fs
public static final java.lang.String[] fs
-
fs_vars
public static final java.lang.String[][] fs_vars
-
P_TESTING_FILE
public static final java.lang.String P_TESTING_FILE
- See Also:
- Constant Field Values
-
P_TRAINING_FILE
public static final java.lang.String P_TRAINING_FILE
- See Also:
- Constant Field Values
-
P_PROBLEM_TYPE
public static final java.lang.String P_PROBLEM_TYPE
- See Also:
- Constant Field Values
-
currentValue
public double[] currentValue
-
trainingInputs
public double[][] trainingInputs
-
trainingOutputs
public double[] trainingOutputs
-
testingInputs
public double[][] testingInputs
-
testingOutputs
public double[] testingOutputs
-
-
Method Detail
-
generateRandomSamples
public double[][] generateRandomSamples(EvolutionState state, double[] min, double[] max, int numPoints, int threadnum)
Produce random sample points between min and max, inclusive, in each dimension.
-
generateRandomSamples
public double[][] generateRandomSamples(EvolutionState state, double min, double max, int numPoints, int threadnum)
Produce random sample points between min and max, inclusive, in one dimension.
-
generateIntervalSpacedSamples
public double[][] generateIntervalSpacedSamples(EvolutionState state, double[] min, double[] max, double[] interval, int threadnum)
Produce sample points evenly spaced out between min and max in each dimension, with the given spacing interval per-dimension.
-
generateIntervalSpacedSamples
public double[][] generateIntervalSpacedSamples(EvolutionState state, double min, double max, double interval, int threadnum)
Produce sample points evenly spaced out between min and max in one dimension, with the given spacing interval. One dimension only.
-
trainPoints
public double[][] trainPoints(EvolutionState state, int benchmark, int threadnum)
Produce sample points for a given benchmark problem.
-
testPoints
public double[][] testPoints(EvolutionState state, int benchmark, int threadnum, double[][] trainpoints)
Produce test sample points for a given benchmark problem, to test generalization.
-
func
public double func(EvolutionState state, double[] xs, int benchmark) throws java.lang.IllegalArgumentException
Return the function applied to the given data by benchmark problem.- Throws:
java.lang.IllegalArgumentException
-
error
public double error(double result, double expectedResult)Returns the error between the result and the expected result of a single data point.
-
setup
public void setup(EvolutionState state, Parameter base)
Description copied from interface:PrototypeSets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else.For prototypes, setup(...) is typically called once for the prototype instance; cloned instances do not receive the setup(...) call. setup(...) may be called more than once; the only guarantee is that it will get called at least once on an instance or some "parent" object from which it was ultimately cloned.
-
evaluate
public void evaluate(EvolutionState state, Individual ind, int subpopulation, int threadnum)
Description copied from interface:SimpleProblemFormEvaluates the individual in ind, if necessary (perhaps not evaluating them if their evaluated flags are true), and sets their fitness appropriately.- Specified by:
evaluatein interfaceSimpleProblemForm
-
describe
public void describe(EvolutionState state, Individual ind, int subpopulation, int threadnum, int log)
Description copied from class:ProblemPart of SimpleProblemForm. Included here so you don't have to write the default version, which usually does nothing.- Specified by:
describein interfaceSimpleProblemForm- Overrides:
describein classProblem
-
-
DMelt 3.0 © DataMelt by jWork.ORG