|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cc.mallet.grmm.inference.RandomGraphs
public class RandomGraphs
Utility class for generating many useful kinds of random graphical models. Created: Mar 26, 2005
Nested Class Summary | |
---|---|
static interface |
RandomGraphs.FactorGenerator
|
static class |
RandomGraphs.UniformFactorGenerator
|
Constructor Summary | |
---|---|
RandomGraphs()
|
Method Summary | |
---|---|
static void |
addRandomNodePotentials(java.util.Random r,
FactorGraph mdl)
|
static UndirectedModel |
createGrid(RandomGraphs.FactorGenerator gener,
int size)
|
static FactorGraph |
createGridWithObs(RandomGraphs.FactorGenerator gridGener,
RandomGraphs.FactorGenerator obsGener,
int size)
|
static FactorGraph |
createRandomChain(Randoms r,
int length)
|
static FactorGraph |
createUniformChain(int length)
|
static FactorGraph |
createUniformGrid(int length)
|
static double[] |
generateAttractivePotentialValues(java.util.Random r,
double edgeWeight)
|
static double[] |
generateMixedPotentialValues(java.util.Random r,
double edgeWeight)
|
static UndirectedGrid |
randomAttractiveGrid(int size,
double edgeWeight,
java.util.Random r)
Constructs a square grid of a given size with random attractive potentials. |
static UndirectedGrid |
randomFrustratedGrid(int size,
double edgeWeight,
java.util.Random r)
Constructs a square grid of a given size with random frustrated potentials. |
static UndirectedModel |
randomFrustratedTree(int size,
int maxChildren,
double edgeWeight,
java.util.Random r)
|
static TableFactor |
randomNodePotential(java.util.Random r,
Variable var)
|
static UndirectedGrid |
randomRepulsiveGrid(int size,
double edgeWeight,
java.util.Random r)
Constructs a square grid of a given size with random repulsive potentials. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomGraphs()
Method Detail |
---|
public static double[] generateAttractivePotentialValues(java.util.Random r, double edgeWeight)
public static double[] generateMixedPotentialValues(java.util.Random r, double edgeWeight)
public static UndirectedGrid randomAttractiveGrid(int size, double edgeWeight, java.util.Random r)
We use a spin (i.e., {-1, 1}) representation. For each edge st, a single edge weight w_st is generated uniformly in (0,d). Then exponential parameters for the BM representation are chosen by
theta_st = 4 * w_st theta_s = 2 (\sum(t in N(s)) w_st)
size
- The length on one edge of the grid.edgeWeight
- A positive number giving the maximum potential strengthr
- Object for generating random numbers.
public static UndirectedGrid randomRepulsiveGrid(int size, double edgeWeight, java.util.Random r)
We use a spin (i.e., {-1, 1}) representation. For each edge st, a single edge weight w_st is generated uniformly in (0,d). Then exponential parameters for the BM representation are chosen by
theta_st = 4 * w_st theta_s = 2 (\sum(t in N(s)) w_st)
size
- The length on one edge of the grid.edgeWeight
- A positive number giving the maximum ansolute potential strengthr
- Object for generating random numbers.
public static UndirectedGrid randomFrustratedGrid(int size, double edgeWeight, java.util.Random r)
We use a spin (i.e., {-1, 1}) representation. For each edge st, a single edge weight w_st is generated uniformly in (0,d). Then exponential parameters for the BM representation are chosen by
theta_st = 4 * w_st theta_s = 2 (\sum(t in N(s)) w_st)
size
- The length on one edge of the grid.edgeWeight
- A positive number giving the maximum potential strengthr
- Object for generating random numbers.
public static UndirectedModel randomFrustratedTree(int size, int maxChildren, double edgeWeight, java.util.Random r)
public static void addRandomNodePotentials(java.util.Random r, FactorGraph mdl)
public static TableFactor randomNodePotential(java.util.Random r, Variable var)
public static FactorGraph createUniformChain(int length)
public static FactorGraph createUniformGrid(int length)
public static FactorGraph createRandomChain(Randoms r, int length)
public static UndirectedModel createGrid(RandomGraphs.FactorGenerator gener, int size)
public static FactorGraph createGridWithObs(RandomGraphs.FactorGenerator gridGener, RandomGraphs.FactorGenerator obsGener, int size)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |