类 LocalScoreSearchAlgorithm
java.lang.Object
weka.classifiers.bayes.net.search.SearchAlgorithm
weka.classifiers.bayes.net.search.local.LocalScoreSearchAlgorithm
- 所有已实现的接口:
Serializable
,OptionHandler
,RevisionHandler
- 直接已知子类:
CISearchAlgorithm
,GeneticSearch
,HillClimber
,K2
,SimulatedAnnealing
,TAN
The ScoreBasedSearchAlgorithm class supports Bayes net structure search algorithms that are based on maximizing scores (as opposed to for example conditional independence based search algorithms).
Valid options are:
-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)
- 版本:
- $Revision: 5196 $
- 作者:
- Remco Bouckaert
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器构造器说明default constructorLocalScoreSearchAlgorithm
(BayesNet bayesNet, Instances instances) constructor -
方法概要
修饰符和类型方法说明void
buildStructure
(BayesNet bayesNet, Instances instances) buildStructure determines the network structure/graph of the network with the K2 algorithm, restricted by its initial structure (which can be an empty graph, or a Naive Bayes graph.double
calcNodeScore
(int nNode) Calc Node Score for given parent setdouble
calcScoreWithExtraParent
(int nNode, int nCandidateParent) Calc Node Score With AddedParentdouble
calcScoreWithMissingParent
(int nNode, int nCandidateParent) Calc Node Score With Parent Deletedboolean
String[]
Gets the current settings of the search algorithm.Returns the revision string.get quality measure to be used in searching for networks.This will return a string describing the search algorithm.Returns an enumeration describing the available optionsdouble
logScore
(int nType) logScore returns the log of the quality of a network (e.g.void
setMarkovBlanketClassifier
(boolean bMarkovBlanketClassifier) void
setOptions
(String[] options) Parses a given list of options.void
setScoreType
(SelectedTag newScoreType) set quality measure to be used in searching for networks.从类继承的方法 weka.classifiers.bayes.net.search.SearchAlgorithm
initAsNaiveBayesTipText, maxNrOfParentsTipText, toString
-
字段详细资料
-
TAGS_SCORE_TYPE
the score types
-
-
构造器详细资料
-
LocalScoreSearchAlgorithm
public LocalScoreSearchAlgorithm()default constructor -
LocalScoreSearchAlgorithm
constructor- 参数:
bayesNet
- the networkinstances
- the data
-
-
方法详细资料
-
logScore
public double logScore(int nType) logScore returns the log of the quality of a network (e.g. the posterior probability of the network, or the MDL value).- 参数:
nType
- score type (Bayes, MDL, etc) to calculate score with- 返回:
- log score.
-
buildStructure
buildStructure determines the network structure/graph of the network with the K2 algorithm, restricted by its initial structure (which can be an empty graph, or a Naive Bayes graph.- 覆盖:
buildStructure
在类中SearchAlgorithm
- 参数:
bayesNet
- the networkinstances
- the data to use- 抛出:
Exception
- if something goes wrong
-
calcNodeScore
public double calcNodeScore(int nNode) Calc Node Score for given parent set- 参数:
nNode
- node for which the score is calculate- 返回:
- log score
-
calcScoreWithExtraParent
public double calcScoreWithExtraParent(int nNode, int nCandidateParent) Calc Node Score With AddedParent- 参数:
nNode
- node for which the score is calculatenCandidateParent
- candidate parent to add to the existing parent set- 返回:
- log score
-
calcScoreWithMissingParent
public double calcScoreWithMissingParent(int nNode, int nCandidateParent) Calc Node Score With Parent Deleted- 参数:
nNode
- node for which the score is calculatenCandidateParent
- candidate parent to delete from the existing parent set- 返回:
- log score
-
setScoreType
set quality measure to be used in searching for networks.- 参数:
newScoreType
- the new score type
-
getScoreType
get quality measure to be used in searching for networks.- 返回:
- quality measure
-
setMarkovBlanketClassifier
public void setMarkovBlanketClassifier(boolean bMarkovBlanketClassifier) - 参数:
bMarkovBlanketClassifier
-
-
getMarkovBlanketClassifier
public boolean getMarkovBlanketClassifier()- 返回:
-
listOptions
Returns an enumeration describing the available options- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中SearchAlgorithm
- 返回:
- an enumeration of all the available options
-
setOptions
Parses a given list of options. Valid options are:-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
在接口中OptionHandler
- 覆盖:
setOptions
在类中SearchAlgorithm
- 参数:
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
在类中SearchAlgorithm
- 返回:
- an array of strings suitable for passing to setOptions
-
scoreTypeTipText
- 返回:
- a string to describe the ScoreType option.
-
markovBlanketClassifierTipText
- 返回:
- a string to describe the MarkovBlanketClassifier option.
-
globalInfo
This will return a string describing the search algorithm.- 返回:
- The string.
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中SearchAlgorithm
- 返回:
- the revision
-