|
jBNC Toolbox | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjbnc.util.BNTools
Utilities for Bayesian networks.
Field Summary | |
static double |
beta_ijk
A some small value larger than zero. |
Constructor Summary | |
BNTools()
|
Method Summary | |
static double |
gammaLn(double xx)
Returns the value ln[ gamma(xx)] for xx > 0 Implementation based on W.H. |
static double |
getASBMParamComponent(BayesianNetworks.BayesNet net,
DatasetInt dataset,
boolean usePriors,
double alphaK)
Return network parameters component of the asymptotic standard Bayesian measure (ASBM). |
static int |
getNetworkDimension(BayesianNetworks.BayesNet net)
Returns dimension of a Bayesian network. |
protected static InferenceGraphs.InferenceGraphNode[] |
getNodes(Dataset dataset,
InferenceGraphs.InferenceGraph graph)
Get node names from a graph in an order they appear in the dataset. |
protected static void |
learnParameters_old(BayesianNetworks.BayesNet net,
Dataset data,
boolean useDirihlet,
double alphaK)
Learns parameters for the current network structure. |
static void |
learnParameters(BayesianNetworks.BayesNet net,
DatasetInt data,
boolean useDirihlet,
double alphaK)
Learns parameters for the current network structure. |
static void |
learnParameters(BayesianNetworks.BayesNet net,
FrequencyCalc fc,
boolean useDirihlet,
double alphaK)
Learns parameters for the current network structure. |
static void |
main(java.lang.String[] args)
Description of the Method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final double beta_ijk
Constructor Detail |
public BNTools()
Method Detail |
public static int getNetworkDimension(BayesianNetworks.BayesNet net) throws java.lang.Exception
Dimension of a Bayesian network: Let X be a set of random
variables and B be a Bayesian network defined over X. The dimension of
this network, Dim(B), is the number of free parameters required to
completely specify the joint probability distribution of X.
E. Castillo, J. M. Gutierrez and A. S. Hadi, Expert Systems and Probabilistic Network Models , Springer, 1997. p.486.
net
- Description of Parameter
java.lang.Exception
- .public static final double getASBMParamComponent(BayesianNetworks.BayesNet net, DatasetInt dataset, boolean usePriors, double alphaK) throws java.lang.Exception
q = sumi =1...n sumj =1... qi sumk =1...ri Nijk log Nijk / Nij
where Nijk means that variable Xi is in configuration k and parents of variable Xi are in configuration j .
E. Castillo, J. M. Gutierrez and A. S. Hadi, Expert Systems and Probabilistic Network Models , Springer, 1997. p.494, eq.(11.28).
net
- Description of Parameterdataset
- Description of ParameterusePriors
- Description of ParameteralphaK
- Description of Parameter
java.lang.Exception
- .public static double gammaLn(double xx) throws java.lang.Exception
xx
-
java.lang.Exception
- When xx <= 0.public static void learnParameters(BayesianNetworks.BayesNet net, FrequencyCalc fc, boolean useDirihlet, double alphaK) throws java.lang.Exception
net
- Bayesian network.useDirihlet
- Indicates whether Dirihlet priors should be used for
network parameters.alphaK
- alphak parameter for Dirihlet priors. All
alphak are assumed to be the same and greater than zero.fc
- Description of Parameter
java.lang.Exception
public static void learnParameters(BayesianNetworks.BayesNet net, DatasetInt data, boolean useDirihlet, double alphaK) throws java.lang.Exception
net
- Bayesian network.useDirihlet
- Indicates whether Dirihlet priors should be used for
network parameters.alphaK
- alphak parameter for Dirihlet priors. All
alphak are assumed to be the same and greater than zero.data
- Description of Parameter
java.lang.Exception
public static void main(java.lang.String[] args)
args
- Description of Parameterprotected static InferenceGraphs.InferenceGraphNode[] getNodes(Dataset dataset, InferenceGraphs.InferenceGraph graph) throws java.lang.Exception
dataset
- Description of Parametergraph
- Description of Parameter
java.lang.Exception
- Description of Exceptionprotected static void learnParameters_old(BayesianNetworks.BayesNet net, Dataset data, boolean useDirihlet, double alphaK) throws java.lang.Exception
net
- Bayesian network.useDirihlet
- Indicates whether Dirihlet priors should be used for
network parameters.alphaK
- alphak parameter for Dirihlet priors. All
alphak are assumed to be the same and greater than zero.data
- Description of Parameter
java.lang.Exception
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |