Class VertexRepairSimulation
java.lang.Object
edu.cmu.tetrad.search.harness.VertexRepairSimulation
Simulation harness for VertexRepairSearch.
Four starting-graph scenarios are available via VertexRepairSimulation.StartingGraph:
BOSS— run BOSS to get an initial CPDAG, then repair.PC— run PC to get an initial CPDAG, then repair.FGES— run FGES to get an initial CPDAG, then repair.EMPTY— start from a graph with no edges, then repair.
Set scenario to the desired value and call run().
Statistics reported (averaged over NUM_RUNS runs):
- Adjacency Precision
- Adjacency Recall
- Adjacency F1
- Arrowhead Precision
- Arrowhead Recall
- Arrowhead F1
- Arrowhead Precision (common edges only)
- Arrowhead Recall (common edges only)
- Markov Check KS p-value
- Number of edges
- BIC score
- Percentage of runs where adjacency F1 improves after repair
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhich algorithm to use to produce the initial graph before repair. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VertexRepairSimulation.StartingGraphWhich starting-graph scenario to use. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for the VertexRepairSimulation class. -
Method Summary
-
Field Details
-
scenario
Which starting-graph scenario to use. Change this to try different scenarios.
-
-
Constructor Details
-
VertexRepairSimulation
public VertexRepairSimulation()Default constructor for the VertexRepairSimulation class. Initializes a new instance of the VertexRepairSimulation class. This constructor sets up the necessary state for running the vertex repair simulation process on directed acyclic graphs (DAGs).
-
-
Method Details
-
main
The entry point of the VertexRepairSimulation application. This method starts the simulation process by invoking the run method of the VertexRepairSimulation class, which orchestrates the execution of the vertex repair algorithm on directed acyclic graphs (DAGs).- Parameters:
args- command line arguments passed to the program; currently unused but reserved for potential future use.- Throws:
Exception- if an error occurs during the execution of the simulation.
-
run
Executes the VertexRepairSearch simulation process for a specified number of runs. This method initializes configurations, simulates data, computes statistics, and evaluates the effectiveness of repairing strategies on directed acyclic graphs (DAGs). The simulation involves the following steps: 1. Simulating random DAGs and generating corresponding linear Gaussian data. 2. Building the required independence tests and scoring mechanisms (e.g., SEM BIC score). 3. Producing the starting graph based on a predefined scenario, evaluating key metrics, and accumulating initial statistics. 4. Applying the VertexRepairSearch algorithm to refine the starting graph. 5. Computing and accumulating final statistics for the repaired graph. Various metrics such as adjacency precision, adjacency recall, adjacency F1 score, arrow precision, arrow recall, arrow F1 score, Markov equivalence, number of edges, and Bayesian Information Criterion (BIC) are output and analyzed for performance.- Throws:
Exception- if any errors occur during the simulation or processing.
-