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.
|
java.lang.String |
CVTypeTipText() |
SelectedTag |
getCVType()
get cross validation strategy to be used in searching for networks.
|
boolean |
getMarkovBlanketClassifier() |
java.lang.String[] |
getOptions()
Gets the current settings of the search algorithm.
|
java.lang.String |
getRevision()
Returns the revision string.
|
boolean |
getUseProb() |
java.lang.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.
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options
|
java.lang.String |
markovBlanketClassifierTipText() |
void |
setCVType(SelectedTag newCVType)
set cross validation strategy to be used in searching for networks.
|
void |
setMarkovBlanketClassifier(boolean bMarkovBlanketClassifier) |
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setUseProb(boolean useProb) |
java.lang.String |
useProbTipText() |
buildStructure, initAsNaiveBayesTipText, maxNrOfParentsTipText, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
makeCopy
public static final Tag[] TAGS_CV_TYPE
public double calcScore(BayesNet bayesNet) throws java.lang.Exception
bayesNet
- : Bayes Network containing structure to evaluatejava.lang.Exception
- whn m_nCVType is invalided + exceptions passed on by
updateClassifierpublic double calcScoreWithExtraParent(int nNode, int nCandidateParent) throws java.lang.Exception
nNode
- node for which the score is calculatenCandidateParent
- candidate parent to add to the existing parent setjava.lang.Exception
- if something goes wrongpublic double calcScoreWithMissingParent(int nNode, int nCandidateParent) throws java.lang.Exception
nNode
- node for which the score is calculatenCandidateParent
- candidate parent to delete from the existing parent
setjava.lang.Exception
- if something goes wrongpublic double calcScoreWithReversedParent(int nNode, int nCandidateParent) throws java.lang.Exception
nNode
- node for which the score is calculatenCandidateParent
- candidate parent to delete from the existing parent
setjava.lang.Exception
- if something goes wrongpublic double leaveOneOutCV(BayesNet bayesNet) throws java.lang.Exception
bayesNet
- : Bayes Network containing structure to evaluatejava.lang.Exception
- passed on by updateClassifierpublic double cumulativeCV(BayesNet bayesNet) throws java.lang.Exception
bayesNet
- : Bayes Network containing structure to evaluatejava.lang.Exception
- passed on by updateClassifierpublic double kFoldCV(BayesNet bayesNet, int nNrOfFolds) throws java.lang.Exception
bayesNet
- : Bayes Network containing structure to evaluatenNrOfFolds
- : the number of folds k to perform k-fold cvjava.lang.Exception
- 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 java.util.Enumeration<Option> listOptions()
listOptions
in interface OptionHandler
listOptions
in class SearchAlgorithm
public void setOptions(java.lang.String[] options) throws java.lang.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 OptionHandler
setOptions
in class SearchAlgorithm
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class SearchAlgorithm
public java.lang.String CVTypeTipText()
public java.lang.String useProbTipText()
public java.lang.String globalInfo()
public java.lang.String markovBlanketClassifierTipText()
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class SearchAlgorithm