|
|||||||||||
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
The CVSearchAlgorithm class supports Bayes net structure search algorithms that are based on cross validation (as opposed to for example score based of conditional independence based search algorithms).
Field Summary | |
static Tag[] |
TAGS_CV_TYPE
|
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. |
java.lang.String[] |
getOptions()
Gets the current settings of the search algorithm. |
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 |
void |
setCVType(SelectedTag newCVType)
set cross validation strategy to be used in searching for networks. |
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, getMarkovBlanketClassifier, initAsNaiveBayesTipText, markovBlanketClassifierTipText, maxNrOfParentsTipText, setMarkovBlanketClassifier, 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 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 set
java.lang.Exception
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
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
public double leaveOneOutCV(BayesNet bayesNet) throws java.lang.Exception
bayesNet
- : Bayes Network containing structure to evaluate
java.lang.Exception
- passed on by updateClassifierpublic double cumulativeCV(BayesNet bayesNet) throws java.lang.Exception
bayesNet
- : Bayes Network containing structure to evaluate
java.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 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 java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class SearchAlgorithm
public void setOptions(java.lang.String[] options) throws java.lang.Exception
For other options see search algorithm.
setOptions
in interface OptionHandler
setOptions
in class SearchAlgorithm
options
- 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 OptionHandler
getOptions
in class SearchAlgorithm
public java.lang.String CVTypeTipText()
public java.lang.String useProbTipText()
public java.lang.String globalInfo()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |