|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blog.Evidence
public class Evidence
Stores the information extracted from evidence file. The evidence is of 2 kinds:
height(mother(John)) = 13.7then the evidence object creates a new random variable whose value is the value of the term height(mother(John)).
SymbolEvidenceStatement
,
ValueEvidenceStatement
Constructor Summary | |
---|---|
Evidence()
Creates a new Evidence object with no evidence. |
Method Summary | |
---|---|
void |
addAll(Evidence another)
Adds all symbol and value evidence statements from another evidence object. |
void |
addSymbolEvidence(SymbolEvidenceStatement sevid)
|
void |
addValueEvidence(ValueEvidenceStatement evid)
|
boolean |
checkTypesAndScope(Model model)
Returns true if the evidence satisfies type and scope constraints. |
int |
compile()
Does compilation steps that can only be done correctly once the model is complete. |
double |
getEvidenceLogProb(PartialWorld curWorld)
|
double |
getEvidenceLogProb(PartialWorld curWorld,
Timestep t)
|
double |
getEvidenceProb(PartialWorld curWorld)
|
double |
getEvidenceProb(PartialWorld curWorld,
Timestep t)
|
java.util.Set |
getEvidenceVars()
Returns the set of evidence variables for which the user has observed values. |
java.util.Set |
getEvidenceVars(Timestep t)
|
java.lang.Object |
getObservedValue(BayesNetVar var)
Returns the observed value of the given variable. |
SkolemConstant |
getSkolemConstant(java.lang.String name)
Returns the SkolemConstant object for the given symbol, or null if no such Skolem constant has been introduced. |
java.util.List |
getSkolemConstants()
Returns an unmodifiable List of the SkolemConstant objects introduced by this evidence, in the order they were introduced. |
java.util.Collection |
getSymbolEvidence()
Returns an unmodifiable Collection of SymbolEvidenceStatement objects. |
java.util.Collection |
getValueEvidence()
Returns an unmodifiable Collection of ValueEvidenceStatement objects. |
boolean |
isDetermined(PartialWorld w)
Returns true if the given partial world is complete enough to determine whether this evidence is true or false. |
boolean |
isTrue(PartialWorld w)
Returns true if this evidence is true in the given world; otherwise false. |
void |
print(java.io.PrintStream s)
Prints the evidence to the given stream. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Evidence()
Method Detail |
---|
public void addSymbolEvidence(SymbolEvidenceStatement sevid)
public java.util.Collection getSymbolEvidence()
public void addValueEvidence(ValueEvidenceStatement evid)
public java.util.Collection getValueEvidence()
public void addAll(Evidence another)
public SkolemConstant getSkolemConstant(java.lang.String name)
public java.util.List getSkolemConstants()
public java.util.Set getEvidenceVars()
public java.util.Set getEvidenceVars(Timestep t)
public java.lang.Object getObservedValue(BayesNetVar var)
java.lang.IllegalArgumentException
- if no value has been observed
for the given variablepublic boolean isDetermined(PartialWorld w)
public boolean isTrue(PartialWorld w)
public void print(java.io.PrintStream s)
public double getEvidenceProb(PartialWorld curWorld)
public double getEvidenceProb(PartialWorld curWorld, Timestep t)
public double getEvidenceLogProb(PartialWorld curWorld)
public double getEvidenceLogProb(PartialWorld curWorld, Timestep t)
public boolean checkTypesAndScope(Model model)
public int compile()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |