Package edu.cmu.tetrad.util
Class GraphSampling
java.lang.Object
edu.cmu.tetrad.util.GraphSampling
A utility for computing frequency probabilities.
Jan 29, 2023 3:28:26 PM
- Version:
- $Id: $Id
- Author:
- Kevin V. Bui (kvb2univpitt@gmail.com)
-
Method Summary
Modifier and TypeMethodDescriptionstatic GraphcreateDisplayGraph(Graph graph, ResamplingEdgeEnsemble ensemble) Create a graph for displaying and print out.static GraphcreateGraphWithHighProbabilityEdges(List<Graph> graphs) Combine all the edges from the list of graphs onto one graph with the edge type that has the highest frequency probability.static GraphcreateGraphWithoutNullEdges(Graph graph) Create a graph from the given graph that contains no null edges.static EdgeTypeProbability.EdgeTypegetReversed(EdgeTypeProbability.EdgeType edgeType) Returns the reversed counterpart of the specified edge type.
-
Method Details
-
createGraphWithoutNullEdges
Create a graph from the given graph that contains no null edges.- Parameters:
graph- the given graph- Returns:
- graph that contains no null edges
-
createDisplayGraph
Create a graph for displaying and print out.- Parameters:
graph- aGraphobjectensemble- aResamplingEdgeEnsembleobject- Returns:
- a
Graphobject
-
createGraphWithHighProbabilityEdges
Combine all the edges from the list of graphs onto one graph with the edge type that has the highest frequency probability.- Parameters:
graphs- list of graphs- Returns:
- graph containing edges with edge type of the highest probability
-
getReversed
Returns the reversed counterpart of the specified edge type. The reversal mapping is defined as follows: - EdgeType.ac is reversed to EdgeType.ca - EdgeType.at is reversed to EdgeType.ta - EdgeType.ca is reversed to EdgeType.ac - EdgeType.ta is reversed to EdgeType.at For any other edge type, the method returns the input edge type unchanged.- Parameters:
edgeType- the edge type to be reversed- Returns:
- the reversed edge type, or the input edge type if no reversal is defined
-