Package edu.cmu.tetrad.search
Class PcMb
java.lang.Object
edu.cmu.tetrad.search.PcMb
- All Implemented Interfaces:
- IGraphSearch,- IMbSearch
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. The reference is here:
 
Bai, X., Padman, R., Ramsey, J., & Spirtes, P. (2008). Tabu search-enhanced graphical models for classification in high dimensions. INFORMS Journal on Computing, 20(3), 423-437.
This class is configured to respect knowledge of forbidden and required edges, including knowledge of temporal tiers.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionGiven the target, this returns all the nodes in the Markov Blanket.Returns "PC-MB."Returns the set of triples identified as ambiguous by the CPC algorithm during the most recent search.intgetDepth()Returns the depth of the search--that is, the maximum number of variables conditioned on in any conditional independence test.longReturns the elapsed time of the most recent search.Returns The knowledge used in search.intReturns the number of independence tests performed during the most recent search.Return the targets of the most recent search.getTest()Returns the test used in search.Returns the result graph.search()Searches for the Markov blanket CPDAG for the given targets.Searches for the MB CPDAG for the given targets.voidsetDepth(int depth) Sets the maximum number of conditioning variables for any conditional independence test.voidsetFindMb(boolean findMb) Setter for the fieldfindMb.voidsetKnowledge(Knowledge knowledge) Sets knowledge, to which the algorithm is in fact sensitive.voidsetMeekPreventCycles(boolean meekPreventCycles) Sets whether cycles should be prevented, using a cycle checker.voidsetVariables(List<Node> variables) Setter for the fieldvariables.voidsetVerbose(boolean verbose) Sets the verbosity level of the search.Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.IGraphSearchsetTest
- 
Constructor Details- 
PcMbConstructs 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- 
setMeekPreventCyclespublic void setMeekPreventCycles(boolean meekPreventCycles) Sets whether cycles should be prevented, using a cycle checker.- Parameters:
- meekPreventCycles- True, if so.
 
- 
searchSearches for the MB CPDAG for the given targets.- Parameters:
- targets- The targets variable.
- Returns:
- a Graphobject
- Throws:
- InterruptedException- if any
 
- 
searchSearches for the Markov blanket CPDAG for the given targets.- Specified by:
- searchin interface- IGraphSearch
- Returns:
- The Markov blanket CPDAG as a Graph object.
- Throws:
- InterruptedException- if any
 
- 
getAmbiguousTriplesReturns the set of triples identified as ambiguous by the CPC algorithm during the most recent search.- Returns:
- This set.
 
- 
getNumIndependenceTestspublic int getNumIndependenceTests()Returns the number of independence tests performed during the most recent search.- Specified by:
- getNumIndependenceTestsin interface- IMbSearch
- Returns:
- This number.
 
- 
getTargetsReturn the targets of the most recent search.- Returns:
- This list.
 
- 
getElapsedTimepublic long getElapsedTime()Returns the elapsed time of the most recent search.- Returns:
- This time.
 
- 
getAlgorithmNameReturns "PC-MB."- Specified by:
- getAlgorithmNamein interface- IMbSearch
- Returns:
- This string.
 
- 
getDepthpublic int getDepth()Returns the depth of the search--that is, the maximum number of variables conditioned on in any conditional independence test.- Returns:
- This depth.
 
- 
setDepthpublic void setDepth(int depth) Sets the maximum number of conditioning variables for any conditional independence test.- Parameters:
- depth- This depth.
 
- 
resultGraphReturns the result graph.- Returns:
- This graph.
 
- 
findMbGiven the target, this returns all the nodes in the Markov Blanket.Returns the Markov blanket variables (not the Markov blanket DAG). - Specified by:
- findMbin interface- IMbSearch
- Parameters:
- target- a- Nodeobject
- Returns:
- a Setobject
- Throws:
- InterruptedException- if any
 
- 
getTestReturns the test used in search.- Specified by:
- getTestin interface- IGraphSearch
- Returns:
- This test.
 
- 
getKnowledgeReturns The knowledge used in search.- Returns:
- This knowledge.
 
- 
setKnowledgeSets knowledge, to which the algorithm is in fact sensitive.- Parameters:
- knowledge- This knowledge.
- See Also:
 
- 
setVariablesSetter for the field variables.- Parameters:
- variables- a- Listobject
 
- 
setFindMbpublic void setFindMb(boolean findMb) Setter for the field findMb.- Parameters:
- findMb- a boolean
 
- 
setVerbosepublic void setVerbose(boolean verbose) Sets the verbosity level of the search.- Parameters:
- verbose- true if verbose output should be enabled, false otherwise
 
 
-