|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectRBNpackage.ProbForm
RBNpackage.ProbFormConstant
public class ProbFormConstant
A ProbFormConstant represents a probability constant. The formula can also represent an unknown parameter. In this case, the string paramname contains the name of the parameter. In all cases, a numeric value is associated with the ProbFormConstant, so that it is always a valid probability formula that can be evaluated. When the formula represents a parameter, then this numeric value is a current estimate of the parameter value
Field Summary | |
---|---|
double |
cval
|
Fields inherited from class RBNpackage.ProbForm |
---|
RSymbs, SSymbs |
Constructor Summary | |
---|---|
ProbFormConstant()
|
|
ProbFormConstant(double v)
|
|
ProbFormConstant(java.lang.String pn)
|
Method Summary | |
---|---|
java.lang.String |
asString()
|
java.lang.String |
asString(int depth)
|
java.lang.String |
asString(int depth,
RelStruc A)
|
java.lang.String |
asString(RelStruc A)
|
ProbForm |
conditionEvidence(Instantiation inst)
|
ProbForm |
conditionEvidence(RelStruc A,
Instantiation inst)
Simplify ProbForm by substituting values of instantiated R-atoms and evaluating subformulas no longer dependent on any uninstantiated R-atom. |
boolean |
dependsOn(java.lang.String variable,
RelStruc A,
Instantiation data)
Checks whether this prob.form depends on the unknown parameter 'variable' when prob.form is evaluated over input structure A and relative to instantiation (data) data. |
double |
evalSample(RelStruc A,
java.util.Hashtable atomhasht,
Instantiation inst,
long[] timers)
Evaluate this probform over RelStruc A. |
double |
evaluate(RelStruc A,
Instantiation inst,
java.lang.String[] vars,
int[] tuple,
boolean useCurrentCvals)
Evaluate this ProbForm for input structure A, instantiation inst, under the substitution tuple for vars. |
int |
evaluatesTo(RelStruc A)
|
int |
evaluatesTo(RelStruc A,
Instantiation inst,
boolean usesampleinst,
java.util.Hashtable atomhasht)
Returns 0 if this probform evaluates to zero over structure A and with respect to instantiation inst, but irrespective of any instantiation of other probabilistic atoms. |
java.lang.String[] |
freevars()
returns the free variables of the formula |
double |
getCval()
|
java.lang.String |
getParamName()
|
java.util.Vector |
makeParentVec(RelStruc A)
returns the vector of (ground!) Atoms on which the evaluation of the probform depends |
java.util.Vector |
makeParentVec(RelStruc A,
Instantiation inst)
same as previous but with respect to the given truth values in the Instantiation argument |
boolean |
multlinOnly()
returns true if ProbForm only contains multilinear combination functions |
java.lang.String[] |
parameters()
Returns all the parameters that this ProbForm depends on |
void |
setParameters(java.lang.String[] params,
double[] values)
Sets all occurrences of parameters appearing in params to their corresponding value in values. |
ProbForm |
sEval(RelStruc A)
Returns a ProbForm in which the dependence on A is already pre-evaluated (substitution lists in combination functions, and values of ProbFormSFormula) |
ProbForm |
substitute(java.lang.String[] vars,
int[] args)
returns the formula obtained by substituting args for the vars in the formula. |
ProbForm |
substitute(java.lang.String[] vars,
java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public double cval
Constructor Detail |
---|
public ProbFormConstant()
public ProbFormConstant(double v)
public ProbFormConstant(java.lang.String pn)
Method Detail |
---|
public java.lang.String[] freevars()
ProbForm
freevars
in class ProbForm
public boolean multlinOnly()
ProbForm
multlinOnly
in class ProbForm
public ProbForm substitute(java.lang.String[] vars, int[] args)
ProbForm
substitute
in class ProbForm
public ProbForm substitute(java.lang.String[] vars, java.lang.String[] args)
substitute
in class ProbForm
public ProbForm conditionEvidence(RelStruc A, Instantiation inst)
ProbForm
conditionEvidence
in class ProbForm
public java.util.Vector makeParentVec(RelStruc A)
ProbForm
makeParentVec
in class ProbForm
public java.util.Vector makeParentVec(RelStruc A, Instantiation inst)
ProbForm
makeParentVec
in class ProbForm
public ProbForm conditionEvidence(Instantiation inst)
conditionEvidence
in class ProbForm
public boolean dependsOn(java.lang.String variable, RelStruc A, Instantiation data)
ProbForm
dependsOn
in class ProbForm
public double evaluate(RelStruc A, Instantiation inst, java.lang.String[] vars, int[] tuple, boolean useCurrentCvals)
ProbForm
evaluate
in class ProbForm
public double evalSample(RelStruc A, java.util.Hashtable atomhasht, Instantiation inst, long[] timers)
ProbForm
evalSample
in class ProbForm
public int evaluatesTo(RelStruc A)
evaluatesTo
in class ProbForm
public int evaluatesTo(RelStruc A, Instantiation inst, boolean usesampleinst, java.util.Hashtable atomhasht)
ProbForm
evaluatesTo
in class ProbForm
public ProbForm sEval(RelStruc A)
ProbForm
sEval
in class ProbForm
public java.lang.String getParamName()
public double getCval()
public java.lang.String[] parameters()
ProbForm
parameters
in class ProbForm
public java.lang.String asString(int depth)
asString
in class ProbForm
public java.lang.String asString()
asString
in class ProbForm
public java.lang.String asString(int depth, RelStruc A)
asString
in class ProbForm
public java.lang.String asString(RelStruc A)
asString
in class ProbForm
public void setParameters(java.lang.String[] params, double[] values)
ProbForm
setParameters
in class ProbForm
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |