|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.bayes.net.estimate.BayesNetEstimator
public class BayesNetEstimator
BayesNetEstimator is the base class for estimating the conditional probability tables of a Bayes network once the structure has been learned.
Valid options are:-A <alpha> Initial count (alpha)
| Constructor Summary | |
|---|---|
BayesNetEstimator()
|
|
| Method Summary | |
|---|---|
java.lang.String |
alphaTipText()
|
double[] |
distributionForInstance(BayesNet bayesNet,
Instance instance)
Calculates the class membership probabilities for the given test instance. |
void |
estimateCPTs(BayesNet bayesNet)
estimateCPTs estimates the conditional probability tables for the Bayes Net using the network structure. |
double |
getAlpha()
Get prior used in probability table estimation |
java.lang.String[] |
getOptions()
Gets the current settings of the classifier. |
java.lang.String |
getRevision()
Returns the revision string. |
java.lang.String |
globalInfo()
This will return a string describing the class. |
void |
initCPTs(BayesNet bayesNet)
initCPTs reserves space for CPTs and set all counts to zero |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options |
void |
setAlpha(double fAlpha)
Set prior used in probability table estimation |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
updateClassifier(BayesNet bayesNet,
Instance instance)
Updates the classifier with the given instance. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BayesNetEstimator()
| Method Detail |
|---|
public void estimateCPTs(BayesNet bayesNet)
throws java.lang.Exception
bayesNet - the bayes net to use
java.lang.Exception - always throws an exception, since subclass needs to be used
public void updateClassifier(BayesNet bayesNet,
Instance instance)
throws java.lang.Exception
bayesNet - the bayes net to useinstance - the new training instance to include in the model
java.lang.Exception - always throws an exception, since subclass needs to be used
public double[] distributionForInstance(BayesNet bayesNet,
Instance instance)
throws java.lang.Exception
bayesNet - the bayes net to useinstance - the instance to be classified
java.lang.Exception - always throws an exception, since subclass needs to be used
public void initCPTs(BayesNet bayesNet)
throws java.lang.Exception
bayesNet - the bayes net to use
java.lang.Exception - always throws an exception, since subclass needs to be usedpublic java.util.Enumeration listOptions()
listOptions in interface OptionHandler
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
-A <alpha> Initial count (alpha)
setOptions in interface OptionHandleroptions - 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 OptionHandlerpublic void setAlpha(double fAlpha)
fAlpha - representing priorpublic double getAlpha()
public java.lang.String alphaTipText()
public java.lang.String globalInfo()
public java.lang.String getRevision()
getRevision in interface RevisionHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||