|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.bayes.net.search.SearchAlgorithm
weka.classifiers.bayes.net.search.global.GlobalScoreSearchAlgorithm
public class GlobalScoreSearchAlgorithm
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)
| Field Summary | |
|---|---|
static Tag[] |
TAGS_CV_TYPE
the score types |
| Constructor Summary | |
|---|---|
GlobalScoreSearchAlgorithm()
|
|
| Method Summary | |
|---|---|
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 |
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()
|
| Methods inherited from class weka.classifiers.bayes.net.search.SearchAlgorithm |
|---|
buildStructure, initAsNaiveBayesTipText, maxNrOfParentsTipText, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Tag[] TAGS_CV_TYPE
| Constructor Detail |
|---|
public GlobalScoreSearchAlgorithm()
| Method Detail |
|---|
public double calcScore(BayesNet bayesNet)
throws java.lang.Exception
bayesNet - : Bayes Network containing structure to evaluate
java.lang.Exception - whn m_nCVType is invalided + exceptions passed on by updateClassifier
public 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 set
java.lang.Exception - if something goes wrong
public 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 set
java.lang.Exception - if something goes wrong
public 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 set
java.lang.Exception - if something goes wrong
public double leaveOneOutCV(BayesNet bayesNet)
throws java.lang.Exception
bayesNet - : Bayes Network containing structure to evaluate
java.lang.Exception - passed on by updateClassifier
public double cumulativeCV(BayesNet bayesNet)
throws java.lang.Exception
bayesNet - : Bayes Network containing structure to evaluate
java.lang.Exception - passed on by updateClassifier
public 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 cv
java.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 listOptions()
listOptions in interface OptionHandlerlistOptions 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 OptionHandlersetOptions in class SearchAlgorithmoptions - the list of options as an array of strings
java.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlergetOptions in class SearchAlgorithmpublic 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 RevisionHandlergetRevision in class SearchAlgorithm
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||