public class GlobalScoreSearchAlgorithm extends SearchAlgorithm
-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)
| Modifier and Type | Field and Description |
|---|---|
static Tag[] |
TAGS_CV_TYPE
the score types
|
| Constructor and Description |
|---|
GlobalScoreSearchAlgorithm() |
| Modifier and Type | Method and Description |
|---|---|
double |
calcScore(BayesNet bayesNet)
performCV returns the accuracy calculated using cross validation.
|
double |
calcScoreWithExtraParent(int nNode,
int nCandidateParent)
Calc Node Score With Added Parent
|
double |
calcScoreWithMissingParent(int nNode,
int nCandidateParent)
Calc Node Score With Parent Deleted
|
double |
calcScoreWithReversedParent(int nNode,
int nCandidateParent)
Calc Node Score With Arrow reversed
|
double |
cumulativeCV(BayesNet bayesNet)
CumulativeCV returns the accuracy calculated using cumulative cross
validation.
|
String |
CVTypeTipText() |
SelectedTag |
getCVType()
get cross validation strategy to be used in searching for networks.
|
boolean |
getMarkovBlanketClassifier() |
String[] |
getOptions()
Gets the current settings of the search algorithm.
|
String |
getRevision()
Returns the revision string.
|
boolean |
getUseProb() |
String |
globalInfo()
This will return a string describing the search algorithm.
|
double |
kFoldCV(BayesNet bayesNet,
int nNrOfFolds)
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.
|
Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options
|
String |
markovBlanketClassifierTipText() |
void |
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) |
String |
useProbTipText() |
buildStructure, initAsNaiveBayesTipText, maxNrOfParentsTipText, toStringpublic static final Tag[] TAGS_CV_TYPE
public double calcScore(BayesNet bayesNet) throws Exception
bayesNet - : Bayes Network containing structure to evaluateException - whn m_nCVType is invalided + exceptions passed on by
updateClassifierpublic double calcScoreWithExtraParent(int nNode,
int nCandidateParent)
throws Exception
nNode - node for which the score is calculatenCandidateParent - candidate parent to add to the existing parent setException - if something goes wrongpublic double calcScoreWithMissingParent(int nNode,
int nCandidateParent)
throws Exception
nNode - node for which the score is calculatenCandidateParent - candidate parent to delete from the existing parent
setException - if something goes wrongpublic double calcScoreWithReversedParent(int nNode,
int nCandidateParent)
throws Exception
nNode - node for which the score is calculatenCandidateParent - candidate parent to delete from the existing parent
setException - if something goes wrongpublic double leaveOneOutCV(BayesNet bayesNet) throws Exception
bayesNet - : Bayes Network containing structure to evaluateException - passed on by updateClassifierpublic double cumulativeCV(BayesNet bayesNet) throws Exception
bayesNet - : Bayes Network containing structure to evaluateException - passed on by updateClassifierpublic double kFoldCV(BayesNet bayesNet, int nNrOfFolds) throws Exception
bayesNet - : Bayes Network containing structure to evaluatenNrOfFolds - : the number of folds k to perform k-fold cvException - passed on by updateClassifierpublic boolean getUseProb()
public void setUseProb(boolean useProb)
useProb - : use probabilities or not in accuracy estimatepublic void setCVType(SelectedTag newCVType)
newCVType - : cross validation strategypublic SelectedTag getCVType()
public void setMarkovBlanketClassifier(boolean bMarkovBlanketClassifier)
bMarkovBlanketClassifier - public boolean getMarkovBlanketClassifier()
public Enumeration<Option> listOptions()
listOptions in interface OptionHandlerlistOptions in class SearchAlgorithmpublic void setOptions(String[] options) throws Exception
-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 in interface OptionHandlersetOptions in class SearchAlgorithmoptions - the list of options as an array of stringsException - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlergetOptions in class SearchAlgorithmpublic String CVTypeTipText()
public String useProbTipText()
public String globalInfo()
public String markovBlanketClassifierTipText()
public String getRevision()
getRevision in interface RevisionHandlergetRevision in class SearchAlgorithmCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.