Class CompareTwoGraphs

java.lang.Object
edu.cmu.tetrad.algcomparison.CompareTwoGraphs

public class CompareTwoGraphs extends Object
Gives the comparison of a target graph to a reference graph that is implemented in the interface. Three methods are given, one to return the edgewise comparison, one to return the stats list comparison, and one to return the misclassification comparison. Each returns a String, which can be printed.
Author:
josephramsey
  • Constructor Details

    • CompareTwoGraphs

      public CompareTwoGraphs()
  • Method Details

    • getEdgewiseComparisonString

      @NotNull public static @NotNull String getEdgewiseComparisonString(Graph trueGraph, Graph targetGraph)
      Returns an edgewise comparison of two graphs. This says, edge by edge, what the differences and similarities are between the two graphs.
      Parameters:
      trueGraph - The true graph.
      targetGraph - The target graph.
      Returns:
      The comparison string.
    • getStatsListTable

      public static String getStatsListTable(Graph trueGraph, Graph targetGraph)
      Returns a string representing a table of statistics that can be printed.
      Parameters:
      trueGraph - The true graph.
      targetGraph - The target graph.
      Returns:
      The comparison string.
    • getStatsListTable

      public static String getStatsListTable(Graph trueGraph, Graph targetGraph, DataModel dataModel)
      Returns a string representing a table of statistics that can be printed.
      Parameters:
      trueGraph - The true graph.
      targetGraph - The target graph.
      dataModel - The data model; some statistics (like BIC) may use this.
      Returns:
      The comparison string.
    • getMisclassificationTable

      @NotNull public static @NotNull String getMisclassificationTable(Graph trueGraph, Graph targetGraph)
      Returns a misclassification comparison of two graphs. This includes both an edge misclassiifcation matrix as well as an endpoint misclassification matrix.
      Parameters:
      trueGraph - The true graph.
      targetGraph - The target graph.
      Returns:
      The comparison string.