Class Cefs

java.lang.Object
edu.cmu.tetrad.search.Cefs

public final class Cefs extends Object
Searches for a CPDAG representing all of 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

    • Cefs

      public Cefs(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 independence test in the search.
  • Method Details

    • isAggressivelyPreventCycles

      public boolean isAggressivelyPreventCycles()
    • setAggressivelyPreventCycles

      public void setAggressivelyPreventCycles(boolean aggressivelyPreventCycles)
    • search

      public Graph search(String targetName)
      Searches for the MB CPDAG for the given target.
      Parameters:
      targetName - The name of the target variable.
    • 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 long getNumIndependenceTests()
      Returns:
      the number of independence tests performed during the most recent search.
    • getTarget

      public Node getTarget()
      Returns:
      the target of the most recent search.
    • getElapsedTime

      public double getElapsedTime()
      Returns:
      the elapsed time of the most recent search.
    • getTrueMb

      public Dag getTrueMb()
      If a true MB was set before running the search, this returns it.
    • getDepth

      public int getDepth()
      Returns:
      the depth of the most recent search.
    • resultGraph

      public Graph resultGraph()
      Returns:
      the result graph of the most recent search.
    • findMb

      public List<Node> findMb(String targetName)
      Returns:
      just the Markov blanket (not the Markov blanket DAG).
    • getTest

      public IndependenceTest getTest()
      Returns:
      the independence test set in the constructor.
    • getKnowledge

      public Knowledge getKnowledge()
      Returns:
      the most recently set Knowledge object.
    • setKnowledge

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

      public Graph getGraph()