Package edu.cmu.tetrad.search
Class PcAll
java.lang.Object
edu.cmu.tetrad.search.PcAll
- All Implemented Interfaces:
GraphSearch
Implements a convervative version of PC, in which the Markov condition is assumed but faithfulness is tested
locally.
- Author:
- Joseph Ramsey (this version).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
static enum
static enum
-
Constructor Summary
ConstructorsConstructorDescriptionPcAll
(IndependenceTest independenceTest) Constructs a CPC algorithm that uses the given independence test as oracle. -
Method Summary
Modifier and TypeMethodDescriptionint
getDepth()
long
getGraph()
The graph that's constructed during the search.int
boolean
static boolean
isArrowpointAllowed
(Object from, Object to, Knowledge knowledge) Checks if an arrowpoint is allowed by background knowledge.static boolean
isArrowpointAllowed1
(Node from, Node to, Knowledge knowledge) search()
void
setAggressivelyPreventCycles
(boolean aggressivelyPreventCycles) Sets to true just in case edges will not be added if they would create cycles.void
setColliderDiscovery
(PcAll.ColliderDiscovery colliderDiscovery) void
setConcurrent
(PcAll.Concurrent concurrent) void
setConflictRule
(PcAll.ConflictRule conflictRule) void
setDepth
(int depth) Sets the maximum number of variables conditioned on in any conditional independence test.void
setExternalGraph
(Graph externalGraph) void
setFasType
(PcAll.FasType fasType) void
void
setHeuristic
(int heuristic) void
setKnowledge
(Knowledge knowledge) Sets the knowledge specification used in the search.void
setMaxPathLength
(int maxPathLength) void
setUseHeuristic
(boolean useHeuristic) void
setVerbose
(boolean verbose)
-
Constructor Details
-
PcAll
Constructs a CPC algorithm that uses the given independence test as oracle. This does not make a copy of the independence test, for fear of duplicating the data set!
-
-
Method Details
-
isArrowpointAllowed1
-
isArrowpointAllowed
Checks if an arrowpoint is allowed by background knowledge. -
setUseHeuristic
public void setUseHeuristic(boolean useHeuristic) -
getMaxPathLength
public int getMaxPathLength() -
setMaxPathLength
public void setMaxPathLength(int maxPathLength) -
setFasType
-
setConcurrent
-
setHeuristic
public void setHeuristic(int heuristic) -
isAggressivelyPreventCycles
public boolean isAggressivelyPreventCycles()- Returns:
- true just in case edges will not be added if they would create cycles.
-
setAggressivelyPreventCycles
public void setAggressivelyPreventCycles(boolean aggressivelyPreventCycles) Sets to true just in case edges will not be added if they would create cycles. -
setColliderDiscovery
-
setConflictRule
-
getElapsedTime
public long getElapsedTime()- Returns:
- the elapsed time of search in milliseconds, after
search()
has been run.
-
getKnowledge
- Returns:
- the knowledge specification used in the search. Non-null.
-
setKnowledge
Sets the knowledge specification used in the search. Non-null. -
getIndependenceTest
- Returns:
- the independence test used in the search, set in the constructor. This is not returning a copy, for fear of duplicating the data set!
-
getDepth
public int getDepth()- Returns:
- the depth of the search--that is, the maximum number of variables conditioned on in any conditional independence test.
-
setDepth
public void setDepth(int depth) Sets the maximum number of variables conditioned on in any conditional independence test. If set to -1, the value of 1000 will be used. May not be set to Integer.MAX_VALUE, due to a Java bug on multi-core systems. -
getAmbiguousTriples
- Returns:
- the set of ambiguous triples found during the most recent run of the algorithm. Non-null after a call to
search()
.
-
getColliderTriples
- Returns:
- the set of collider triples found during the most recent run of the algorithm. Non-null after a call to
search()
.
-
getNoncolliderTriples
- Returns:
- the set of noncollider triples found during the most recent run of the algorithm. Non-null after a call
to
search()
.
-
getAdjacencies
-
getNonadjacencies
-
search
- Specified by:
search
in interfaceGraphSearch
-
search
-
getSepsets
-
getGraph
The graph that's constructed during the search. -
setGraph
-
setVerbose
public void setVerbose(boolean verbose) -
setExternalGraph
-