Class VertexRepairSimulation

java.lang.Object
edu.cmu.tetrad.search.harness.VertexRepairSimulation

public class VertexRepairSimulation extends Object
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 Classes
    Modifier and Type
    Class
    Description
    static enum 
    Which algorithm to use to produce the initial graph before repair.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Which starting-graph scenario to use.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for the VertexRepairSimulation class.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
    The entry point of the VertexRepairSimulation application.
    void
    run()
    Executes the VertexRepairSearch simulation process for a specified number of runs.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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

      public static void main(String[] args) throws Exception
      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

      public void run() throws Exception
      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.