edu.ucla.belief
Class BeliefNetworks

Object
  extended by BeliefNetworks

public class BeliefNetworks
extends Object

Contains a collection of static methods relating to belief networks that are sometimes useful. This class can not be instantiated.


Method Summary
static boolean ensureCPTProperty(BeliefNetwork bn)
           
static boolean ensureCPTProperty(FiniteVariable var)
           
static boolean ensureCPTProperty(FiniteVariable var, double[] oldValues, double[] newValues)
          Assumes that the CPT variable is indexed as the least significant entry.
static boolean ensureCPTProperty(Table t, FiniteVariable var)
           
static DirectedGraph inducedGraph(Map potentials)
          Generates the graph induced by the potential map.
static Table randomCPT(Collection condvars, FiniteVariable var)
          Returns a cpt where the values in the table are random numbers consistent with it being a CPT.
static DirectedGraph randomGraph(Object[] nodes, int connectivity)
          Generates a random directed graph using nodes as the vertices.
static BeliefNetwork randomNetwork(DirectedGraph g)
          returns a belief network with random CPTs.
static BeliefNetwork randomNetwork(int nodeCount, double edgeProbability)
          Creates a random network where each edge has probability edgeProbability of being included.
static BeliefNetwork randomNetwork(int nodeCount, int connectivity)
          Generates a random network consisting of boolean variables.
static boolean satisfiesCPTProperty(Table t, FiniteVariable var, double epsilon)
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

inducedGraph

public static DirectedGraph inducedGraph(Map potentials)
Generates the graph induced by the potential map. The nodes in the graph are the keys in the mapping. The values in the mapping are Potentials.


randomGraph

public static DirectedGraph randomGraph(Object[] nodes,
                                        int connectivity)
Generates a random directed graph using nodes as the vertices. Creates a random graph whose width is usually relatively close to the value in connectivity.


randomCPT

public static Table randomCPT(Collection condvars,
                              FiniteVariable var)
Returns a cpt where the values in the table are random numbers consistent with it being a CPT.


randomNetwork

public static BeliefNetwork randomNetwork(DirectedGraph g)
returns a belief network with random CPTs. The nodes of the the graph must be finite variables.


randomNetwork

public static BeliefNetwork randomNetwork(int nodeCount,
                                          double edgeProbability)
Creates a random network where each edge has probability edgeProbability of being included. All variables are binary.


randomNetwork

public static BeliefNetwork randomNetwork(int nodeCount,
                                          int connectivity)
Generates a random network consisting of boolean variables.

Parameters:
nodeCount - the number of variables.
connectivity - the connectity of the network as described in randomGraph.

satisfiesCPTProperty

public static boolean satisfiesCPTProperty(Table t,
                                           FiniteVariable var,
                                           double epsilon)

ensureCPTProperty

public static boolean ensureCPTProperty(BeliefNetwork bn)

ensureCPTProperty

public static boolean ensureCPTProperty(FiniteVariable var)

ensureCPTProperty

public static boolean ensureCPTProperty(Table t,
                                        FiniteVariable var)

ensureCPTProperty

public static boolean ensureCPTProperty(FiniteVariable var,
                                        double[] oldValues,
                                        double[] newValues)
Assumes that the CPT variable is indexed as the least significant entry.



Copyright 2010 UCLA Automated Reasoning Group