weka.filters.supervised.attribute.gpattributegeneration
Class GPAttributeGeneration

java.lang.Object
  extended by weka.filters.Filter
      extended by weka.filters.supervised.attribute.gpattributegeneration.GPAttributeGeneration
All Implemented Interfaces:
java.io.Serializable, CapabilitiesHandler, OptionHandler, RevisionHandler, SupervisedFilter

public class GPAttributeGeneration
extends Filter
implements OptionHandler, SupervisedFilter

Implementation of a genetic programming system in the WEKA input space

Author:
Colin Noakes
See Also:
Serialized Form

Constructor Summary
GPAttributeGeneration()
           
 
Method Summary
 boolean batchFinished()
           
 java.lang.String fitnessEvaluationMethodTipText()
          Fitness evaluation method help text
 java.lang.String functionsTipText()
          Returns the help text for the GUI.
 Capabilities getCapabilities()
           
 SelectedTag getFitnessEvaluationMethod()
           
 java.lang.String getFunctions()
          Returns the property
 int getMaxDepth()
          Returns the property
 int getMaxTime()
          Returns the property
 int getNumberOfGenerations()
          Returns the property
 java.lang.String getOperatorProportion()
          Returns the property
 java.lang.String[] getOptions()
          Gets the options currently set for the class
 SelectedTag getPopulationGenerationMethod()
          Returns the property
 int getPopulationSize()
          Returns the property
 long getSeed()
          Get the seed
 SelectedTag getSelectionMethod()
           
 double getTargetTreeAccuracy()
          Returns the property
 java.lang.String globalInfo()
           
 java.util.Enumeration listOptions()
           
static void main(java.lang.String[] args)
          Main method
 java.lang.String maxDepthTipText()
          Returns the help text for the GUI.
 java.lang.String maxTimeTipText()
          Returns the help text for the GUI.
 java.lang.String numberOfGenerationsTipText()
          Returns the help text for the GUI.
 java.lang.String operatorProportionTipText()
          Returns the help text for the GUI.
 java.lang.String populationGenerationMethodTipText()
          Returns the help text for the GUI
 java.lang.String populationSizeTipText()
          Returns the help text for the GUI.
 java.lang.String seedTipText()
          Seed tip text for the GUI
 java.lang.String selectionMethodTipText()
          selection method tip text
 void setFitnessEvaluationMethod(SelectedTag evalMethod)
           
 void setFunctions(java.lang.String func)
          Sets the property
 void setMaxDepth(int depth)
          Sets the property
 void setMaxTime(int maxtime)
          Checks whether supplied value is valid and updates maxTime if it is; throws exception if not
 void setNumberOfGenerations(int gens)
          Checks whether supplied value is valid and updates maxNumGenerations if it is; throws exception if not
 void setOperatorProportion(java.lang.String ops)
          Sets the property
 void setOptions(java.lang.String[] options)
          Sets the options via the command line
 void setPopulationGenerationMethod(SelectedTag popGenTag)
          Sets the property
 void setPopulationSize(int pSize)
          Checks whether supplied value is valid and updates popSize if it is; throws exception if not
 void setSeed(long seed)
          Set the seed value for the random number generator
 void setSelectionMethod(SelectedTag selMethod)
           
 void setTargetTreeAccuracy(double treeAccuracy)
          Checks whether supplied value is valid and updates targetTreeAccuracy if it is; throws exception if not
 java.lang.String targetTreeAccuracyTipText()
          Returns the help text for the GUI.
 
Methods inherited from class weka.filters.Filter
batchFilterFile, filterFile, getCapabilities, getOutputFormat, getRevision, input, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputPeek, runFilter, setInputFormat, toString, useFilter, wekaStaticWrapper
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GPAttributeGeneration

public GPAttributeGeneration()
Method Detail

main

public static void main(java.lang.String[] args)
Main method

Parameters:
args - the options, use "-h" to display options

batchFinished

public boolean batchFinished()
                      throws java.lang.Exception
Overrides:
batchFinished in class Filter
Throws:
java.lang.Exception

globalInfo

public java.lang.String globalInfo()

getCapabilities

public Capabilities getCapabilities()
Specified by:
getCapabilities in interface CapabilitiesHandler
Overrides:
getCapabilities in class Filter

listOptions

public java.util.Enumeration listOptions()
Specified by:
listOptions in interface OptionHandler
Returns:
Returns an enumeration of all options

setOptions

public void setOptions(java.lang.String[] options)
                throws java.lang.Exception
Sets the options via the command line

Specified by:
setOptions in interface OptionHandler
Parameters:
options - A parameter and an argument are always two elements in the array
Throws:
java.lang.Exception - If an option is not supported

getOptions

public java.lang.String[] getOptions()
Gets the options currently set for the class

Specified by:
getOptions in interface OptionHandler
Returns:
A string array of command line options for the filter and the super-class

setPopulationSize

public void setPopulationSize(int pSize)
                       throws java.lang.Exception
Checks whether supplied value is valid and updates popSize if it is; throws exception if not

Parameters:
pSize - The chosen population size
Throws:
java.lang.Exception - The specified value is invalid

getPopulationSize

public int getPopulationSize()
Returns the property

Returns:
The population size

populationSizeTipText

public java.lang.String populationSizeTipText()
Returns the help text for the GUI.

Returns:
PopulationSize help text

setNumberOfGenerations

public void setNumberOfGenerations(int gens)
                            throws java.lang.Exception
Checks whether supplied value is valid and updates maxNumGenerations if it is; throws exception if not

Parameters:
gens - The chosen number of generations to run
Throws:
java.lang.Exception - The specified value is invalid

getNumberOfGenerations

public int getNumberOfGenerations()
Returns the property

Returns:
The number of generations

numberOfGenerationsTipText

public java.lang.String numberOfGenerationsTipText()
Returns the help text for the GUI.

Returns:
the help text for the GUI.

setMaxTime

public void setMaxTime(int maxtime)
                throws java.lang.Exception
Checks whether supplied value is valid and updates maxTime if it is; throws exception if not

Parameters:
maxtime - The max time
Throws:
java.lang.Exception - The specified value is invalid

getMaxTime

public int getMaxTime()
Returns the property

Returns:
The max time

maxTimeTipText

public java.lang.String maxTimeTipText()
Returns the help text for the GUI.

Returns:
the help text for the GUI.

setTargetTreeAccuracy

public void setTargetTreeAccuracy(double treeAccuracy)
                           throws java.lang.Exception
Checks whether supplied value is valid and updates targetTreeAccuracy if it is; throws exception if not

Parameters:
treeAccuracy - The target accuracy
Throws:
java.lang.Exception - The specified value is invalid

getTargetTreeAccuracy

public double getTargetTreeAccuracy()
Returns the property

Returns:
The target fitness

targetTreeAccuracyTipText

public java.lang.String targetTreeAccuracyTipText()
Returns the help text for the GUI.

Returns:
the help text for the GUI.

setFunctions

public void setFunctions(java.lang.String func)
Sets the property

Parameters:
func - The functions

getFunctions

public java.lang.String getFunctions()
Returns the property

Returns:
The functions

functionsTipText

public java.lang.String functionsTipText()
Returns the help text for the GUI.

Returns:
the help text for the GUI.

setMaxDepth

public void setMaxDepth(int depth)
                 throws java.lang.Exception
Sets the property

Parameters:
func - The max depth
Throws:
java.lang.Exception

getMaxDepth

public int getMaxDepth()
Returns the property

Returns:
The max depth

maxDepthTipText

public java.lang.String maxDepthTipText()
Returns the help text for the GUI.

Returns:
the help text for the GUI.

setOperatorProportion

public void setOperatorProportion(java.lang.String ops)
                           throws java.lang.Exception
Sets the property

Parameters:
ops - The operators to set
Throws:
java.lang.Exception

getOperatorProportion

public java.lang.String getOperatorProportion()
Returns the property

Returns:
The max depth

operatorProportionTipText

public java.lang.String operatorProportionTipText()
Returns the help text for the GUI.

Returns:
the help text for the GUI.

setPopulationGenerationMethod

public void setPopulationGenerationMethod(SelectedTag popGenTag)
Sets the property

Parameters:
popGenTag - The initial generation to use

getPopulationGenerationMethod

public SelectedTag getPopulationGenerationMethod()
Returns the property

Returns:
The population generation method

populationGenerationMethodTipText

public java.lang.String populationGenerationMethodTipText()
Returns the help text for the GUI

Returns:
help text for the GUI

getFitnessEvaluationMethod

public SelectedTag getFitnessEvaluationMethod()
Returns:
the fitnessEvaluationMethod as a string

setFitnessEvaluationMethod

public void setFitnessEvaluationMethod(SelectedTag evalMethod)
Parameters:
fitnessEvaluationMethod - the fitnessEvaluationMethod to set

fitnessEvaluationMethodTipText

public java.lang.String fitnessEvaluationMethodTipText()
Fitness evaluation method help text

Returns:
Fitness evaluation method help text

getSelectionMethod

public SelectedTag getSelectionMethod()
Returns:
the selectionMethod

setSelectionMethod

public void setSelectionMethod(SelectedTag selMethod)
Parameters:
selMethod - the selectionMethod to set

selectionMethodTipText

public java.lang.String selectionMethodTipText()
selection method tip text

Returns:
selection method tip text

getSeed

public long getSeed()
Get the seed

Returns:
the seed

setSeed

public void setSeed(long seed)
Set the seed value for the random number generator

Parameters:
seed - The specified seed value

seedTipText

public java.lang.String seedTipText()
Seed tip text for the GUI

Returns:
Seed tip text