类 GeneticSearch
java.lang.Object
weka.classifiers.bayes.net.search.SearchAlgorithm
weka.classifiers.bayes.net.search.global.GlobalScoreSearchAlgorithm
weka.classifiers.bayes.net.search.global.GeneticSearch
- 所有已实现的接口:
Serializable
,OptionHandler
,RevisionHandler
This Bayes Network learning algorithm uses genetic search for finding a well scoring Bayes network structure. Genetic search works by having a population of Bayes network structures and allow them to mutate and apply cross over to get offspring. The best network structure found during the process is returned.
Valid options are:
-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 [LOO-CV|k-Fold-CV|Cumulative-CV] Score type (LOO-CV,k-Fold-CV,Cumulative-CV)
-Q Use probabilistic or 0/1 scoring. (default probabilistic scoring)
- 版本:
- $Revision: 1.5 $
- 作者:
- Remco Bouckaert (rrb@xm.co.nz)
- 另请参阅:
-
字段概要
从类继承的字段 weka.classifiers.bayes.net.search.global.GlobalScoreSearchAlgorithm
TAGS_CV_TYPE
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明int
String[]
Gets the current settings of the search algorithm.int
Returns the revision string.int
getRuns()
int
getSeed()
boolean
boolean
boolean
This will return a string describing the classifier.Returns an enumeration describing the available options.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 runsvoid
setSeed
(int nSeed) Sets the random number seedvoid
setUseCrossOver
(boolean bUseCrossOver) void
setUseMutation
(boolean bUseMutation) void
setUseTournamentSelection
(boolean bUseTournamentSelection) 从类继承的方法 weka.classifiers.bayes.net.search.global.GlobalScoreSearchAlgorithm
calcScore, calcScoreWithExtraParent, calcScoreWithMissingParent, calcScoreWithReversedParent, cumulativeCV, CVTypeTipText, getCVType, getMarkovBlanketClassifier, getUseProb, kFoldCV, leaveOneOutCV, markovBlanketClassifierTipText, setCVType, setMarkovBlanketClassifier, setUseProb, useProbTipText
从类继承的方法 weka.classifiers.bayes.net.search.SearchAlgorithm
buildStructure, initAsNaiveBayesTipText, maxNrOfParentsTipText, toString
-
构造器详细资料
-
GeneticSearch
public GeneticSearch()
-
-
方法详细资料
-
getRuns
public int getRuns()- 返回:
- number of runs
-
setRuns
public void setRuns(int nRuns) Sets the number of runs- 参数:
nRuns
- The number of runs to set
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中GlobalScoreSearchAlgorithm
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options. Valid options are:-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 [LOO-CV|k-Fold-CV|Cumulative-CV] Score type (LOO-CV,k-Fold-CV,Cumulative-CV)
-Q Use probabilistic or 0/1 scoring. (default probabilistic scoring)
- 指定者:
setOptions
在接口中OptionHandler
- 覆盖:
setOptions
在类中GlobalScoreSearchAlgorithm
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the search algorithm.- 指定者:
getOptions
在接口中OptionHandler
- 覆盖:
getOptions
在类中GlobalScoreSearchAlgorithm
- 返回:
- an array of strings suitable for passing to setOptions
-
getUseCrossOver
public boolean getUseCrossOver()- 返回:
- whether cross-over is used
-
getUseMutation
public boolean getUseMutation()- 返回:
- whether mutation is used
-
getDescendantPopulationSize
public int getDescendantPopulationSize()- 返回:
- descendant population size
-
getPopulationSize
public int getPopulationSize()- 返回:
- population size
-
setUseCrossOver
public void setUseCrossOver(boolean bUseCrossOver) - 参数:
bUseCrossOver
- sets whether cross-over is used
-
setUseMutation
public void setUseMutation(boolean bUseMutation) - 参数:
bUseMutation
- sets whether mutation is used
-
getUseTournamentSelection
public boolean getUseTournamentSelection()- 返回:
- whether Tournament Selection (true) or Maximum Sub-Population (false) should be used
-
setUseTournamentSelection
public void setUseTournamentSelection(boolean bUseTournamentSelection) - 参数:
bUseTournamentSelection
- sets whether Tournament Selection or Maximum Sub-Population should be used
-
setDescendantPopulationSize
public void setDescendantPopulationSize(int iDescendantPopulationSize) - 参数:
iDescendantPopulationSize
- sets descendant population size
-
setPopulationSize
public void setPopulationSize(int iPopulationSize) - 参数:
iPopulationSize
- sets population size
-
getSeed
public int getSeed()- 返回:
- random number seed
-
setSeed
public void setSeed(int nSeed) Sets the random number seed- 参数:
nSeed
- The number of the seed to set
-
globalInfo
This will return a string describing the classifier.- 覆盖:
globalInfo
在类中GlobalScoreSearchAlgorithm
- 返回:
- The string.
-
runsTipText
- 返回:
- a string to describe the Runs option.
-
seedTipText
- 返回:
- a string to describe the Seed option.
-
populationSizeTipText
- 返回:
- a string to describe the Population Size option.
-
descendantPopulationSizeTipText
- 返回:
- a string to describe the Descendant Population Size option.
-
useMutationTipText
- 返回:
- a string to describe the Use Mutation option.
-
useCrossOverTipText
- 返回:
- a string to describe the Use Cross-Over option.
-
useTournamentSelectionTipText
- 返回:
- a string to describe the Use Tournament Selection option.
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中GlobalScoreSearchAlgorithm
- 返回:
- the revision
-