Package edu.cmu.tetrad.bayes
Class Evidence
java.lang.Object
edu.cmu.tetrad.bayes.Evidence
- All Implemented Interfaces:
TetradSerializable,Serializable
Stores information for a variable source about evidence we have for each variable as
well as whether each variable has been manipulated.
- Author:
- Joseph Ramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCopy constructor.Evidence(Evidence evidence, VariableSource variableSource) Evidence(Proposition proposition) Wraps the proposition. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetCategory(Node node, int j) intgetCategoryIndex(String nodeName, String category) getNode(int nodeIndex) intgetNodeIndex(String nodeName) intgetNumCategories(int variable) intgetVariable(String nodeName) inthashCode()booleanhasNoEvidence(int variable) booleanisIncompatibleWith(VariableSource variableSource) Returna true just in case this evidence has a list of variables equal to those of the given variable source.booleanisManipulated(int nodeIndex) static EvidenceGenerates a simple exemplar of this class to test serialization.voidsetManipulated(int nodeIndex, boolean manipulated) static Evidencetautology(VariableSource variableSource) toString()
-
Constructor Details
-
Evidence
Copy constructor. -
Evidence
Wraps the proposition. The Bayes IM and manipulation will be null. -
Evidence
-
-
Method Details
-
tautology
-
serializableInstance
Generates a simple exemplar of this class to test serialization. -
getVariableSource
- Returns:
- the Bayes IM that this is evidence for.
-
getNodeIndex
-
getCategoryIndex
-
getNumNodes
public int getNumNodes() -
getNode
-
getVariable
-
getNumCategories
public int getNumCategories(int variable) -
getProposition
-
isManipulated
public boolean isManipulated(int nodeIndex) -
setManipulated
public void setManipulated(int nodeIndex, boolean manipulated) -
toString
-
hasNoEvidence
public boolean hasNoEvidence(int variable) -
getVariablesInEvidence
- Returns:
- the variable for which there is evidence.
-
getCategory
-
isIncompatibleWith
Returna true just in case this evidence has a list of variables equal to those of the given variable source. -
equals
-
hashCode
public int hashCode()
-