Package edu.cmu.tetrad.search.utils
Class MbUtils
java.lang.Object
edu.cmu.tetrad.search.utils.MbUtils
Provides some useful utilities for dealing with Markov blankets and Markov blanket DAGs.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Method Summary
Modifier and TypeMethodDescriptiongenerateMbDags
(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.static Graph
getOneMbDag
(Graph mbCpdag) Returns an example DAG from the given MB CPDAG.static void
trimEdgesAmongParents
(Graph graph, Node target) Removes edges among the parents of the target.static void
trimEdgesAmongParentsOfChildren
(Graph graph, Node target) Removes edges among the parents of children of the target.static void
trimToAdjacents
(Graph graph, Node target) Trims the graph to just the adjacents of the target.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.
-
Method Details
-
trimToMbNodes
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
-
trimEdgesAmongParentsOfChildren
-
trimToAdjacents
-
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:
mbCPDAG
- aGraph
objectorientBidirectedEdges
- True iff bidirected edges should be oriented as if they were undirected.test
- aIndependenceTest
objectdepth
- a inttarget
- aNode
object- Returns:
- a list of Dag's.
-
getOneMbDag
-