类 GlobalScoreSearchAlgorithm
java.lang.Object
weka.classifiers.bayes.net.search.SearchAlgorithm
weka.classifiers.bayes.net.search.global.GlobalScoreSearchAlgorithm
- 所有已实现的接口:
Serializable
,OptionHandler
,RevisionHandler
- 直接已知子类:
GeneticSearch
,HillClimber
,K2
,SimulatedAnnealing
,TAN
This Bayes Network learning algorithm uses cross validation to estimate classification accuracy.
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 [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.10 $
- 作者:
- Remco Bouckaert
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明double
performCV returns the accuracy calculated using cross validation.double
calcScoreWithExtraParent
(int nNode, int nCandidateParent) Calc Node Score With Added Parentdouble
calcScoreWithMissingParent
(int nNode, int nCandidateParent) Calc Node Score With Parent Deleteddouble
calcScoreWithReversedParent
(int nNode, int nCandidateParent) Calc Node Score With Arrow reverseddouble
cumulativeCV
(BayesNet bayesNet) CumulativeCV returns the accuracy calculated using cumulative cross validation.get cross validation strategy to be used in searching for networks.boolean
String[]
Gets the current settings of the search algorithm.Returns the revision string.boolean
This will return a string describing the search algorithm.double
kFoldCV uses k-fold cross validation to measure the accuracy of a Bayes network classifier.double
leaveOneOutCV
(BayesNet bayesNet) LeaveOneOutCV returns the accuracy calculated using Leave One Out cross validation.Returns an enumeration describing the available optionsvoid
setCVType
(SelectedTag newCVType) set cross validation strategy to be used in searching for networks.void
setMarkovBlanketClassifier
(boolean bMarkovBlanketClassifier) void
setOptions
(String[] options) Parses a given list of options.void
setUseProb
(boolean useProb) 从类继承的方法 weka.classifiers.bayes.net.search.SearchAlgorithm
buildStructure, initAsNaiveBayesTipText, maxNrOfParentsTipText, toString
-
字段详细资料
-
TAGS_CV_TYPE
the score types
-
-
构造器详细资料
-
GlobalScoreSearchAlgorithm
public GlobalScoreSearchAlgorithm()
-
-
方法详细资料
-
calcScore
performCV returns the accuracy calculated using cross validation. The dataset used is m_Instances associated with the Bayes Network.- 参数:
bayesNet
- : Bayes Network containing structure to evaluate- 返回:
- accuracy (in interval 0..1) measured using cv.
- 抛出:
Exception
- whn m_nCVType is invalided + exceptions passed on by updateClassifier
-
calcScoreWithExtraParent
Calc Node Score With Added Parent- 参数:
nNode
- node for which the score is calculatenCandidateParent
- candidate parent to add to the existing parent set- 返回:
- log score
- 抛出:
Exception
- if something goes wrong
-
calcScoreWithMissingParent
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
- 抛出:
Exception
- if something goes wrong
-
calcScoreWithReversedParent
Calc Node Score With Arrow reversed- 参数:
nNode
- node for which the score is calculatenCandidateParent
- candidate parent to delete from the existing parent set- 返回:
- log score
- 抛出:
Exception
- if something goes wrong
-
leaveOneOutCV
LeaveOneOutCV returns the accuracy calculated using Leave One Out cross validation. The dataset used is m_Instances associated with the Bayes Network.- 参数:
bayesNet
- : Bayes Network containing structure to evaluate- 返回:
- accuracy (in interval 0..1) measured using leave one out cv.
- 抛出:
Exception
- passed on by updateClassifier
-
cumulativeCV
CumulativeCV returns the accuracy calculated using cumulative cross validation. The idea is to run through the data set and try to classify each of the instances based on the previously seen data. The data set used is m_Instances associated with the Bayes Network.- 参数:
bayesNet
- : Bayes Network containing structure to evaluate- 返回:
- accuracy (in interval 0..1) measured using leave one out cv.
- 抛出:
Exception
- passed on by updateClassifier
-
kFoldCV
kFoldCV uses k-fold cross validation to measure the accuracy of a Bayes network classifier.- 参数:
bayesNet
- : Bayes Network containing structure to evaluatenNrOfFolds
- : the number of folds k to perform k-fold cv- 返回:
- accuracy (in interval 0..1) measured using leave one out cv.
- 抛出:
Exception
- passed on by updateClassifier
-
getUseProb
public boolean getUseProb()- 返回:
- use probabilities or not in accuracy estimate
-
setUseProb
public void setUseProb(boolean useProb) - 参数:
useProb
- : use probabilities or not in accuracy estimate
-
setCVType
set cross validation strategy to be used in searching for networks.- 参数:
newCVType
- : cross validation strategy
-
getCVType
get cross validation strategy to be used in searching for networks.- 返回:
- cross validation strategy
-
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 [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
在类中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
-
CVTypeTipText
- 返回:
- a string to describe the CVType option.
-
useProbTipText
- 返回:
- a string to describe the UseProb option.
-
globalInfo
This will return a string describing the search algorithm.- 返回:
- The string.
-
markovBlanketClassifierTipText
- 返回:
- a string to describe the MarkovBlanketClassifier option.
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中SearchAlgorithm
- 返回:
- the revision
-