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.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents 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 TypeMethodDescriptionbooleanChecks if composition holds--e.g., (X â¥â¥ Y | Z) â§ (X â¥â¥ W |Z) ==> X â¥â¥ (Y ⪠W) |ZbooleanChecks whether the IM is a compositional graphoid.booleanChecks if contraction holds--e.g., (X â¥â¥ Y |Z) â§ (X â¥â¥ W |Z ⪠Y) ==> X â¥â¥ (Y ⪠W) |ZbooleanChecks if decomposition holds, e.g., X â¥â¥ (Y ⪠W) |Z ==> (X â¥â¥ Y |Z) â§ (X â¥â¥ W |Z)voidSets symmetry as assumed--i.e., ensures that X â¥â¥ Y | Z ==> Y â¥â¥ X | Z.voidSets whether triviality as assumed.Returns the independence facts in the form 1:2|3 for use in various Tetrad algorithms.booleangraphoid()Checks whether teh IM is a semigraphoid.booleanChecks if intersection holds--e.g., (X â¥â¥ Y | (Z ⪠W)) â§ (X â¥â¥ W | (Z ⪠Y)) ==> X â¥â¥ (Y ⪠W) |Zstatic voidThe main methods.booleanChecked whether the IM is a semigraphoid.booleansymmetry()Checks is symmetry holds--i.e., X â¥â¥ Y | Z ==> Y â¥â¥ X | ZbooleanChecks 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.- Returns:
- a
IndependenceFactsobject
-
symmetry
public boolean symmetry()Checks is symmetry holds--i.e., X â¥â¥ Y | Z ==> Y â¥â¥ X | Z- Returns:
- a boolean
-
decomposition
public boolean decomposition()Checks if decomposition holds, e.g., X â¥â¥ (Y ⪠W) |Z ==> (X â¥â¥ Y |Z) â§ (X â¥â¥ W |Z)- Returns:
- a boolean
-
weakUnion
public boolean weakUnion()Checks is weak union holds, e.g., X _||_ Y U W | Z ==> X _||_ Y | Z U W- Returns:
- a boolean
-
contraction
public boolean contraction()Checks if contraction holds--e.g., (X â¥â¥ Y |Z) â§ (X â¥â¥ W |Z ⪠Y) ==> X â¥â¥ (Y ⪠W) |Z- Returns:
- a boolean
-
intersection
public boolean intersection()Checks if intersection holds--e.g., (X â¥â¥ Y | (Z ⪠W)) â§ (X â¥â¥ W | (Z ⪠Y)) ==> X â¥â¥ (Y ⪠W) |Z- Returns:
- a boolean
-
composition
public boolean composition()Checks if composition holds--e.g., (X â¥â¥ Y | Z) â§ (X â¥â¥ W |Z) ==> X â¥â¥ (Y ⪠W) |Z- Returns:
- a boolean
-
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.
-