public class GeneticSearch extends LocalScoreSearchAlgorithm
-L <integer> Population size
-A <integer> Descendant population size
-U <integer> Number of runs
-M Use mutation. (default true)
-C Use cross-over. (default true)
-O Use tournament selection (true) or maximum subpopulatin (false). (default false)
-R <seed> Random number seed
-mbc Applies a Markov Blanket correction to the network structure, after a network structure is learned. This ensures that all nodes in the network are part of the Markov blanket of the classifier node.
-S [BAYES|MDL|ENTROPY|AIC|CROSS_CLASSIC|CROSS_BAYES] Score type (BAYES, BDeu, MDL, ENTROPY and AIC)
TAGS_SCORE_TYPEm_bInitAsNaiveBayes, m_bMarkovBlanketClassifier, m_nMaxNrOfParents| Constructor and Description |
|---|
GeneticSearch() |
| Modifier and Type | Method and Description |
|---|---|
String |
descendantPopulationSizeTipText() |
int |
getDescendantPopulationSize() |
String[] |
getOptions()
Gets the current settings of the search algorithm.
|
int |
getPopulationSize() |
String |
getRevision()
Returns the revision string.
|
int |
getRuns() |
int |
getSeed() |
boolean |
getUseCrossOver() |
boolean |
getUseMutation() |
boolean |
getUseTournamentSelection() |
String |
globalInfo()
This will return a string describing the classifier.
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
String |
populationSizeTipText() |
String |
runsTipText() |
protected void |
search(BayesNet bayesNet,
Instances instances)
search determines the network structure/graph of the network
with a genetic search algorithm.
|
String |
seedTipText() |
void |
setDescendantPopulationSize(int iDescendantPopulationSize) |
void |
setOptions(String[] options)
Parses a given list of options.
|
void |
setPopulationSize(int iPopulationSize) |
void |
setRuns(int nRuns)
Sets the number of runs
|
void |
setSeed(int nSeed)
Sets the random number seed
|
void |
setUseCrossOver(boolean bUseCrossOver) |
void |
setUseMutation(boolean bUseMutation) |
void |
setUseTournamentSelection(boolean bUseTournamentSelection) |
String |
useCrossOverTipText() |
String |
useMutationTipText() |
String |
useTournamentSelectionTipText() |
buildStructure, calcNodeScore, calcScoreOfCounts, calcScoreOfCounts2, calcScoreWithExtraParent, calcScoreWithMissingParent, getMarkovBlanketClassifier, getScoreType, logScore, markovBlanketClassifierTipText, scoreTypeTipText, setMarkovBlanketClassifier, setScoreTypeaddArcMakesSense, doMarkovBlanketCorrection, initAsNaiveBayesTipText, isArc, maxNrOfParentsTipText, reverseArcMakesSense, toStringprotected void search(BayesNet bayesNet, Instances instances) throws Exception
search in class SearchAlgorithmbayesNet - the network to useinstances - the data to useException - if population size doesn fit or neither cross-over or mutation was chosenpublic int getRuns()
public void setRuns(int nRuns)
nRuns - The number of runs to setpublic Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class LocalScoreSearchAlgorithmpublic void setOptions(String[] options) throws Exception
-L <integer> Population size
-A <integer> Descendant population size
-U <integer> Number of runs
-M Use mutation. (default true)
-C Use cross-over. (default true)
-O Use tournament selection (true) or maximum subpopulatin (false). (default false)
-R <seed> Random number seed
-mbc Applies a Markov Blanket correction to the network structure, after a network structure is learned. This ensures that all nodes in the network are part of the Markov blanket of the classifier node.
-S [BAYES|MDL|ENTROPY|AIC|CROSS_CLASSIC|CROSS_BAYES] Score type (BAYES, BDeu, MDL, ENTROPY and AIC)
setOptions in interface OptionHandlersetOptions in class LocalScoreSearchAlgorithmoptions - the list of options as an array of stringsException - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlergetOptions in class LocalScoreSearchAlgorithmpublic boolean getUseCrossOver()
public boolean getUseMutation()
public int getDescendantPopulationSize()
public int getPopulationSize()
public void setUseCrossOver(boolean bUseCrossOver)
bUseCrossOver - sets whether cross-over is usedpublic void setUseMutation(boolean bUseMutation)
bUseMutation - sets whether mutation is usedpublic boolean getUseTournamentSelection()
public void setUseTournamentSelection(boolean bUseTournamentSelection)
bUseTournamentSelection - sets whether Tournament Selection or Maximum Sub-Population should be usedpublic void setDescendantPopulationSize(int iDescendantPopulationSize)
iDescendantPopulationSize - sets descendant population sizepublic void setPopulationSize(int iPopulationSize)
iPopulationSize - sets population sizepublic int getSeed()
public void setSeed(int nSeed)
nSeed - The number of the seed to setpublic String globalInfo()
globalInfo in class LocalScoreSearchAlgorithmpublic String runsTipText()
public String seedTipText()
public String populationSizeTipText()
public String descendantPopulationSizeTipText()
public String useMutationTipText()
public String useCrossOverTipText()
public String useTournamentSelectionTipText()
public String getRevision()
getRevision in interface RevisionHandlergetRevision in class LocalScoreSearchAlgorithmCopyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.