Class BayesInference
- java.lang.Object
-
- de.uka.ipd.sdq.dsexplore.bayesnets.utility.BayesInference
-
public class BayesInference extends Object
This class is used for all inference purposes. Currently, only P(Sample|Bayes Network) is supported. Other inference capabilities will be (hopefully) added later.
-
-
Constructor Summary
Constructors Constructor Description BayesInference(int[][] Graph, int[][] Data)
Constructor for the class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getProbabilityOfSampleGivenBayesNetwork(int[] Sample)
Calculates the P(Sample|Bayes Network).static void
main(String[] args)
-
-
-
Method Detail
-
main
public static void main(String[] args)
-
getProbabilityOfSampleGivenBayesNetwork
public double getProbabilityOfSampleGivenBayesNetwork(int[] Sample)
Calculates the P(Sample|Bayes Network). It is assumed that the Graph has been chosen by the user. Normally, it is recommended that the Graph is learnt from the Data using other classes of this de.uka.ipd.sdq.dsexplore.bayesnets plugin. But one can specify any Graph and any Data that one likes.- Parameters:
Sample
- - The sample as an int array. The length of the Sample has to be equal to the number of variables in the Bayesian Network (this is equal to this.Graph.length)- Returns:
- The probability P(Sample|Bayesian Network) as a double
-
-