Skip to content

Commit

Permalink
method documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vbcwonderland committed May 23, 2024
1 parent 4c5b512 commit 58f01ed
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
22 changes: 22 additions & 0 deletions tetrad-lib/src/main/java/edu/cmu/tetrad/search/MarkovCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,17 @@ public List<List<Node>> getAndersonDarlingTestAcceptsRejectsNodesForAllNodes(Ind
return accepts_rejects;
}

/**
* Get accepts and rejects nodes for all nodes from Anderson-Darling test and generate the plot data for confusion statistics.
*
* Confusion statistics were calculated using Adjacency (AdjacencyPrecision, AdjacencyRecall) and Arrowhead (ArrowheadPrecision, ArrowheadRecall)
* @param independenceTest
* @param estimatedCpdag
* @param trueGraph
* @param threshold
* @param shuffleThreshold
* @return
*/
public List<List<Node>> getAndersonDarlingTestAcceptsRejectsNodesForAllNodesPlotData(IndependenceTest independenceTest, Graph estimatedCpdag, Graph trueGraph, Double threshold, Double shuffleThreshold) {
// When calling, default reject null as <=0.05
List<List<Node>> accepts_rejects = new ArrayList<>();
Expand Down Expand Up @@ -479,6 +490,17 @@ public List<List<Node>> getAndersonDarlingTestAcceptsRejectsNodesForAllNodesPlot
return accepts_rejects;
}

/**
* Get accepts and rejects nodes for all nodes from Anderson-Darling test and generate the plot data for confusion statistics.
*
* Confusion statistics were calculated using Local Graph Precision and Recall (LocalGraphPrecision, LocalGraphRecall).
* @param independenceTest
* @param estimatedCpdag
* @param trueGraph
* @param threshold
* @param shuffleThreshold
* @return
*/
public List<List<Node>> getAndersonDarlingTestAcceptsRejectsNodesForAllNodesPlotData2(IndependenceTest independenceTest, Graph estimatedCpdag, Graph trueGraph, Double threshold, Double shuffleThreshold) {
// When calling, default reject null as <=0.05
List<List<Node>> accepts_rejects = new ArrayList<>();
Expand Down
14 changes: 0 additions & 14 deletions tetrad-lib/src/test/java/edu/cmu/tetrad/test/TestCheckMarkov.java
Original file line number Diff line number Diff line change
Expand Up @@ -468,20 +468,6 @@ public void testGaussianDAGPrecisionRecallForLocalOnMarkovBlanket2() {
List<Node> rejects = accepts_rejects.get(1);
System.out.println("Accepts size: " + accepts.size());
System.out.println("Rejects size: " + rejects.size());

// List<Double> acceptsPrecision = new ArrayList<>();
// List<Double> acceptsRecall = new ArrayList<>();
// for(Node a: accepts) {
// System.out.println("=====================");
// markovCheck.getPrecisionAndRecallOnMarkovBlanketGraph2(a, estimatedCpdag, trueGraph);
// System.out.println("=====================");
//
// }
// for (Node a: rejects) {
// System.out.println("=====================");
// markovCheck.getPrecisionAndRecallOnMarkovBlanketGraph2(a, estimatedCpdag, trueGraph);
// System.out.println("=====================");
// }
}

}

0 comments on commit 58f01ed

Please sign in to comment.