Class MbUtils

java.lang.Object
edu.cmu.tetrad.search.utils.MbUtils

public class MbUtils extends Object
Provides some useful utilities for dealing with Markov blankets and Markov blanket DAGs.
Author:
josephramsey
  • Constructor Details

    • MbUtils

      public MbUtils()
  • Method Details

    • trimToMbNodes

      public static void trimToMbNodes(Graph graph, Node target, boolean includeBidirected)
      Trims the graph to the target, the parents and children of the target, and the parents of the children of the target. Bidirected edges are interpreted as if they could be oriented in either direction.
      Parameters:
      graph - The graph.
      target - The target.
      includeBidirected - true if bidirected edges should be included.
    • trimEdgesAmongParents

      public static void trimEdgesAmongParents(Graph graph, Node target)
      Removes edges among the parents of the target.
      Parameters:
      graph - The graph.
      target - The target.
    • trimEdgesAmongParentsOfChildren

      public static void trimEdgesAmongParentsOfChildren(Graph graph, Node target)
      Removes edges among the parents of children of the target.
      Parameters:
      graph - The graph.
      target - The target.
    • trimToAdjacents

      public static void trimToAdjacents(Graph graph, Node target)
      Trims the graph to just the adjacents of the target.
      Parameters:
      graph - The graph.
      target - The target.
    • generateMbDags

      public static List<Graph> generateMbDags(Graph mbCPDAG, boolean orientBidirectedEdges, IndependenceTest test, int depth, Node target)
      Generates the list of MB DAGs consistent with the MB CPDAG returned by the previous search.
      Parameters:
      orientBidirectedEdges - True iff bidirected edges should be oriented as if they were undirected.
      Returns:
      a list of Dag's.
    • getOneMbDag

      public static Graph getOneMbDag(Graph mbCpdag)
      Returns an example DAG from the given MB CPDAG.
      Parameters:
      mbCpdag - The MB CPDAG.
      Returns:
      An example DAG in this CPDAG.