weka.filters.supervised.attribute.gpattributegeneration
Class GPSystem

java.lang.Object
  extended by weka.filters.supervised.attribute.gpattributegeneration.GPSystem

public class GPSystem
extends java.lang.Object

Starts a complete run of the GP system

Author:
Colin Noakes

Constructor Summary
GPSystem(Instances instances, int popSize, int maxNumGenerations, int maxTime, double targetFitness, java.util.ArrayList<java.lang.String> functions, int maxDepth, double[] operatorProp, EnumGenerationMethod popGenMethod, java.util.Random rand, EnumFitnessEvaluationMethod evalMethod, EnumSelectionMethod selMethod, Classifier classifier, long seed)
          Constructor to pass in data and variables for the GP system
 
Method Summary
 java.util.ArrayList<java.lang.String> getSelectedIndividuals()
          Returns the selected individuals from the population.
 void run()
          Runs the GP System using the previously specified data
 java.lang.String toString()
          Outputs the results of a GP System run
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GPSystem

public GPSystem(Instances instances,
                int popSize,
                int maxNumGenerations,
                int maxTime,
                double targetFitness,
                java.util.ArrayList<java.lang.String> functions,
                int maxDepth,
                double[] operatorProp,
                EnumGenerationMethod popGenMethod,
                java.util.Random rand,
                EnumFitnessEvaluationMethod evalMethod,
                EnumSelectionMethod selMethod,
                Classifier classifier,
                long seed)
Constructor to pass in data and variables for the GP system

Parameters:
instances - Data instances to run thru GP system
popSize - Initial population size
numOfGenerations - Number of generations to go through before stopping
maxTime - Max time the GP system can run for before stopping
targetFitness - Target fitness to stop at
functions - Functions that can be used as nodes of the program trees
maxDepth - Maximum depth of program trees
operatorProp - Operator proportion to use
popGenMethod - Method to use to generate the population
evalMethod - Fitness evaluation method to use
selMethod - Selection method to use
classifier - The classifier to use for fitness evaluation
seed - The seed the Rand object started with (for results output)
Method Detail

run

public void run()
Runs the GP System using the previously specified data


toString

public java.lang.String toString()
Outputs the results of a GP System run

Overrides:
toString in class java.lang.Object
Returns:
Results of a GP System run as a string

getSelectedIndividuals

public java.util.ArrayList<java.lang.String> getSelectedIndividuals()
Returns the selected individuals from the population. Returns only unique elements.

Returns:
The selected individuals from the population