Package edu.cmu.tetrad.search
Class PcMb
java.lang.Object
edu.cmu.tetrad.search.PcMb
- All Implemented Interfaces:
GraphSearch
,MbSearch
Searches for a CPDAG representing all the Markov blankets for a given target T consistent with the given
independence information. This CPDAG may be used to generate the actual list of DAG's that might be Markov
blankets. Note that this code has been converted to be consistent with the CPC algorithm.
- Author:
- Joseph Ramsey
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGiven the target this returns all the nodes in the Markov Blanket.The name of the algorithm.int
getDepth()
long
getGraph()
int
Number of independent tests.getTest()
boolean
search()
Does a CPDAG search.Searches for the MB CPDAG for the given targets.void
setAggressivelyPreventCycles
(boolean aggressivelyPreventCycles) void
setDepth
(int depth) Sets the maximum number of conditioning variables for any conditional independence test.void
setFindMb
(boolean findMb) void
setKnowledge
(Knowledge knowledge) Sets knowledge, to which the algorithm is in fact sensitive.void
setVariables
(List<Node> variables)
-
Constructor Details
-
PcMb
Constructs a new search.- Parameters:
test
- The source of conditional independence information for the search.depth
- The maximum number of variables conditioned on for any
-
-
Method Details
-
isAggressivelyPreventCycles
public boolean isAggressivelyPreventCycles() -
setAggressivelyPreventCycles
public void setAggressivelyPreventCycles(boolean aggressivelyPreventCycles) -
search
Searches for the MB CPDAG for the given targets.- Parameters:
targets
- The targets variable.
-
search
Does a CPDAG search.- Specified by:
search
in interfaceGraphSearch
-
getAmbiguousTriples
- Returns:
- the set of triples identified as ambiguous by the CPC algorithm during the most recent search.
-
getColliderTriples
- Returns:
- the set of triples identified as colliders by the CPC algorithm during the most recent search.
-
getNoncolliderTriples
- Returns:
- the set of triples identified as noncolliders by the CPC algorithm during the most recent search.
-
getNumIndependenceTests
public int getNumIndependenceTests()Description copied from interface:MbSearch
Number of independent tests.- Specified by:
getNumIndependenceTests
in interfaceMbSearch
- Returns:
- the number of independence tests performed during the most recent search.
-
getTargets
- Returns:
- the target of the most recent search.
-
getElapsedTime
public long getElapsedTime()- Returns:
- the elapsed time of the most recent search.
-
getAlgorithmName
Description copied from interface:MbSearch
The name of the algorithm.- Specified by:
getAlgorithmName
in interfaceMbSearch
- Returns:
- "PC-MB."
-
getDepth
public int getDepth()- Returns:
- Ibid.
-
setDepth
public void setDepth(int depth) Sets the maximum number of conditioning variables for any conditional independence test.- Parameters:
depth
- Ibid.
-
resultGraph
- Returns:
- Ibid.
-
findMb
Description copied from interface:MbSearch
Given the target this returns all the nodes in the Markov Blanket. -
getTest
- Returns:
- Ibid.
-
getKnowledge
- Returns:
- Ibid.
-
setKnowledge
Sets knowledge, to which the algorithm is in fact sensitive.- Parameters:
knowledge
- See the Knowledge class.
-
getGraph
-
setVariables
-
setFindMb
public void setFindMb(boolean findMb)
-