edu.ucla.belief
Class RandomNetworks

Object
  extended by RandomNetworks

public class RandomNetworks
extends Object

Contains a collection of static methods relating to generating random networks


Method Summary
static Table deterministicCPT(Collection condvars, FiniteVariable var)
          Returns a deterministic CPT(For each instance of the parents, one instance of the variable has value 1, the rest 0.
static BeliefNetwork deterministicNetwork(DirectedGraph g)
          Creates a deterministic network from the graph of variables supplied.
static BeliefNetwork deterministicNetwork(int nodeCount, double edgeProbability)
          Creates a deterministic network from the random graph generated using the supplied parameters.
static BeliefNetwork deterministicNetwork(int nodeCount, int connectivity)
          Generates a deterministic network from the random graph generated using the supplied parameters.
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 Table randomCPT(Collection condvars, FiniteVariable var, double bias)
           
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 uniformly random CPTs.
static BeliefNetwork randomNetwork(DirectedGraph g, double bias)
          Returns a belief network with biased 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, double edgeProbability, double bias)
           
static BeliefNetwork randomNetwork(int nodeCount, int connectivity)
          Generates a random network consisting of boolean variables.
static BeliefNetwork randomNetwork(int nodeCount, int connectivity, double bias)
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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.


deterministicCPT

public static Table deterministicCPT(Collection condvars,
                                     FiniteVariable var)
Returns a deterministic CPT(For each instance of the parents, one instance of the variable has value 1, the rest 0.


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.


randomCPT

public static Table randomCPT(Collection condvars,
                              FiniteVariable var,
                              double bias)

randomNetwork

public static BeliefNetwork randomNetwork(DirectedGraph g,
                                          double bias)
Returns a belief network with biased CPTs. The FiniteVariables must


randomNetwork

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


deterministicNetwork

public static BeliefNetwork deterministicNetwork(DirectedGraph g)
Creates a deterministic network from the graph of variables supplied.


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,
                                          double edgeProbability,
                                          double bias)

deterministicNetwork

public static BeliefNetwork deterministicNetwork(int nodeCount,
                                                 double edgeProbability)
Creates a deterministic network from the random graph generated using the supplied parameters.


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.

randomNetwork

public static BeliefNetwork randomNetwork(int nodeCount,
                                          int connectivity,
                                          double bias)

deterministicNetwork

public static BeliefNetwork deterministicNetwork(int nodeCount,
                                                 int connectivity)
Generates a deterministic network from the random graph generated using the supplied parameters.



Copyright 2010 UCLA Automated Reasoning Group