Class PcMb

java.lang.Object
edu.cmu.tetrad.search.PcMb
All Implemented Interfaces:
GraphSearch, MbSearch

public final class PcMb extends Object implements MbSearch, GraphSearch
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 Details

    • PcMb

      public PcMb(IndependenceTest test, int depth)
      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

      public Graph search(List<Node> targets)
      Searches for the MB CPDAG for the given targets.
      Parameters:
      targets - The targets variable.
    • search

      public Graph search()
      Does a CPDAG search.
      Specified by:
      search in interface GraphSearch
    • getAmbiguousTriples

      public Set<Triple> getAmbiguousTriples()
      Returns:
      the set of triples identified as ambiguous by the CPC algorithm during the most recent search.
    • getColliderTriples

      public Set<Triple> getColliderTriples()
      Returns:
      the set of triples identified as colliders by the CPC algorithm during the most recent search.
    • getNoncolliderTriples

      public Set<Triple> 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 interface MbSearch
      Returns:
      the number of independence tests performed during the most recent search.
    • getTargets

      public List<Node> getTargets()
      Returns:
      the target of the most recent search.
    • getElapsedTime

      public long getElapsedTime()
      Returns:
      the elapsed time of the most recent search.
    • getAlgorithmName

      public String getAlgorithmName()
      Description copied from interface: MbSearch
      The name of the algorithm.
      Specified by:
      getAlgorithmName in interface MbSearch
      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

      public Graph resultGraph()
      Returns:
      Ibid.
    • findMb

      public List<Node> findMb(Node target)
      Description copied from interface: MbSearch
      Given the target this returns all the nodes in the Markov Blanket.
      Specified by:
      findMb in interface MbSearch
      Returns:
      just the Markov blanket (not the Markov blanket DAG).
    • getTest

      public IndependenceTest getTest()
      Returns:
      Ibid.
    • getKnowledge

      public Knowledge getKnowledge()
      Returns:
      Ibid.
    • setKnowledge

      public void setKnowledge(Knowledge knowledge)
      Sets knowledge, to which the algorithm is in fact sensitive.
      Parameters:
      knowledge - See the Knowledge class.
    • getGraph

      public Graph getGraph()
    • setVariables

      public void setVariables(List<Node> variables)
    • setFindMb

      public void setFindMb(boolean findMb)