Package edu.cmu.tetrad.search.utils
Class GraphoidAxioms
java.lang.Object
edu.cmu.tetrad.search.utils.GraphoidAxioms
Checks the graphoid axioms for a set of Independence Model statements.
- Author:
- josephramsey
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Represents a graphoid independence fact--i.e., a fact in a general independence model (IM) X _||_Y | Z. -
Constructor Summary
ConstructorsConstructorDescriptionGraphoidAxioms
(Set<GraphoidAxioms.GraphoidIndFact> facts, List<Node> nodes) Constructor.GraphoidAxioms
(Set<GraphoidAxioms.GraphoidIndFact> facts, List<Node> nodes, Map<GraphoidAxioms.GraphoidIndFact, String> textSpecs) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if composition holds--e.g., (X ⊥⊥ Y | Z) ∧ (X ⊥⊥ W |Z) ==> X ⊥⊥ (Y ∪ W) |Zboolean
Checks whether the IM is a compositional graphoid.boolean
Checks if contraction holds--e.g., (X ⊥⊥ Y |Z) ∧ (X ⊥⊥ W |Z ∪ Y) ==> X ⊥⊥ (Y ∪ W) |Zboolean
Checks if decomposition holds, e.g., X ⊥⊥ (Y ∪ W) |Z ==> (X ⊥⊥ Y |Z) ∧ (X ⊥⊥ W |Z)void
Sets symmetry as assumed--i.e., ensures that X ⊥⊥ Y | Z ==> Y ⊥⊥ X | Z.void
Sets whether triviality as assumed.Returns the independence facts in the form 1:2|3 for use in various Tetrad algorithms.boolean
graphoid()
Checks whether teh IM is a semigraphoid.boolean
Checks if intersection holds--e.g., (X ⊥⊥ Y | (Z ∪ W)) ∧ (X ⊥⊥ W | (Z ∪ Y)) ==> X ⊥⊥ (Y ∪ W) |Zstatic void
The main methods.boolean
Checked whether the IM is a semigraphoid.boolean
symmetry()
Checks is symmetry holds--i.e., X ⊥⊥ Y | Z ==> Y ⊥⊥ X | Zboolean
Checks is weak union holds, e.g., X _||_ Y U W | Z ==> X _||_ Y | Z U W
-
Constructor Details
-
GraphoidAxioms
Constructor.- Parameters:
facts
- A set of GraphoidIndFacts.nodes
- The list of nodes.- See Also:
-
GraphoidAxioms
public GraphoidAxioms(Set<GraphoidAxioms.GraphoidIndFact> facts, List<Node> nodes, Map<GraphoidAxioms.GraphoidIndFact, String> textSpecs) Constructor.- Parameters:
facts
- A list of GraphoidIndFacts.nodes
- The list of nodes.textSpecs
- A map from GraphoidIndFacts to String text specs. The text specs are used for printing information to the user about which facts are found or are missing.- See Also:
-
-
Method Details
-
main
The main methods.- Parameters:
args
- E.g., "java -cp tetrad-gui-7.1.3-SNAPSHOT-launch.jar edu.cmu.tetrad.search.utils.GraphoidAxioms udags5.txt 5" Here, udgas5.txt is a file containing independence models, one per line, where each independence fast is specified by, e.g., "1:23|56", indicating that 1 is independence of 2 and 3 conditional on 5 and 6. No more than 9 variables can be handled this way. If you need more, let us know and we'll change the format.
-
semigraphoid
public boolean semigraphoid()Checked whether the IM is a semigraphoid.- Returns:
- True, if so.
-
graphoid
public boolean graphoid()Checks whether teh IM is a semigraphoid.- Returns:
- True, if so.
-
compositionalGraphoid
public boolean compositionalGraphoid()Checks whether the IM is a compositional graphoid.- Returns:
- True, if so.
-
getIndependenceFacts
Returns the independence facts in the form 1:2|3 for use in various Tetrad algorithms. Assumes decomposition and compositios, so that there are no complex independence facts. -
symmetry
public boolean symmetry()Checks is symmetry holds--i.e., X ⊥⊥ Y | Z ==> Y ⊥⊥ X | Z -
decomposition
public boolean decomposition()Checks if decomposition holds, e.g., X ⊥⊥ (Y ∪ W) |Z ==> (X ⊥⊥ Y |Z) ∧ (X ⊥⊥ W |Z) -
weakUnion
public boolean weakUnion()Checks is weak union holds, e.g., X _||_ Y U W | Z ==> X _||_ Y | Z U W -
contraction
public boolean contraction()Checks if contraction holds--e.g., (X ⊥⊥ Y |Z) ∧ (X ⊥⊥ W |Z ∪ Y) ==> X ⊥⊥ (Y ∪ W) |Z -
intersection
public boolean intersection()Checks if intersection holds--e.g., (X ⊥⊥ Y | (Z ∪ W)) ∧ (X ⊥⊥ W | (Z ∪ Y)) ==> X ⊥⊥ (Y ∪ W) |Z -
composition
public boolean composition()Checks if composition holds--e.g., (X ⊥⊥ Y | Z) ∧ (X ⊥⊥ W |Z) ==> X ⊥⊥ (Y ∪ W) |Z -
ensureTriviality
public void ensureTriviality()Sets whether triviality as assumed. -
ensureSymmetry
public void ensureSymmetry()Sets symmetry as assumed--i.e., ensures that X ⊥⊥ Y | Z ==> Y ⊥⊥ X | Z.
-