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:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCopy constructor.Evidence
(Evidence evidence, VariableSource variableSource) Evidence
(Proposition proposition) Wraps the proposition. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getCategory
(Node node, int j) int
getCategoryIndex
(String nodeName, String category) getNode
(int nodeIndex) int
getNodeIndex
(String nodeName) int
getNumCategories
(int variable) int
getVariable
(String nodeName) int
hashCode()
boolean
hasNoEvidence
(int variable) boolean
isIncompatibleWith
(VariableSource variableSource) Returna true just in case this evidence has a list of variables equal to those of the given variable source.boolean
isManipulated
(int nodeIndex) static Evidence
Generates a simple exemplar of this class to test serialization.void
setManipulated
(int nodeIndex, boolean manipulated) static Evidence
tautology
(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()
-