|
jBNC Toolbox | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjbnc.graphs.BNCInference
Efficient calculation of the joint probability distribution and and conditional probability of the class variable given values of all attributes. Assumes that all nodes are instantiated.
| Field Summary | |
protected double[] |
condClassProb
|
protected int |
nbClasses
|
protected int |
nbVars
|
protected double[][] |
probFuncs
Probability function values for each of the network nodes. |
protected int[][] |
radix
Used to calculate index within the probFunction. |
protected int[][] |
variables
Variables for each of the probability function. |
| Constructor Summary | |
BNCInference(BayesianNetworks.BayesNet net)
|
|
| Method Summary | |
double[] |
getCondClassProb(int[] aCase)
Return values of the class node conditional probability given instantiation of attribute variables. |
double |
getJointProb(int[] aCase)
Return the value of the joint probability for the instantiation of the variables given by parameter 'vars'. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int nbVars
protected int nbClasses
protected double[][] probFuncs
protected int[][] variables
protected int[][] radix
protected double[] condClassProb
| Constructor Detail |
public BNCInference(BayesianNetworks.BayesNet net)
throws java.lang.Exception
net - Description of Parameter
java.lang.Exception - Description of Exception| Method Detail |
public double getJointProb(int[] aCase)
throws java.lang.Exception
aCase - Values for each of the varaibles in the network. The
last variable is class variable.
java.lang.Exception - when size of array 'aCase' is different then
expected.
public double[] getCondClassProb(int[] aCase)
throws java.lang.Exception
aCase - Values for each of the varaibles in the network. The
last variable is class variable. Its value is ignored.
java.lang.Exception - when size of array 'aCase' is different then
expected.
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||