All Packages Class Hierarchy This Package Previous Next Index WEKA's home
java.lang.Object | +----weka.attributeSelection.ASSearch | +----weka.attributeSelection.GeneticSearch
For more information see:
David E. Goldberg (1989). Genetic algorithms in search, optimization and machine learning. Addison-Wesley.
Valid options are:
-Z
-G
-C
-M
-R
(default = number of generations).
-S
-Z
-G
-C
-M
-R
(default = number of generations).
-S
Sets the size of the population. (default = 20).
Sets the number of generations to perform.
(default = 5).
Sets the probability that crossover will occur.
(default = .6).
Sets the probability that a feature will be toggled on/off.
Sets how frequently reports will be generated. Eg, setting the value
to 5 will generate a report every 5th generation.
Sets the seed for random number generation.
GeneticSearch()
crossoverProbTipText()
getCrossoverProb()
getMaxGenerations()
getMutationProb()
getOptions()
getPopulationSize()
getReportFrequency()
getSeed()
getStartSet()
globalInfo()
listOptions()
maxGenerationsTipText()
mutationProbTipText()
populationSizeTipText()
reportFrequencyTipText()
search(ASEvaluation, Instances)
seedTipText()
setCrossoverProb(double)
setMaxGenerations(int)
setMutationProb(double)
setOptions(String[])
setPopulationSize(int)
setReportFrequency(int)
setSeed(int)
setStartSet(String)
startSetTipText()
toString()
GeneticSearch
public GeneticSearch()
Constructor. Make a new GeneticSearch object
listOptions
public java.util.Enumeration listOptions()
Returns an enumeration describing the available options
setOptions
public void setOptions(java.lang.String options[]) throws java.lang.Exception
Parses a given list of options.
Valid options are:
Sets the size of the population. (default = 20).
Sets the number of generations to perform.
(default = 5).
Sets the probability that crossover will occur.
(default = .6).
Sets the probability that a feature will be toggled on/off.
Sets how frequently reports will be generated. Eg, setting the value
to 5 will generate a report every 5th generation.
Sets the seed for random number generation.
options
- the list of options as an array of strings
getOptions
public java.lang.String[] getOptions()
Gets the current settings of ReliefFAttributeEval.
startSetTipText
public java.lang.String startSetTipText()
Returns the tip text for this property
setStartSet
public void setStartSet(java.lang.String startSet) throws java.lang.Exception
Sets a starting set of attributes for the search. It is the
search method's responsibility to report this start set (if any)
in its toString() method.
startSet
- a string containing a list of attributes (and or ranges),
eg. 1,2,6,10-15.
getStartSet
public java.lang.String getStartSet()
Returns a list of attributes (and or attribute ranges) as a String
seedTipText
public java.lang.String seedTipText()
Returns the tip text for this property
setSeed
public void setSeed(int s)
set the seed for random number generation
s
- seed value
getSeed
public int getSeed()
get the value of the random number generator's seed
reportFrequencyTipText
public java.lang.String reportFrequencyTipText()
Returns the tip text for this property
setReportFrequency
public void setReportFrequency(int f)
set how often reports are generated
f
- generate reports every f generations
getReportFrequency
public int getReportFrequency()
get how often repports are generated
mutationProbTipText
public java.lang.String mutationProbTipText()
Returns the tip text for this property
setMutationProb
public void setMutationProb(double m)
set the probability of mutation
m
- the probability for mutation occuring
getMutationProb
public double getMutationProb()
get the probability of mutation
crossoverProbTipText
public java.lang.String crossoverProbTipText()
Returns the tip text for this property
setCrossoverProb
public void setCrossoverProb(double c)
set the probability of crossover
c
- the probability that two population members will exchange
genetic material
getCrossoverProb
public double getCrossoverProb()
get the probability of crossover
maxGenerationsTipText
public java.lang.String maxGenerationsTipText()
Returns the tip text for this property
setMaxGenerations
public void setMaxGenerations(int m)
set the number of generations to evaluate
m
- the number of generations
getMaxGenerations
public int getMaxGenerations()
get the number of generations
populationSizeTipText
public java.lang.String populationSizeTipText()
Returns the tip text for this property
setPopulationSize
public void setPopulationSize(int p)
set the population size
p
- the size of the population
getPopulationSize
public int getPopulationSize()
get the size of the population
globalInfo
public java.lang.String globalInfo()
Returns a string describing this search method
toString
public java.lang.String toString()
returns a description of the search
search
public int[] search(ASEvaluation ASEval,
Instances data) throws java.lang.Exception
Searches the attribute subset space using a genetic algorithm.
All Packages Class Hierarchy This Package Previous Next Index WEKA's home