类 BayesNetEstimator
java.lang.Object
weka.classifiers.bayes.net.estimate.BayesNetEstimator
- 所有已实现的接口:
Serializable
,OptionHandler
,RevisionHandler
- 直接已知子类:
MultiNomialBMAEstimator
,SimpleEstimator
public class BayesNetEstimator
extends Object
implements OptionHandler, Serializable, RevisionHandler
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)
- 版本:
- $Revision: 1.4 $
- 作者:
- Remco Bouckaert (rrb@xm.co.nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明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 estimationString[]
Gets the current settings of the classifier.Returns the revision string.This will return a string describing the class.void
initCPTs reserves space for CPTs and set all counts to zeroReturns an enumeration describing the available optionsvoid
setAlpha
(double fAlpha) Set prior used in probability table estimationvoid
setOptions
(String[] options) Parses a given list of options.void
updateClassifier
(BayesNet bayesNet, Instance instance) Updates the classifier with the given instance.
-
构造器详细资料
-
BayesNetEstimator
public BayesNetEstimator()
-
-
方法详细资料
-
estimateCPTs
estimateCPTs estimates the conditional probability tables for the Bayes Net using the network structure.- 参数:
bayesNet
- the bayes net to use- 抛出:
Exception
- always throws an exception, since subclass needs to be used
-
updateClassifier
Updates the classifier with the given instance.- 参数:
bayesNet
- the bayes net to useinstance
- the new training instance to include in the model- 抛出:
Exception
- always throws an exception, since subclass needs to be used
-
distributionForInstance
Calculates the class membership probabilities for the given test instance.- 参数:
bayesNet
- the bayes net to useinstance
- the instance to be classified- 返回:
- predicted class probability distribution
- 抛出:
Exception
- always throws an exception, since subclass needs to be used
-
initCPTs
initCPTs reserves space for CPTs and set all counts to zero- 参数:
bayesNet
- the bayes net to use- 抛出:
Exception
- always throws an exception, since subclass needs to be used
-
listOptions
Returns an enumeration describing the available options- 指定者:
listOptions
在接口中OptionHandler
- 返回:
- an enumeration of all the available options
-
setOptions
Parses a given list of options. Valid options are:-A <alpha> Initial count (alpha)
- 指定者:
setOptions
在接口中OptionHandler
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the classifier.- 指定者:
getOptions
在接口中OptionHandler
- 返回:
- an array of strings suitable for passing to setOptions
-
setAlpha
public void setAlpha(double fAlpha) Set prior used in probability table estimation- 参数:
fAlpha
- representing prior
-
getAlpha
public double getAlpha()Get prior used in probability table estimation- 返回:
- prior
-
alphaTipText
- 返回:
- a string to describe the Alpha option.
-
globalInfo
This will return a string describing the class.- 返回:
- The string.
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-