|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cc.mallet.grmm.types.Factors
public class Factors
A static utility class containing utility methods for dealing with factors, especially TableFactor objects. Created: Mar 17, 2005
Constructor Summary | |
---|---|
Factors()
|
Method Summary | |
---|---|
static Factor |
asFactor(Inferencer inf)
Adapter that allows an Inferencer to be treated as if it were a factor. |
static Factor |
average(Factor ptl1,
Factor ptl2,
double weight)
|
static int[] |
computeSizes(Factor result)
|
static Variable[] |
computeVars(Factor result)
|
static Variable[] |
continuousVarsOf(Factor fg)
|
static double |
corr(Factor factor)
|
static Variable[] |
discreteVarsOf(Factor fg)
|
static double |
distLinf(AbstractTableFactor f1,
AbstractTableFactor f2)
|
static double |
distValueLinf(AbstractTableFactor f1,
AbstractTableFactor f2)
|
static double |
euclideanDistance(AbstractTableFactor f1,
AbstractTableFactor f2)
|
static double |
KL(AbstractTableFactor f1,
AbstractTableFactor f2)
|
static double |
l1Distance(AbstractTableFactor f1,
AbstractTableFactor f2)
|
static double |
logErrorRange(AbstractTableFactor f1,
AbstractTableFactor f2)
Implements the error range measure from Ihler et al. |
static Factor |
mix(AbstractTableFactor f1,
AbstractTableFactor f2,
double alpha)
Returns a new Factor F = alpha * f1 + (1 - alpha) * f2. |
static Factor |
multiplyAll(java.util.Collection factors)
|
static double |
mutualInformation(Factor factor)
Given a joint distribution over two variables, returns their mutual information. |
static CPT |
normalizeAsCpt(AbstractTableFactor ptl,
Variable var)
|
static double |
oneDistance(Factor bel1,
Factor bel2)
|
static TableFactor |
retainMass(DiscreteFactor ptl,
double alpha)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Factors()
Method Detail |
---|
public static CPT normalizeAsCpt(AbstractTableFactor ptl, Variable var)
public static Factor average(Factor ptl1, Factor ptl2, double weight)
public static double oneDistance(Factor bel1, Factor bel2)
public static TableFactor retainMass(DiscreteFactor ptl, double alpha)
public static int[] computeSizes(Factor result)
public static Variable[] computeVars(Factor result)
public static double mutualInformation(Factor factor)
factor
- A joint distribution. Must be normalized, and over exactly two variables.
public static double KL(AbstractTableFactor f1, AbstractTableFactor f2)
public static Factor mix(AbstractTableFactor f1, AbstractTableFactor f2, double alpha)
public static double euclideanDistance(AbstractTableFactor f1, AbstractTableFactor f2)
public static double l1Distance(AbstractTableFactor f1, AbstractTableFactor f2)
public static Factor asFactor(Inferencer inf)
inf
- An inferencer on which computeMarginals() has been called.
public static Variable[] discreteVarsOf(Factor fg)
public static Variable[] continuousVarsOf(Factor fg)
public static double corr(Factor factor)
public static Factor multiplyAll(java.util.Collection factors)
public static double distLinf(AbstractTableFactor f1, AbstractTableFactor f2)
public static double distValueLinf(AbstractTableFactor f1, AbstractTableFactor f2)
public static double logErrorRange(AbstractTableFactor f1, AbstractTableFactor f2)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |