Class BayesianBeliefNetwork
java.lang.Object
org.episteme.core.mathematics.discrete.DirectedWeightedGraph<String,Real>
org.episteme.core.mathematics.ml.BayesianBeliefNetwork
- All Implemented Interfaces:
Graph<String>, WeightedGraph<String,Real>
Represents a Bayesian Belief Network (BBN).
A probabilistic graphical model that represents a set of variables and their conditional dependencies via a directed acyclic graph (DAG).
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Nested Class Summary
Nested classes/interfaces inherited from interface Graph
Graph.Edge<V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDependency(String parent, String child) Adds a dependency between two variables.voidaddVariable(String name, String... states) Adds a random variable to the network.Performs exact inference using the Variable Elimination algorithm.voidSets the Conditional Probability Table (CPT) for a variable.Methods inherited from class DirectedWeightedGraph
addEdge, addVertex, degree, edges, getDefaultWeight, getWeight, getWeightedEdges, getWeightedEdgesFrom, isDirected, neighbors, vertexCount, verticesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface WeightedGraph
addEdge, hasEdge
-
Constructor Details
-
BayesianBeliefNetwork
public BayesianBeliefNetwork()
-
-
Method Details
-
addVariable
-
addDependency
-
setCPT
Sets the Conditional Probability Table (CPT) for a variable.- Parameters:
name- The variable name.probabilities- The probabilities in a specific order corresponding to the parent states combinations.
-
query
Performs exact inference using the Variable Elimination algorithm.- Parameters:
target- The variable to query.targetState- The state of interest.evidence- A map of observed variables and their states.- Returns:
- The probability P(target=targetState | evidence).
-