From 6b5fe019e09f12b3a3885760077433d402be9363 Mon Sep 17 00:00:00 2001 From: jdramsey Date: Sat, 6 Jul 2024 16:07:13 -0400 Subject: [PATCH] Update SemBicScore parameter in TestCheckMarkov tests All instances of the SemBicScore constructor within TestCheckMarkov have been updated. The second parameter has been changed from false to true to reflect a change in the expected default behavior of this class. This ensures tests are accurately reflecting the updated functionality of the SemBicScore class. --- .../edu/cmu/tetrad/test/TestCheckMarkov.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tetrad-lib/src/test/java/edu/cmu/tetrad/test/TestCheckMarkov.java b/tetrad-lib/src/test/java/edu/cmu/tetrad/test/TestCheckMarkov.java index 5382a86bf6..a6f061c37b 100644 --- a/tetrad-lib/src/test/java/edu/cmu/tetrad/test/TestCheckMarkov.java +++ b/tetrad-lib/src/test/java/edu/cmu/tetrad/test/TestCheckMarkov.java @@ -123,7 +123,7 @@ public void testGaussianDAGPrecisionRecallForLocalOnMarkovBlanket() { // Parameters without additional setting default tobe Gaussian SemIm im = new SemIm(pm, new Parameters()); DataSet data = im.simulateData(10000, false); - edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, false); + edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, true); score.setPenaltyDiscount(2); Graph estimatedCpdag = new PermutationSearch(new Boss(score)).search(); // TODO VBC: Next check different search algo to generate estimated graph. e.g. PC @@ -182,7 +182,7 @@ public void testGaussianCPDAGPrecisionRecallForLocalOnMarkovBlanket() { // Parameters without additional setting default tobe Gaussian SemIm im = new SemIm(pm, new Parameters()); DataSet data = im.simulateData(1000, false); - edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, false); + edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, true); score.setPenaltyDiscount(2); Graph estimatedCpdag = new PermutationSearch(new Boss(score)).search(); System.out.println("Test Estimated CPDAG Graph: " + estimatedCpdag); @@ -215,7 +215,7 @@ public void testNonGaussianDAGPrecisionRecallForLocalOnMarkovBlanket() { SemIm im = new SemIm(pm, params); DataSet data = im.simulateData(1000, false); - edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, false); + edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, true); score.setPenaltyDiscount(2); Graph estimatedCpdag = new PermutationSearch(new Boss(score)).search(); System.out.println("Test Estimated CPDAG Graph: " + estimatedCpdag); @@ -249,7 +249,7 @@ public void testNonGaussianCPDAGPrecisionRecallForLocalOnMarkovBlanket() { SemIm im = new SemIm(pm, params); DataSet data = im.simulateData(1000, false); - edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, false); + edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, true); score.setPenaltyDiscount(2); Graph estimatedCpdag = new PermutationSearch(new Boss(score)).search(); System.out.println("Test Estimated CPDAG Graph: " + estimatedCpdag); @@ -278,7 +278,7 @@ public void testGaussianDAGPrecisionRecallForLocalOnParents() { // Parameters without additional setting default tobe Gaussian SemIm im = new SemIm(pm, new Parameters()); DataSet data = im.simulateData(1000, false); - edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, false); + edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, true); score.setPenaltyDiscount(2); Graph estimatedCpdag = new PermutationSearch(new Boss(score)).search(); System.out.println("Test Estimated CPDAG Graph: " + estimatedCpdag); @@ -319,7 +319,7 @@ public void testGaussianCPDAGPrecisionRecallForLocalOnParents() { // Parameters without additional setting default tobe Gaussian SemIm im = new SemIm(pm, new Parameters()); DataSet data = im.simulateData(1000, false); - edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, false); + edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, true); score.setPenaltyDiscount(2); Graph estimatedCpdag = new PermutationSearch(new Boss(score)).search(); System.out.println("Test Estimated CPDAG Graph: " + estimatedCpdag); @@ -362,7 +362,7 @@ public void testNonGaussianDAGPrecisionRecallForLocalOnParents() { SemIm im = new SemIm(pm, params); DataSet data = im.simulateData(1000, false); - edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, false); + edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, true); score.setPenaltyDiscount(2); Graph estimatedCpdag = new PermutationSearch(new Boss(score)).search(); System.out.println("Test Estimated CPDAG Graph: " + estimatedCpdag); @@ -408,7 +408,7 @@ public void testNonGaussianCPDAGPrecisionRecallForLocalOnParents() { SemIm im = new SemIm(pm, params); DataSet data = im.simulateData(1000, false); - edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, false); + edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, true); score.setPenaltyDiscount(2); Graph estimatedCpdag = new PermutationSearch(new Boss(score)).search(); System.out.println("Test Estimated CPDAG Graph: " + estimatedCpdag); @@ -450,7 +450,7 @@ public void testGaussianCPDAGPrecisionRecallForLocalOnMarkovBlanket2() { // Parameters without additional setting default tobe Gaussian SemIm im = new SemIm(pm, new Parameters()); DataSet data = im.simulateData(1000, false); - edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, false); + edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, true); score.setPenaltyDiscount(2); Graph estimatedCpdag = new PermutationSearch(new Boss(score)).search(); System.out.println("Test Estimated CPDAG Graph: " + estimatedCpdag); @@ -483,7 +483,7 @@ public void testNonGaussianDAGPrecisionRecallForLocalOnMarkovBlanket2() { SemIm im = new SemIm(pm, params); DataSet data = im.simulateData(1000, false); - edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, false); + edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, true); score.setPenaltyDiscount(2); Graph estimatedCpdag = new PermutationSearch(new Boss(score)).search(); System.out.println("Test Estimated CPDAG Graph: " + estimatedCpdag); @@ -517,7 +517,7 @@ public void testNonGaussianCPDAGPrecisionRecallForLocalOnMarkovBlanket2() { SemIm im = new SemIm(pm, params); DataSet data = im.simulateData(1000, false); - edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, false); + edu.cmu.tetrad.search.score.SemBicScore score = new SemBicScore(data, true); score.setPenaltyDiscount(2); Graph estimatedCpdag = new PermutationSearch(new Boss(score)).search(); System.out.println("Test Estimated CPDAG Graph: " + estimatedCpdag);